mkvtoolnix/tests/test-222stereo_mode.rb

39 lines
1.1 KiB
Ruby
Raw Normal View History

#!/usr/bin/ruby -w
class T_222stereo_mode < Test
def description
2011-04-25 18:51:02 +00:00
"mkvmerge / Stereo mode flag for video tracks / in(AVI)"
end
def run
2011-04-25 18:51:02 +00:00
merge tmp + "-1",
2011-01-19 09:18:22 +00:00
"-A --stereo-mode 0:mono data/avi/v.avi " +
"-A --stereo-mode 0:side_by_side_left_first data/avi/v.avi " +
"-A --stereo-mode 0:top_bottom_right_first data/avi/v.avi " +
2011-04-25 18:51:02 +00:00
"-A --stereo-mode 0:top_bottom_left_first data/avi/v.avi "
error "First merge failed" if !FileTest.exist? tmp + "-1"
2011-04-25 18:51:02 +00:00
hash = [ hash_file(tmp + "-1") ]
2011-04-25 18:51:02 +00:00
merge tmp + "-2",
"--stereo-mode 3:mono --stereo-mode 2:side_by_side_left_first " +
"--stereo-mode 1:top_bottom_right_first --stereo-mode 0:top_bottom_left_first #{tmp}-1"
2011-04-25 18:51:02 +00:00
error "Second merge failed" if !FileTest.exist? tmp + "-2"
2011-04-25 18:51:02 +00:00
hash << hash_file(tmp + "-2")
2011-04-25 18:51:02 +00:00
merge tmp + "-3", tmp + "-2"
error "Third merge failed" if !FileTest.exist? tmp + "-3"
2011-04-25 18:51:02 +00:00
hash << hash_file(tmp + "-3")
merge tmp + "-4", "-A --stereo-mode 0:mono data/avi/v.avi"
error "Fourth merge failed" if !FileTest.exist? tmp + "-4"
hash << hash_file(tmp + "-4")
2011-04-25 18:51:02 +00:00
hash.join"-"
end
end