2006-11-07 15:11:49 +00:00
|
|
|
#!/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)"
|
2006-11-07 15:11:49 +00:00
|
|
|
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"
|
2006-11-07 15:11:49 +00:00
|
|
|
|
2011-04-25 18:51:02 +00:00
|
|
|
hash = [ hash_file(tmp + "-1") ]
|
2006-11-07 15:11:49 +00:00
|
|
|
|
2011-04-25 18:51:02 +00:00
|
|
|
merge tmp + "-2",
|
2011-12-11 12:58:41 +00:00
|
|
|
"--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"
|
2006-11-07 15:11:49 +00:00
|
|
|
|
2011-04-25 18:51:02 +00:00
|
|
|
hash << hash_file(tmp + "-2")
|
2006-11-07 15:11:49 +00:00
|
|
|
|
2011-04-25 18:51:02 +00:00
|
|
|
merge tmp + "-3", tmp + "-2"
|
|
|
|
error "Third merge failed" if !FileTest.exist? tmp + "-3"
|
2006-11-07 15:11:49 +00:00
|
|
|
|
2011-04-25 18:51:02 +00:00
|
|
|
hash << hash_file(tmp + "-3")
|
2006-11-07 15:11:49 +00:00
|
|
|
|
2011-04-25 18:53:56 +00:00
|
|
|
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"-"
|
2006-11-07 15:11:49 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|