Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TTML: add Duration_Start_Command/Duration_End_Command #2111

Merged
merged 2 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Source/MediaInfo/MediaInfo_Config_Automatic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5407,7 +5407,7 @@ void MediaInfo_Config_Text (ZtringListList &Info)
"Duration_Start2End/String4;;;N NT\n"
"Duration_Start2End/String5;;;N NT\n"
"Duration_Start_Command;; ms;N YFY\n"
"Duration_Start_Command/String;;;Y NT\n"
"Duration_Start_Command/String;;;N NT\n"
"Duration_Start_Command/String1;;;N NT\n"
"Duration_Start_Command/String2;;;N NT\n"
"Duration_Start_Command/String3;;;N NT\n"
Expand All @@ -5428,7 +5428,7 @@ void MediaInfo_Config_Text (ZtringListList &Info)
"Duration_End/String4;;;N NT\n"
"Duration_End/String5;;;N NT\n"
"Duration_End_Command;; ms;N YFY\n"
"Duration_End_Command/String;;;Y NT\n"
"Duration_End_Command/String;;;N NT\n"
"Duration_End_Command/String1;;;N NT\n"
"Duration_End_Command/String2;;;N NT\n"
"Duration_End_Command/String3;;;N NT\n"
Expand Down
8 changes: 6 additions & 2 deletions Source/MediaInfo/Text/File_Ttml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,12 @@ void File_Ttml::Streams_Finish()
LastFrame--;
Fill(Stream_Text, 0, Text_TimeCode_LastFrame, LastFrame.ToString());
}
Fill(Stream_Text, 0, Text_Duration_Start, (int64s)Time_Begin.ToMilliseconds());
Fill(Stream_Text, 0, Text_Duration_End, (int64s)Time_End.ToMilliseconds());
auto Time_Begin_ms = (int64s)Time_Begin.ToMilliseconds();
auto Time_End_ms = (int64s)Time_End.ToMilliseconds();
Fill(Stream_Text, 0, Text_Duration_Start_Command, Time_Begin_ms);
Fill(Stream_Text, 0, Text_Duration_Start, Time_Begin_ms);
Fill(Stream_Text, 0, Text_Duration_End, Time_End_ms);
Fill(Stream_Text, 0, Text_Duration_End_Command, Time_End_ms);
}
Fill(Stream_Text, 0, Text_FrameRate_Mode, "CFR");
Fill(Stream_Text, 0, Text_Events_Total, FrameCount-EmptyCount);
Expand Down
4 changes: 2 additions & 2 deletions Source/Resource/Text/Stream/Text.csv
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Duration_Start2End/String3;;;N NT;;;Play time from first display to last display
Duration_Start2End/String4;;;N NT;;;Play time from first display to last display in format HH:MM:SS:FF, with last colon replaced by semicolon for drop frame if available;;
Duration_Start2End/String5;;;N NT;;;Play time from first display to last display in format HH:MM:SS.mmm (HH:MM:SS:FF);;
Duration_Start_Command;; ms;N YFY;;;Timestamp of first command, in ms;;
Duration_Start_Command/String;;;Y NT;;;Timestamp of first command in format XXx YYy, with YYy value omitted if zero (e.g. 1 h 40 min);;
Duration_Start_Command/String;;;N NT;;;Timestamp of first command in format XXx YYy, with YYy value omitted if zero (e.g. 1 h 40 min);;
Duration_Start_Command/String1;;;N NT;;;Timestamp of first command in format HHh MMmn SSs MMMms, with any fields omitted if zero;;
Duration_Start_Command/String2;;;N NT;;;Timestamp of first command in format XXx YYy, with YYy omitted if value is zero;;
Duration_Start_Command/String3;;;N NT;;;Timestamp of first command in format HH:MM:SS.mmm;;
Expand All @@ -78,7 +78,7 @@ Duration_End/String3;;;N NT;;;Play time in format HH:MM:SS.mmm;;
Duration_End/String4;;;N NT;;;Play time in format HH:MM:SS:FF, with last colon replaced by semicolon for drop frame if available;;
Duration_End/String5;;;N NT;;;Play time in format HH:MM:SS.mmm (HH:MM:SS:FF);;
Duration_End_Command;; ms;N YFY;;;Play time of the stream, in s (ms for text output);;
Duration_End_Command/String;;;Y NT;;;Play time in format XXx YYy, with YYy value omitted if zero (e.g. 1 h 40 min);;
Duration_End_Command/String;;;N NT;;;Play time in format XXx YYy, with YYy value omitted if zero (e.g. 1 h 40 min);;
Duration_End_Command/String1;;;N NT;;;Play time in format HHh MMmn SSs MMMms, with any fields omitted if zero;;
Duration_End_Command/String2;;;N NT;;;Play time in format XXx YYy, with YYy omitted if value is zero;;
Duration_End_Command/String3;;;N NT;;;Play time in format HH:MM:SS.mmm;;
Expand Down
Loading