Skip to content

Commit

Permalink
+ DV: DVREscue MoreData list as enum
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeMartinez committed Sep 8, 2024
1 parent 450ac95 commit 799376a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Source/MediaInfo/MediaInfo_Events.h
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,11 @@ struct MediaInfo_Event_DvDif_Analysis_Frame_1
MediaInfo_int32u MoreFlags;
const MediaInfo_int8u* MoreData;
};
enum MediaInfo_Event_Analysis_Frame_Enums {
MediaInfo_Event_Analysis_Frame_None,
MediaInfo_Event_Analysis_Frame_AudioErrorValues,
MediaInfo_Event_Analysis_Frame_DirectionSpeed,
};

/*-------------------------------------------------------------------------*/
/* Change in the stream config */
Expand Down
4 changes: 2 additions & 2 deletions Source/MediaInfo/Multiple/File_DvDif_Analysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1847,7 +1847,7 @@ void File_DvDif::Errors_Stats_Update()
if (!MoreData)
MoreData=new int8u[4096] + sizeof(size_t); // TODO: more dynamic allocation
MoreData[MoreData_Offset++]=2+Audio_Errors[ChannelGroup][Dseq].Values.size()*2; // Size of the block
MoreData[MoreData_Offset++]=1; // Audio error value par channel group per Dseq
MoreData[MoreData_Offset++]=MediaInfo_Event_Analysis_Frame_AudioErrorValues; // Audio error value par channel group per Dseq
MoreData[MoreData_Offset++]=ChannelGroup;
MoreData[MoreData_Offset++]=Dseq;
for (std::set<int16u>::iterator Value=Audio_Errors[ChannelGroup][Dseq].Values.begin(); Value!=Audio_Errors[ChannelGroup][Dseq].Values.end(); ++Value)
Expand All @@ -1867,7 +1867,7 @@ void File_DvDif::Errors_Stats_Update()
if (!MoreData)
MoreData=new int8u[4096]+sizeof(size_t); // TODO: more dynamic allocation
MoreData[MoreData_Offset++]=DirectionSpeed.size();
MoreData[MoreData_Offset++]=2; // DirectionSpeed values
MoreData[MoreData_Offset++]=MediaInfo_Event_Analysis_Frame_DirectionSpeed; // DirectionSpeed values
for (std::vector<int8u>::iterator DirectionSpeed_Item=DirectionSpeed.begin(); DirectionSpeed_Item!=DirectionSpeed.end(); ++DirectionSpeed_Item)
{
MoreData[MoreData_Offset++]=*DirectionSpeed_Item;
Expand Down

0 comments on commit 799376a

Please sign in to comment.