checkstyle by php-cs-fixer
This commit is contained in:
parent
7004e53399
commit
ac767875a6
9 changed files with 22 additions and 30 deletions
|
|
@ -12,8 +12,6 @@
|
||||||
namespace FFMpeg;
|
namespace FFMpeg;
|
||||||
|
|
||||||
use Doctrine\Common\Cache\ArrayCache;
|
use Doctrine\Common\Cache\ArrayCache;
|
||||||
use FFMpeg\FFMpeg;
|
|
||||||
use FFMpeg\FFProbe;
|
|
||||||
use Silex\Application;
|
use Silex\Application;
|
||||||
use Silex\ServiceProviderInterface;
|
use Silex\ServiceProviderInterface;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
namespace FFMpeg\Filters\Audio;
|
namespace FFMpeg\Filters\Audio;
|
||||||
|
|
||||||
use FFMpeg\Media\Audio;
|
use FFMpeg\Media\Audio;
|
||||||
use FFMpeg\Filters\Audio\AudioResamplableFilter;
|
|
||||||
|
|
||||||
class AudioFilters
|
class AudioFilters
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ namespace FFMpeg\Media;
|
||||||
use FFMpeg\Driver\FFMpegDriver;
|
use FFMpeg\Driver\FFMpegDriver;
|
||||||
use FFMpeg\FFProbe;
|
use FFMpeg\FFProbe;
|
||||||
use FFMpeg\Filters\FiltersCollection;
|
use FFMpeg\Filters\FiltersCollection;
|
||||||
use FFMpeg\Media\MediaTypeInterface;
|
|
||||||
|
|
||||||
abstract class AbstractMediaType implements MediaTypeInterface
|
abstract class AbstractMediaType implements MediaTypeInterface
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ use FFMpeg\Driver\FFMpegDriver;
|
||||||
use FFMpeg\FFProbe;
|
use FFMpeg\FFProbe;
|
||||||
use FFMpeg\Exception\RuntimeException;
|
use FFMpeg\Exception\RuntimeException;
|
||||||
use FFMpeg\Coordinate\TimeCode;
|
use FFMpeg\Coordinate\TimeCode;
|
||||||
use FFMpeg\Media\Video;
|
|
||||||
|
|
||||||
class Frame extends AbstractMediaType
|
class Frame extends AbstractMediaType
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ use FFMpeg\Format\FormatInterface;
|
||||||
use FFMpeg\Format\ProgressableInterface;
|
use FFMpeg\Format\ProgressableInterface;
|
||||||
use FFMpeg\Format\AudioInterface;
|
use FFMpeg\Format\AudioInterface;
|
||||||
use FFMpeg\Format\VideoInterface;
|
use FFMpeg\Format\VideoInterface;
|
||||||
use FFMpeg\Media\Frame;
|
|
||||||
use Neutron\TemporaryFilesystem\Manager as FsManager;
|
use Neutron\TemporaryFilesystem\Manager as FsManager;
|
||||||
|
|
||||||
class Video extends Audio
|
class Video extends Audio
|
||||||
|
|
@ -69,12 +68,12 @@ class Video extends Audio
|
||||||
if ($this->driver->getConfiguration()->has('ffmpeg.threads')) {
|
if ($this->driver->getConfiguration()->has('ffmpeg.threads')) {
|
||||||
$filters->add(new SimpleFilter(array('-threads', $this->driver->getConfiguration()->get('ffmpeg.threads'))));
|
$filters->add(new SimpleFilter(array('-threads', $this->driver->getConfiguration()->get('ffmpeg.threads'))));
|
||||||
}
|
}
|
||||||
if ($format instanceOf VideoInterface) {
|
if ($format instanceof VideoInterface) {
|
||||||
if (null !== $format->getVideoCodec()) {
|
if (null !== $format->getVideoCodec()) {
|
||||||
$filters->add(new SimpleFilter(array('-vcodec', $format->getVideoCodec())));
|
$filters->add(new SimpleFilter(array('-vcodec', $format->getVideoCodec())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($format instanceOf AudioInterface) {
|
if ($format instanceof AudioInterface) {
|
||||||
if (null !== $format->getAudioCodec()) {
|
if (null !== $format->getAudioCodec()) {
|
||||||
$filters->add(new SimpleFilter(array('-acodec', $format->getAudioCodec())));
|
$filters->add(new SimpleFilter(array('-acodec', $format->getAudioCodec())));
|
||||||
}
|
}
|
||||||
|
|
@ -84,7 +83,7 @@ class Video extends Audio
|
||||||
$commands = array_merge($commands, $filter->apply($this, $format));
|
$commands = array_merge($commands, $filter->apply($this, $format));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($format instanceOf VideoInterface) {
|
if ($format instanceof VideoInterface) {
|
||||||
$commands[] = '-b:v';
|
$commands[] = '-b:v';
|
||||||
$commands[] = $format->getKiloBitrate() . 'k';
|
$commands[] = $format->getKiloBitrate() . 'k';
|
||||||
$commands[] = '-refs';
|
$commands[] = '-refs';
|
||||||
|
|
@ -109,7 +108,7 @@ class Video extends Audio
|
||||||
$commands[] = '1';
|
$commands[] = '1';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($format instanceOf AudioInterface) {
|
if ($format instanceof AudioInterface) {
|
||||||
if (null !== $format->getAudioKiloBitrate()) {
|
if (null !== $format->getAudioKiloBitrate()) {
|
||||||
$commands[] = '-b:a';
|
$commands[] = '-b:a';
|
||||||
$commands[] = $format->getAudioKiloBitrate() . 'k';
|
$commands[] = $format->getAudioKiloBitrate() . 'k';
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,10 @@
|
||||||
namespace FFMpeg\Tests;
|
namespace FFMpeg\Tests;
|
||||||
|
|
||||||
use FFMpeg\FFMpeg;
|
use FFMpeg\FFMpeg;
|
||||||
use FFMpeg\Tests\TestCase;
|
|
||||||
use FFMpeg\FFProbe\DataMapping\StreamCollection;
|
use FFMpeg\FFProbe\DataMapping\StreamCollection;
|
||||||
use FFMpeg\FFProbe\DataMapping\Stream;
|
use FFMpeg\FFProbe\DataMapping\Stream;
|
||||||
|
|
||||||
class FFMpegTest Extends TestCase
|
class FFMpegTest extends TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @expectedException \FFMpeg\Exception\RuntimeException
|
* @expectedException \FFMpeg\Exception\RuntimeException
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace FFMpeg\Tests;
|
namespace FFMpeg\Tests;
|
||||||
|
|
||||||
use FFMpeg\Tests\TestCase;
|
|
||||||
use FFMpeg\FFProbe;
|
use FFMpeg\FFProbe;
|
||||||
use Symfony\Component\Process\ExecutableFinder;
|
use Symfony\Component\Process\ExecutableFinder;
|
||||||
use Alchemy\BinaryDriver\ConfigurationInterface;
|
use Alchemy\BinaryDriver\ConfigurationInterface;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue