-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deleted old test cases.
- Loading branch information
Chung Leong
committed
May 5, 2014
1 parent
4fe8f44
commit 6055ecf
Showing
16 changed files
with
260 additions
and
638 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,25 @@ | ||
--TEST-- | ||
Animated gif test | ||
Animated GIF test | ||
--SKIPIF-- | ||
<?php | ||
if(!function_exists('imagecreatetruecolor')) print 'skip GD not available'; | ||
if(!in_array('gif', av_get_encoders())) print 'skip GIF encoder not avilable'; | ||
?> | ||
--FILE-- | ||
<?php | ||
|
||
$folder = dirname(__FILE__); | ||
$image = imagecreatetruecolor(852 / 4, 480 / 4); | ||
$file_in = av_file_open("$folder/source-code.mkv", "r"); | ||
$file_out = av_file_open("$folder/source-code-output.gif", "w"); | ||
|
||
$v_strm_in = av_stream_open($file_in, "video"); | ||
$v_strm_out = av_stream_open($file_out, "video", array( "width" => imagesx($image), "height" => imagesy($image))); | ||
|
||
if(!$file_in || !$file_out || !$v_strm_in || !$v_strm_out) { | ||
die(); | ||
} | ||
require("helpers.php"); | ||
|
||
$v_time = 0; | ||
while(!av_file_eof($file_in)) { | ||
if(av_stream_read_image($v_strm_in, $image, $v_time)) { | ||
av_stream_write_image($v_strm_out, $image, $v_time); | ||
} | ||
if($v_time > 8) { | ||
break; | ||
} | ||
} | ||
|
||
av_stream_close($v_strm_out); | ||
av_file_close($file_out); | ||
$folder = dirname(__FILE__); | ||
$filename = "test.gif"; | ||
|
||
av_stream_close($v_strm_in); | ||
av_file_close($file_in); | ||
$testVideo = new TestVideo("$folder/$filename", 640, 480, 24, 5.0, true, false); | ||
$testVideo->create(); | ||
$testVideo->verify(); | ||
$testVideo->delete(); | ||
|
||
echo filesize("$folder/source-code-output.gif"); | ||
echo "OK\n"; | ||
|
||
?> | ||
--EXPECTREGEX-- | ||
\d{7,8} | ||
--EXPECT-- | ||
OK |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.