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;
|
||||
|
||||
use Doctrine\Common\Cache\ArrayCache;
|
||||
use FFMpeg\FFMpeg;
|
||||
use FFMpeg\FFProbe;
|
||||
use Silex\Application;
|
||||
use Silex\ServiceProviderInterface;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
namespace FFMpeg\Filters\Audio;
|
||||
|
||||
use FFMpeg\Media\Audio;
|
||||
use FFMpeg\Filters\Audio\AudioResamplableFilter;
|
||||
|
||||
class AudioFilters
|
||||
{
|
||||
|
|
|
|||
|
|
@ -93,15 +93,15 @@ abstract class DefaultAudio extends EventEmitter implements AudioInterface, Prog
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getAudioChannels()
|
||||
{
|
||||
return $this->audioChannels;
|
||||
}
|
||||
public function getAudioChannels()
|
||||
{
|
||||
return $this->audioChannels;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Sets the channels value.
|
||||
*
|
||||
* @param integer $channels
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ namespace FFMpeg\Media;
|
|||
use FFMpeg\Driver\FFMpegDriver;
|
||||
use FFMpeg\FFProbe;
|
||||
use FFMpeg\Filters\FiltersCollection;
|
||||
use FFMpeg\Media\MediaTypeInterface;
|
||||
|
||||
abstract class AbstractMediaType implements MediaTypeInterface
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ use FFMpeg\Driver\FFMpegDriver;
|
|||
use FFMpeg\FFProbe;
|
||||
use FFMpeg\Exception\RuntimeException;
|
||||
use FFMpeg\Coordinate\TimeCode;
|
||||
use FFMpeg\Media\Video;
|
||||
|
||||
class Frame extends AbstractMediaType
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ use FFMpeg\Format\FormatInterface;
|
|||
use FFMpeg\Format\ProgressableInterface;
|
||||
use FFMpeg\Format\AudioInterface;
|
||||
use FFMpeg\Format\VideoInterface;
|
||||
use FFMpeg\Media\Frame;
|
||||
use Neutron\TemporaryFilesystem\Manager as FsManager;
|
||||
|
||||
class Video extends Audio
|
||||
|
|
@ -69,12 +68,12 @@ class Video extends Audio
|
|||
if ($this->driver->getConfiguration()->has('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()) {
|
||||
$filters->add(new SimpleFilter(array('-vcodec', $format->getVideoCodec())));
|
||||
}
|
||||
}
|
||||
if ($format instanceOf AudioInterface) {
|
||||
if ($format instanceof AudioInterface) {
|
||||
if (null !== $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));
|
||||
}
|
||||
|
||||
if ($format instanceOf VideoInterface) {
|
||||
if ($format instanceof VideoInterface) {
|
||||
$commands[] = '-b:v';
|
||||
$commands[] = $format->getKiloBitrate() . 'k';
|
||||
$commands[] = '-refs';
|
||||
|
|
@ -109,15 +108,15 @@ class Video extends Audio
|
|||
$commands[] = '1';
|
||||
}
|
||||
|
||||
if ($format instanceOf AudioInterface) {
|
||||
if ($format instanceof AudioInterface) {
|
||||
if (null !== $format->getAudioKiloBitrate()) {
|
||||
$commands[] = '-b:a';
|
||||
$commands[] = $format->getAudioKiloBitrate() . 'k';
|
||||
}
|
||||
if (null !== $format->getAudioChannels()) {
|
||||
$commands[] = '-ac';
|
||||
$commands[] = $format->getAudioChannels();
|
||||
}
|
||||
if (null !== $format->getAudioChannels()) {
|
||||
$commands[] = '-ac';
|
||||
$commands[] = $format->getAudioChannels();
|
||||
}
|
||||
}
|
||||
|
||||
$fs = FsManager::create();
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@
|
|||
namespace FFMpeg\Tests;
|
||||
|
||||
use FFMpeg\FFMpeg;
|
||||
use FFMpeg\Tests\TestCase;
|
||||
use FFMpeg\FFProbe\DataMapping\StreamCollection;
|
||||
use FFMpeg\FFProbe\DataMapping\Stream;
|
||||
|
||||
class FFMpegTest Extends TestCase
|
||||
class FFMpegTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @expectedException \FFMpeg\Exception\RuntimeException
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace FFMpeg\Tests;
|
||||
|
||||
use FFMpeg\Tests\TestCase;
|
||||
use FFMpeg\FFProbe;
|
||||
use Symfony\Component\Process\ExecutableFinder;
|
||||
use Alchemy\BinaryDriver\ConfigurationInterface;
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ class AudioTest extends AbstractStreamableTestCase
|
|||
$audioFormat->expects($this->any())
|
||||
->method('getAudioKiloBitrate')
|
||||
->will($this->returnValue(664));
|
||||
$audioFormat->expects($this->any())
|
||||
$audioFormat->expects($this->any())
|
||||
->method('getAudioChannels')
|
||||
->will($this->returnValue(5));
|
||||
$audioFormat->expects($this->any())
|
||||
|
|
@ -244,21 +244,21 @@ class AudioTest extends AbstractStreamableTestCase
|
|||
'-y', '-i', __FILE__,
|
||||
'-acodec', 'patati-patata-audio',
|
||||
'-b:a', '664k',
|
||||
'-ac', '5',
|
||||
'-ac', '5',
|
||||
'/target/file',
|
||||
), null, $audioFormat),
|
||||
array(false, array(
|
||||
'-y', '-i', __FILE__,
|
||||
'extra', 'param',
|
||||
'-b:a', '665k',
|
||||
'-ac', '5',
|
||||
'-ac', '5',
|
||||
'/target/file',
|
||||
), null, $formatExtra),
|
||||
array(true, array(
|
||||
'-y', '-i', __FILE__,
|
||||
'-threads', 24,
|
||||
'-b:a', '663k',
|
||||
'-ac', '5',
|
||||
'-ac', '5',
|
||||
'/target/file',
|
||||
), null, $format),
|
||||
array(true, array(
|
||||
|
|
@ -266,20 +266,20 @@ class AudioTest extends AbstractStreamableTestCase
|
|||
'extra', 'param',
|
||||
'-threads', 24,
|
||||
'-b:a', '665k',
|
||||
'-ac', '5',
|
||||
'-ac', '5',
|
||||
'/target/file',
|
||||
), null, $formatExtra),
|
||||
array(false, array(
|
||||
'-y', '-i', __FILE__,
|
||||
'-b:a', '666k',
|
||||
'-ac', '5',
|
||||
'-ac', '5',
|
||||
'/target/file',
|
||||
), $listeners, $progressableFormat),
|
||||
array(true, array(
|
||||
'-y', '-i', __FILE__,
|
||||
'-threads', 24,
|
||||
'-b:a', '666k',
|
||||
'-ac', '5',
|
||||
'-ac', '5',
|
||||
'/target/file',
|
||||
), $listeners, $progressableFormat),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue