Added the ComplexMedia type and the possibility to use -filter_complex and -map features. Added some built-in complex filters. Added the unit and functional tests of the new features. README.md has been updated.

This commit is contained in:
CaliforniaMountainSnake 2020-02-18 13:49:32 +03:00
commit f20ad8a82e
17 changed files with 1583 additions and 7 deletions

View file

@ -0,0 +1,35 @@
<?php
namespace Tests\FFMpeg\Unit\Media;
use FFMpeg\Media\ComplexMedia;
class ComplexMediaTest extends AbstractMediaTestCase
{
public function testGetInputs()
{
$driver = $this->getFFMpegDriverMock();
$ffprobe = $this->getFFProbeMock();
$complexMedia = new ComplexMedia(array(__FILE__, __FILE__), $driver, $ffprobe);
$this->assertSame(array(__FILE__, __FILE__), $complexMedia->getInputs());
}
public function testGetInputsCount()
{
$driver = $this->getFFMpegDriverMock();
$ffprobe = $this->getFFProbeMock();
$complexMedia = new ComplexMedia(array(__FILE__, __FILE__), $driver, $ffprobe);
$this->assertEquals(2, $complexMedia->getInputsCount());
}
public function testFiltersReturnFilters()
{
$driver = $this->getFFMpegDriverMock();
$ffprobe = $this->getFFProbeMock();
$complexMedia = new ComplexMedia(array(__FILE__, __FILE__), $driver, $ffprobe);
$this->assertInstanceOf('FFMpeg\Filters\ComplexMedia\ComplexFilters', $complexMedia->filters());
}
}