mkvextract: accept timestamps_v2 in addition to timecodes_v2

Part of an ongoing effort to replace the use of the term `timecode`
with `timestamp`. Timecodes have a very specific meaning in the
audio/video world, and it's not what MKVToolNix has been using the
term for.
This commit is contained in:
Moritz Bunkus 2017-10-04 14:53:09 +02:00
parent 1f7f3ef02b
commit 0d158357be
3 changed files with 23 additions and 20 deletions

View File

@ -215,14 +215,15 @@ extract_cli_parser_c::set_extraction_mode() {
const char *name;
options_c::extraction_mode_e extraction_mode;
} s_mode_map[] = {
{ "tracks", options_c::em_tracks },
{ "tags", options_c::em_tags },
{ "attachments", options_c::em_attachments },
{ "chapters", options_c::em_chapters },
{ "cuesheet", options_c::em_cuesheet },
{ "timecodes_v2", options_c::em_timestamps_v2 },
{ "cues", options_c::em_cues },
{ nullptr, options_c::em_unknown },
{ "tracks", options_c::em_tracks },
{ "tags", options_c::em_tags },
{ "attachments", options_c::em_attachments },
{ "chapters", options_c::em_chapters },
{ "cuesheet", options_c::em_cuesheet },
{ "timecodes_v2", options_c::em_timestamps_v2 },
{ "timestamps_v2", options_c::em_timestamps_v2 },
{ "cues", options_c::em_cues },
{ nullptr, options_c::em_unknown },
};
int i;

View File

@ -174,7 +174,7 @@ T_325propedit_tags:785209f2dc35ad6177bea2ca6e43198f-26ad4ab0491d76d9fb6f57b4a4b3
T_326mpeg_ps_mpeg_audio_layer4:9837d4eab2e1bed9805cc60b19c46f04:passed:20111207-224511:1.505513342
T_327vp8_frame_type:67f09745027c31fbbd7838df6c94163b:passed:20111207-233304:0.089263543
T_328dts_detected_as_ac3:4347fcb56eb22be08b08b5a25974f511:passed:20111229-192324:0.090561076
T_329X_timecodes_v2:dadc36ce79c1c4b281f8f1f865746598-049cdc2d9226fac8c61d193d803bfc1f-3720aac3f16b66ec3308ffa7bf913c6e-6469e2522a4b48b7b20bae93f5d9086d-1ff091abfcb0938d6ac7fd0495e899b3-049cdc2d9226fac8c61d193d803bfc1f-d172a9340cbf2802690479e396879d1e-bf76c5886cc7c18cc7e6ee796c3406b4-b3f9d126c31505c22f292a1d2bdffba2-4bd97467fac0ac0b561d68b8b15a79dd:passed:20120105-202451:1.376047868
T_329X_timecodes_v2:dadc36ce79c1c4b281f8f1f865746598-049cdc2d9226fac8c61d193d803bfc1f-3720aac3f16b66ec3308ffa7bf913c6e-6469e2522a4b48b7b20bae93f5d9086d-1ff091abfcb0938d6ac7fd0495e899b3-049cdc2d9226fac8c61d193d803bfc1f-d172a9340cbf2802690479e396879d1e-bf76c5886cc7c18cc7e6ee796c3406b4-b3f9d126c31505c22f292a1d2bdffba2-4bd97467fac0ac0b561d68b8b15a79dd:passed:20120105-202451:1.08041896
T_330dts_detection:dd6c70a09fb62a0a7a5f3271a2d71b12:passed:20120107-210130:1.935366715
T_331read_buffer_underflow:fdf4588028552f16052b4100490b091a:passed:20120125-232902:0.322029153
T_332eac3_misdetected_as_avc:fe7e1560ee4456e367ec98f9ca881ceb:passed:20120131-145550:0.208997135

24
tests/test-329X_timecodes_v2.rb Normal file → Executable file
View File

@ -1,15 +1,17 @@
#!/usr/bin/ruby -w
class T_329X_timecodes_v2 < Test
def description
"mkvextract / timecodes_v2"
end
# T_329X_timecodes_v2
describe "mkvextract / timecodes_v2"
def run
(0..9).collect do |track_id|
sys "../src/mkvextract timecodes_v2 data/mkv/complex.mkv #{track_id}:#{tmp}"
hash_tmp
end.join('-')
end
test "timestamp extraction" do
(0..9).collect do |track_id|
sys "../src/mkvextract timecodes_v2 data/mkv/complex.mkv #{track_id}:#{tmp}"
a = hash_tmp
sys "../src/mkvextract timestamps_v2 data/mkv/complex.mkv #{track_id}:#{tmp}"
b = hash_tmp
fail "timecodes_v2 <> timestamps_v2" if a != b
a
end.join('-')
end