Merge branch '0.4'
This commit is contained in:
commit
580421ab5f
13 changed files with 29 additions and 21 deletions
|
|
@ -1,6 +1,10 @@
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
* 0.4.4 (12-17-2013)
|
||||||
|
|
||||||
|
* Fix width / height dimensions extraction.
|
||||||
|
|
||||||
* 0.4.3 (12-02-2013)
|
* 0.4.3 (12-02-2013)
|
||||||
|
|
||||||
* Fix using rotate and resize filters at the same time (#78)
|
* Fix using rotate and resize filters at the same time (#78)
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class FFMpegServiceProvider implements ServiceProviderInterface
|
||||||
return array_replace($app['ffmpeg.default.configuration'], $app['ffmpeg.configuration']);
|
return array_replace($app['ffmpeg.default.configuration'], $app['ffmpeg.configuration']);
|
||||||
});
|
});
|
||||||
|
|
||||||
$app['ffmpeg'] = $app['ffmpeg.ffmpeg'] = $app->share(function(Application $app) {
|
$app['ffmpeg'] = $app['ffmpeg.ffmpeg'] = $app->share(function (Application $app) {
|
||||||
$configuration = $app['ffmpeg.configuration.build'];
|
$configuration = $app['ffmpeg.configuration.build'];
|
||||||
|
|
||||||
if (isset($configuration['ffmpeg.timeout'])) {
|
if (isset($configuration['ffmpeg.timeout'])) {
|
||||||
|
|
@ -49,7 +49,7 @@ class FFMpegServiceProvider implements ServiceProviderInterface
|
||||||
return new ArrayCache();
|
return new ArrayCache();
|
||||||
});
|
});
|
||||||
|
|
||||||
$app['ffmpeg.ffprobe'] = $app->share(function(Application $app) {
|
$app['ffmpeg.ffprobe'] = $app->share(function (Application $app) {
|
||||||
$configuration = $app['ffmpeg.configuration.build'];
|
$configuration = $app['ffmpeg.configuration.build'];
|
||||||
|
|
||||||
if (isset($configuration['ffmpeg.timeout'])) {
|
if (isset($configuration['ffmpeg.timeout'])) {
|
||||||
|
|
|
||||||
|
|
@ -53,8 +53,8 @@ abstract class AbstractData implements \Countable
|
||||||
/**
|
/**
|
||||||
* Sets the property value given its name.
|
* Sets the property value given its name.
|
||||||
*
|
*
|
||||||
* @param string $property
|
* @param string $property
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
*
|
*
|
||||||
* @return AbstractData
|
* @return AbstractData
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,9 @@ class Stream extends AbstractData
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null !== $displayRatio && null !== $sampleRatio) {
|
if (null !== $displayRatio && null !== $sampleRatio) {
|
||||||
$width = round($width / $sampleRatio[0] * $sampleRatio[1] * $displayRatio[0] / $displayRatio[1]);
|
if ($sampleRatio[0] !== 1 && $sampleRatio[1] !== 1) {
|
||||||
|
$width = round($width / $sampleRatio[0] * $sampleRatio[1] * $displayRatio[0] / $displayRatio[1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Dimension($width, $height);
|
return new Dimension($width, $height);
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ namespace FFMpeg\Filters\Video;
|
||||||
|
|
||||||
use FFMpeg\Coordinate\Dimension;
|
use FFMpeg\Coordinate\Dimension;
|
||||||
use FFMpeg\Exception\InvalidArgumentException;
|
use FFMpeg\Exception\InvalidArgumentException;
|
||||||
use FFMpeg\Exception\RuntimeException;
|
|
||||||
use FFMpeg\Media\Video;
|
use FFMpeg\Media\Video;
|
||||||
use FFMpeg\Format\VideoInterface;
|
use FFMpeg\Format\VideoInterface;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
namespace FFMpeg\Media;
|
namespace FFMpeg\Media;
|
||||||
|
|
||||||
use FFMpeg\Driver\FFMpegDriver;
|
use FFMpeg\Driver\FFMpegDriver;
|
||||||
use FFMpeg\Exception\InvalidArgumentException;
|
|
||||||
use FFMpeg\FFProbe;
|
use FFMpeg\FFProbe;
|
||||||
use FFMpeg\Filters\FiltersCollection;
|
use FFMpeg\Filters\FiltersCollection;
|
||||||
use FFMpeg\Media\MediaTypeInterface;
|
use FFMpeg\Media\MediaTypeInterface;
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,12 @@ class StreamTest extends TestCase
|
||||||
$this->assertEquals(new Dimension(1280, 720), $stream->getDimensions());
|
$this->assertEquals(new Dimension(1280, 720), $stream->getDimensions());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testGetDimensionsFromVideoWith11SampleRatio()
|
||||||
|
{
|
||||||
|
$stream = new Stream(array('codec_type' => 'video', 'width' => 1920, 'height' => 1080, 'sample_aspect_ratio' => '1:1', 'display_aspect_ratio' => '16:9'));
|
||||||
|
$this->assertEquals(new Dimension(1920, 1080), $stream->getDimensions());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider provideInvalidRatios
|
* @dataProvider provideInvalidRatios
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ namespace FFMpeg\Tests\Media;
|
||||||
|
|
||||||
use FFMpeg\Media\Audio;
|
use FFMpeg\Media\Audio;
|
||||||
use Alchemy\BinaryDriver\Exception\ExecutionFailureException;
|
use Alchemy\BinaryDriver\Exception\ExecutionFailureException;
|
||||||
use FFMpeg\Format\ProgressableInterface;
|
|
||||||
use FFMpeg\Format\AudioInterface;
|
use FFMpeg\Format\AudioInterface;
|
||||||
|
|
||||||
class AudioTest extends AbstractStreamableTestCase
|
class AudioTest extends AbstractStreamableTestCase
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ namespace FFMpeg\Tests\Media;
|
||||||
|
|
||||||
use FFMpeg\Media\Video;
|
use FFMpeg\Media\Video;
|
||||||
use Alchemy\BinaryDriver\Exception\ExecutionFailureException;
|
use Alchemy\BinaryDriver\Exception\ExecutionFailureException;
|
||||||
use FFMpeg\Format\ProgressableInterface;
|
|
||||||
use FFMpeg\Format\VideoInterface;
|
use FFMpeg\Format\VideoInterface;
|
||||||
|
|
||||||
class VideoTest extends AbstractStreamableTestCase
|
class VideoTest extends AbstractStreamableTestCase
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue