comparison range_mp4.t @ 390:7a65ebfdb02e

Tests: skip mp4 if ffmpeg does not support lavfi format.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 11 Apr 2014 17:24:34 +0400
parents 0d9aaa1c01ea
children 847ea345becb
comparison
equal deleted inserted replaced
389:c24d1c0b4c73 390:7a65ebfdb02e
20 ############################################################################### 20 ###############################################################################
21 21
22 select STDERR; $| = 1; 22 select STDERR; $| = 1;
23 select STDOUT; $| = 1; 23 select STDOUT; $| = 1;
24 24
25 my $t = Test::Nginx->new()->has(qw/http mp4/)->has_daemon('ffmpeg')->plan(13); 25 my $t = Test::Nginx->new()->has(qw/http mp4/)->has_daemon('ffmpeg');
26 26
27 $t->write_file_expand('nginx.conf', <<'EOF'); 27 $t->write_file_expand('nginx.conf', <<'EOF');
28 28
29 %%TEST_GLOBALS%% 29 %%TEST_GLOBALS%%
30 30
45 } 45 }
46 } 46 }
47 47
48 EOF 48 EOF
49 49
50 plan(skip_all => 'no lavfi')
51 unless grep /lavfi/, `ffmpeg -loglevel quiet -formats`;
50 system('ffmpeg -loglevel quiet -y ' 52 system('ffmpeg -loglevel quiet -y '
51 . '-f lavfi -i testsrc=duration=10:size=320x200:rate=15 ' 53 . '-f lavfi -i testsrc=duration=10:size=320x200:rate=15 '
52 . "-pix_fmt yuv420p -c:v libx264 ${\($t->testdir())}/test.mp4") == 0 54 . "-pix_fmt yuv420p -c:v libx264 ${\($t->testdir())}/test.mp4") == 0
53 or die "Can't create mp4 file: $!"; 55 or die "Can't create mp4 file: $!";
54 56
55 $t->run(); 57 $t->run()->plan(13);
56 58
57 ############################################################################### 59 ###############################################################################
58 60
59 # simply ensure that mp4 start argument works, we rely on this in range tests 61 # simply ensure that mp4 start argument works, we rely on this in range tests
60 62