This commit is contained in:
Romain Neutron 2012-05-25 15:44:43 +02:00
commit 0b74d0c30c
12 changed files with 36 additions and 37 deletions

View file

@ -31,8 +31,8 @@ abstract class Binary implements AdapterInterface
/** /**
* Binary constructor * Binary constructor
* *
* @param type $binary The path file to the binary * @param type $binary The path file to the binary
* @param \Monolog\Logger $logger A logger * @param \Monolog\Logger $logger A logger
*/ */
public function __construct($binary, \Monolog\Logger $logger = null) public function __construct($binary, \Monolog\Logger $logger = null)
{ {
@ -49,8 +49,8 @@ abstract class Binary implements AdapterInterface
/** /**
* Load the static binary * Load the static binary
* *
* @param \Monolog\Logger $logger A logger * @param \Monolog\Logger $logger A logger
* @return \FFMpeg\Binary The binary * @return \FFMpeg\Binary The binary
* @throws Exception\BinaryNotFoundException * @throws Exception\BinaryNotFoundException
*/ */
public static function load(\Monolog\Logger $logger = null) public static function load(\Monolog\Logger $logger = null)

View file

@ -25,7 +25,7 @@ class FFMpeg extends Binary
/** /**
* Opens a file in order to be processed * Opens a file in order to be processed
* *
* @param string $pathfile * @param string $pathfile
* @return \FFMpeg\FFMpeg * @return \FFMpeg\FFMpeg
* @throws Exception\InvalidFileArgumentException * @throws Exception\InvalidFileArgumentException
*/ */
@ -58,8 +58,8 @@ class FFMpeg extends Binary
/** /**
* *
* @param int $time The time in second where to take the snapshot * @param integer $time The time in second where to take the snapshot
* @param string $output The pathfile where to write * @param string $output The pathfile where to write
* @return \FFMpeg\FFMpeg * @return \FFMpeg\FFMpeg
* @throws Exception\RuntimeException * @throws Exception\RuntimeException
* @throws Exception\LogicException * @throws Exception\LogicException
@ -101,9 +101,9 @@ class FFMpeg extends Binary
/** /**
* Encode the file to the specified format * Encode the file to the specified format
* *
* @param Format\AudioFormat $format The output format * @param Format\AudioFormat $format The output format
* @param string $outputPathfile The pathfile where to write * @param string $outputPathfile The pathfile where to write
* @param int $threads The number of threads to use * @param integer $threads The number of threads to use
* @return \FFMpeg\FFMpeg * @return \FFMpeg\FFMpeg
* @throws Exception\RuntimeException * @throws Exception\RuntimeException
* @throws Exception\LogicException * @throws Exception\LogicException
@ -132,9 +132,9 @@ class FFMpeg extends Binary
/** /**
* Encode to audio * Encode to audio
* *
* @param Format\AudioFormat $format The output format * @param Format\AudioFormat $format The output format
* @param string $outputPathfile The pathfile where to write * @param string $outputPathfile The pathfile where to write
* @param int $threads The number of threads to use * @param integer $threads The number of threads to use
* @return \FFMpeg\FFMpeg * @return \FFMpeg\FFMpeg
* @throws Exception\RuntimeException * @throws Exception\RuntimeException
*/ */
@ -168,9 +168,9 @@ class FFMpeg extends Binary
/** /**
* Encode to video * Encode to video
* *
* @param Format\VideoFormat $format The output format * @param Format\VideoFormat $format The output format
* @param string $outputPathfile The pathfile where to write * @param string $outputPathfile The pathfile where to write
* @param int $threads The number of threads to use * @param integer $threads The number of threads to use
* @return \FFMpeg\FFMpeg * @return \FFMpeg\FFMpeg
* @throws Exception\RuntimeException * @throws Exception\RuntimeException
*/ */
@ -192,7 +192,6 @@ class FFMpeg extends Binary
. ' -trellis 1 -qscale 1 ' . ' -trellis 1 -qscale 1 '
. '-acodec ' . $format->getAudioCodec() . ' -ab 92k '; . '-acodec ' . $format->getAudioCodec() . ' -ab 92k ';
$tmpFile = new \SplFileInfo(tempnam(sys_get_temp_dir(), 'temp') . '.' . pathinfo($outputPathfile, PATHINFO_EXTENSION)); $tmpFile = new \SplFileInfo(tempnam(sys_get_temp_dir(), 'temp') . '.' . pathinfo($outputPathfile, PATHINFO_EXTENSION));
$passes = array(); $passes = array();

View file

@ -24,7 +24,7 @@ class FFProbe extends Binary
/** /**
* Probe the format of a given file * Probe the format of a given file
* *
* @param string $pathfile * @param string $pathfile
* @return string * @return string
* @throws Exception\InvalidFileArgumentException * @throws Exception\InvalidFileArgumentException
* @throws Exception\RuntimeException * @throws Exception\RuntimeException
@ -43,7 +43,7 @@ class FFProbe extends Binary
/** /**
* Probe the streams contained in a given file * Probe the streams contained in a given file
* *
* @param string $pathfile * @param string $pathfile
* @return string * @return string
* @throws Exception\InvalidFileArgumentException * @throws Exception\InvalidFileArgumentException
* @throws Exception\RuntimeException * @throws Exception\RuntimeException
@ -61,7 +61,7 @@ class FFProbe extends Binary
/** /**
* *
* @param string $command * @param string $command
* @return string * @return string
* @throws Exception\RuntimeException * @throws Exception\RuntimeException
*/ */

View file

@ -29,4 +29,4 @@ class Flac extends DefaultAudioFormat
{ {
return array('flac'); return array('flac');
} }
} }

View file

@ -29,4 +29,4 @@ class Mp3 extends DefaultAudioFormat
{ {
return array('libmp3lame'); return array('libmp3lame');
} }
} }

View file

@ -26,4 +26,4 @@ interface AudioFormat
* @return array * @return array
*/ */
public function getAvailableAudioCodecs(); public function getAvailableAudioCodecs();
} }

View file

@ -46,7 +46,7 @@ abstract class DefaultAudioFormat implements AudioFormat
* Set the audio codec, Should be in the available ones, otherwise an * Set the audio codec, Should be in the available ones, otherwise an
* exception is thrown * exception is thrown
* *
* @param string $audioCodec * @param string $audioCodec
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*/ */
public function setAudioCodec($audioCodec) public function setAudioCodec($audioCodec)
@ -74,7 +74,7 @@ abstract class DefaultAudioFormat implements AudioFormat
/** /**
* Set the audio sample rate * Set the audio sample rate
* *
* @param int $audioSampleRate * @param integer $audioSampleRate
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*/ */
public function setAudioSampleRate($audioSampleRate) public function setAudioSampleRate($audioSampleRate)
@ -99,7 +99,7 @@ abstract class DefaultAudioFormat implements AudioFormat
/** /**
* Set the kiloBitrate value * Set the kiloBitrate value
* *
* @param int $kiloBitrate * @param int integer $kiloBitrate
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*/ */
public function setKiloBitrate($kiloBitrate) public function setKiloBitrate($kiloBitrate)

View file

@ -53,8 +53,8 @@ abstract class DefaultVideoFormat extends DefaultAudioFormat implements VideoFor
/** /**
* Set the dimensions * Set the dimensions
* *
* @param int $width The heigth * @param integer $width The heigth
* @param int $height The width * @param integer $height The width
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*/ */
public function setDimensions($width, $height) public function setDimensions($width, $height)
@ -83,7 +83,7 @@ abstract class DefaultVideoFormat extends DefaultAudioFormat implements VideoFor
/** /**
* Set the framerate * Set the framerate
* *
* @param int $frameRate * @param integer $frameRate
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*/ */
public function setFrameRate($frameRate) public function setFrameRate($frameRate)
@ -109,7 +109,7 @@ abstract class DefaultVideoFormat extends DefaultAudioFormat implements VideoFor
* Set the video codec, Should be in the available ones, otherwise an * Set the video codec, Should be in the available ones, otherwise an
* exception is thrown * exception is thrown
* *
* @param string $videoCodec * @param string $videoCodec
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*/ */
public function setVideoCodec($videoCodec) public function setVideoCodec($videoCodec)
@ -137,7 +137,7 @@ abstract class DefaultVideoFormat extends DefaultAudioFormat implements VideoFor
/** /**
* Set the GOP size * Set the GOP size
* *
* @param int $GOPsize * @param integer $GOPsize
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*/ */
public function setGOPsize($GOPsize) public function setGOPsize($GOPsize)
@ -152,8 +152,8 @@ abstract class DefaultVideoFormat extends DefaultAudioFormat implements VideoFor
/** /**
* Returns the nearest multiple for a value * Returns the nearest multiple for a value
* *
* @param int $value * @param integer $value
* @param int $multiple * @param integer $multiple
* @return int * @return int
*/ */
protected function getMultiple($value, $multiple) protected function getMultiple($value, $multiple)

View file

@ -38,4 +38,4 @@ class Ogg extends DefaultVideoFormat
{ {
return array('libtheora'); return array('libtheora');
} }
} }

View file

@ -46,4 +46,4 @@ class WebM extends DefaultVideoFormat
{ {
return array('libvpx'); return array('libvpx');
} }
} }

View file

@ -38,4 +38,4 @@ class X264 extends DefaultVideoFormat
{ {
return array('libx264'); return array('libx264');
} }
} }

View file

@ -30,4 +30,4 @@ interface VideoFormat extends AudioFormat
* @return array * @return array
*/ */
public function getAvailableVideoCodecs(); public function getAvailableVideoCodecs();
} }