Initila Import
This commit is contained in:
commit
11345d6367
17 changed files with 773 additions and 0 deletions
BIN
tests/files/Test.ogv
Normal file
BIN
tests/files/Test.ogv
Normal file
Binary file not shown.
92
tests/src/FFMpeg/FFMpegTest.php
Normal file
92
tests/src/FFMpeg/FFMpegTest.php
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
<?php
|
||||
|
||||
namespace FFMpeg;
|
||||
|
||||
class FFMpegTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @var FFMpeg
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* @covers FFMpeg\FFMpeg::open
|
||||
* @todo Implement testOpen().
|
||||
*/
|
||||
public function testOpen()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FFMpeg\FFMpeg::extractImage
|
||||
* @todo Implement testExtractImage().
|
||||
*/
|
||||
public function testExtractImage()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FFMpeg\FFMpeg::encode
|
||||
*/
|
||||
public function testEncodeWebm()
|
||||
{
|
||||
$ffprobe = FFProbe::load();
|
||||
|
||||
$dest = __DIR__ . '/../../files/encode_test.webm';
|
||||
|
||||
$ffmpeg = FFMpeg::load(new \Monolog\Logger('test'));
|
||||
$ffmpeg->open(__DIR__ . '/../../files/Test.ogv');
|
||||
$ffmpeg->encode(new Format\WebM(32, 32), $dest);
|
||||
|
||||
$ffprobe->probeFormat($dest);
|
||||
|
||||
unlink($dest);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FFMpeg\FFMpeg::encode
|
||||
*/
|
||||
public function testEncodeOgg()
|
||||
{
|
||||
$ffprobe = FFProbe::load();
|
||||
|
||||
$dest = __DIR__ . '/../../files/encode_test.ogv';
|
||||
|
||||
$ffmpeg = FFMpeg::load(new \Monolog\Logger('test'));
|
||||
$ffmpeg->open(__DIR__ . '/../../files/Test.ogv');
|
||||
$ffmpeg->encode(new Format\Ogg(32, 32), $dest);
|
||||
|
||||
$ffprobe->probeFormat($dest);
|
||||
|
||||
unlink($dest);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FFMpeg\FFMpeg::encode
|
||||
*/
|
||||
public function testEncodeX264()
|
||||
{
|
||||
|
||||
$ffprobe = FFProbe::load();
|
||||
|
||||
$dest = __DIR__ . '/../../files/encode_test.mp4';
|
||||
|
||||
$ffmpeg = FFMpeg::load(new \Monolog\Logger('test'));
|
||||
$ffmpeg->open(__DIR__ . '/../../files/Test.ogv');
|
||||
$ffmpeg->encode(new Format\X264(32, 32), $dest);
|
||||
|
||||
$ffprobe->probeFormat($dest);
|
||||
|
||||
unlink($dest);
|
||||
}
|
||||
|
||||
}
|
||||
68
tests/src/FFMpeg/FFProbeTest.php
Normal file
68
tests/src/FFMpeg/FFProbeTest.php
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
|
||||
namespace FFMpeg;
|
||||
|
||||
class FFProbeTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @covers FFMpeg\FFProbe::probeFormat
|
||||
* @todo Implement testProbeFormat().
|
||||
*/
|
||||
public function testProbeFormat()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FFMpeg\FFProbe::probeStreams
|
||||
* @todo Implement testProbeStreams().
|
||||
*/
|
||||
public function testProbeStreams()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FFMpeg\FFProbe::probeFrames
|
||||
* @todo Implement testProbeFrames().
|
||||
*/
|
||||
public function testProbeFrames()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FFMpeg\FFProbe::probePackets
|
||||
* @todo Implement testProbePackets().
|
||||
*/
|
||||
public function testProbePackets()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FFMpeg\FFProbe::probeErrors
|
||||
* @todo Implement testProbeErrors().
|
||||
*/
|
||||
public function testProbeErrors()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue