diff --git a/src/FFMpeg/Coordinate/AspectRatio.php b/src/FFMpeg/Coordinate/AspectRatio.php index a3c298a..294b8ca 100644 --- a/src/FFMpeg/Coordinate/AspectRatio.php +++ b/src/FFMpeg/Coordinate/AspectRatio.php @@ -74,7 +74,7 @@ class AspectRatio } /** - * Compute the best width for given height and modulus. + * Computes the best width for given height and modulus. * * @param Integer $height * @param Integer $modulus @@ -93,7 +93,7 @@ class AspectRatio } /** - * Compute the best height for given width and modulus. + * Computes the best height for given width and modulus. * * @param Integer $width * @param Integer $modulus diff --git a/src/FFMpeg/Coordinate/Dimension.php b/src/FFMpeg/Coordinate/Dimension.php index 15e448d..4103807 100644 --- a/src/FFMpeg/Coordinate/Dimension.php +++ b/src/FFMpeg/Coordinate/Dimension.php @@ -22,10 +22,9 @@ class Dimension private $height; /** - * Constructor - * * @param integer $width * @param integer $height + * * @throws InvalidArgumentException when one of the parameteres is invalid */ public function __construct($width, $height) @@ -39,7 +38,7 @@ class Dimension } /** - * Return width + * Returns width. * * @return width */ @@ -49,7 +48,7 @@ class Dimension } /** - * Return height + * Returns height. * * @return integer */ @@ -59,7 +58,7 @@ class Dimension } /** - * Get the ratio + * Returns the ratio. * * @param type $forceStandards Whether or not force the use of standards ratios; * diff --git a/src/FFMpeg/Coordinate/Point.php b/src/FFMpeg/Coordinate/Point.php index 2ee5c62..c0688e8 100644 --- a/src/FFMpeg/Coordinate/Point.php +++ b/src/FFMpeg/Coordinate/Point.php @@ -14,7 +14,7 @@ namespace FFMpeg\Coordinate; class Point { private $x; - private $Y; + private $y; public function __construct($x, $y) { diff --git a/src/FFMpeg/Coordinate/TimeCode.php b/src/FFMpeg/Coordinate/TimeCode.php index 14864cb..7ae7fdb 100644 --- a/src/FFMpeg/Coordinate/TimeCode.php +++ b/src/FFMpeg/Coordinate/TimeCode.php @@ -35,7 +35,7 @@ class TimeCode } /** - * Creates timecode from string + * Creates timecode from string. * * @param string $timecode * diff --git a/src/FFMpeg/Driver/FFProbeDriver.php b/src/FFMpeg/Driver/FFProbeDriver.php index 2a8fb32..00c4892 100644 --- a/src/FFMpeg/Driver/FFProbeDriver.php +++ b/src/FFMpeg/Driver/FFProbeDriver.php @@ -27,7 +27,7 @@ class FFProbeDriver extends AbstractBinary } /** - * Creates an FFProbeDriver + * Creates an FFProbeDriver. * * @param array|ConfigurationInterface $configuration * @param LoggerInterface $logger diff --git a/src/FFMpeg/FFMpeg.php b/src/FFMpeg/FFMpeg.php index 78acd4e..f619af7 100644 --- a/src/FFMpeg/FFMpeg.php +++ b/src/FFMpeg/FFMpeg.php @@ -33,7 +33,7 @@ class FFMpeg } /** - * Sets ffprobe + * Sets FFProbe. * * @param FFProbe * @@ -47,7 +47,7 @@ class FFMpeg } /** - * Gets FFProbe + * Gets FFProbe. * * @return FFProbe */ @@ -57,7 +57,7 @@ class FFMpeg } /** - * Sets ffmpeg driver + * Sets the ffmpeg driver. * * @return FFMpeg */ @@ -69,7 +69,7 @@ class FFMpeg } /** - * Gets the ffmpeg driver + * Gets the ffmpeg driver. * * @return FFMpegDriver */ @@ -79,7 +79,7 @@ class FFMpeg } /** - * Opens a file in order to be processed + * Opens a file in order to be processed. * * @param string $pathfile A pathfile * @@ -105,7 +105,7 @@ class FFMpeg } /** - * Creates a new FFMpeg instance + * Creates a new FFMpeg instance. * * @param array|ConfigurationInterface $configuration * @param LoggerInterface $logger diff --git a/src/FFMpeg/FFProbe.php b/src/FFMpeg/FFProbe.php index 1a9bbfd..3fbe660 100644 --- a/src/FFMpeg/FFProbe.php +++ b/src/FFMpeg/FFProbe.php @@ -154,7 +154,7 @@ class FFProbe /** * @api * - * Probe the format of a given file + * Probes the format of a given file. * * @param string $pathfile * @@ -171,7 +171,7 @@ class FFProbe /** * @api * - * Probe the streams contained in a given file + * Probes the streams contained in a given file. * * @param string $pathfile * diff --git a/src/FFMpeg/FFProbe/DataMapping/AbstractData.php b/src/FFMpeg/FFProbe/DataMapping/AbstractData.php index 5088b89..d35e2b6 100644 --- a/src/FFMpeg/FFProbe/DataMapping/AbstractData.php +++ b/src/FFMpeg/FFProbe/DataMapping/AbstractData.php @@ -23,7 +23,7 @@ abstract class AbstractData implements \Countable } /** - * Returns true if data has property + * Returns true if data has property. * * @param string $property * @return Boolean @@ -34,7 +34,7 @@ abstract class AbstractData implements \Countable } /** - * Returns the property value given its name + * Returns the property value given its name. * * @param string $property * @return mixed @@ -51,7 +51,7 @@ abstract class AbstractData implements \Countable } /** - * Returns all property names + * Returns all property names. * * @return array */ @@ -61,7 +61,7 @@ abstract class AbstractData implements \Countable } /** - * Returns all properties and their values + * Returns all properties and their values. * * @return array */ diff --git a/src/FFMpeg/FFProbe/DataMapping/Stream.php b/src/FFMpeg/FFProbe/DataMapping/Stream.php index d3a84c9..9b0d170 100644 --- a/src/FFMpeg/FFProbe/DataMapping/Stream.php +++ b/src/FFMpeg/FFProbe/DataMapping/Stream.php @@ -14,7 +14,7 @@ namespace FFMpeg\FFProbe\DataMapping; class Stream extends AbstractData { /** - * Returns true if the stream is an audio stream + * Returns true if the stream is an audio stream. * * @return Boolean */ @@ -24,7 +24,7 @@ class Stream extends AbstractData } /** - * Returns true if the stream is a video stream + * Returns true if the stream is a video stream. * * @return Boolean */ diff --git a/src/FFMpeg/FFProbe/DataMapping/StreamCollection.php b/src/FFMpeg/FFProbe/DataMapping/StreamCollection.php index bb730ee..409cf91 100644 --- a/src/FFMpeg/FFProbe/DataMapping/StreamCollection.php +++ b/src/FFMpeg/FFProbe/DataMapping/StreamCollection.php @@ -34,7 +34,7 @@ class StreamCollection implements \Countable, \IteratorAggregate } /** - * Adds a stream to the collection + * Adds a stream to the collection. * * @param Stream $stream * @@ -48,7 +48,7 @@ class StreamCollection implements \Countable, \IteratorAggregate } /** - * Returns a new StreamCollection with only video streams + * Returns a new StreamCollection with only video streams. * * @return StreamCollection */ @@ -60,7 +60,7 @@ class StreamCollection implements \Countable, \IteratorAggregate } /** - * Returns a new StreamCollection with only audio streams + * Returns a new StreamCollection with only audio streams. * * @return StreamCollection */ @@ -80,7 +80,7 @@ class StreamCollection implements \Countable, \IteratorAggregate } /** - * Returns the array of contained streams + * Returns the array of contained streams. * * @return array */ diff --git a/src/FFMpeg/FFProbe/MapperInterface.php b/src/FFMpeg/FFProbe/MapperInterface.php index a505784..dbd1312 100644 --- a/src/FFMpeg/FFProbe/MapperInterface.php +++ b/src/FFMpeg/FFProbe/MapperInterface.php @@ -14,7 +14,7 @@ namespace FFMpeg\FFProbe; interface MapperInterface { /** - * Maps data given its type + * Maps data given its type. * * @param string $type One of FFProbe::TYPE_* constant * @param string $data The data diff --git a/src/FFMpeg/FFProbe/OptionsTesterInterface.php b/src/FFMpeg/FFProbe/OptionsTesterInterface.php index b4d40e3..ab1f3de 100644 --- a/src/FFMpeg/FFProbe/OptionsTesterInterface.php +++ b/src/FFMpeg/FFProbe/OptionsTesterInterface.php @@ -14,7 +14,7 @@ namespace FFMpeg\FFProbe; interface OptionsTesterInterface { /** - * Tells if the given option is supported by ffprobe + * Tells if the given option is supported by ffprobe. * * @param string $name * diff --git a/src/FFMpeg/FFProbe/OutputParserInterface.php b/src/FFMpeg/FFProbe/OutputParserInterface.php index a179478..f220fce 100644 --- a/src/FFMpeg/FFProbe/OutputParserInterface.php +++ b/src/FFMpeg/FFProbe/OutputParserInterface.php @@ -14,7 +14,7 @@ namespace FFMpeg\FFProbe; interface OutputParserInterface { /** - * Parses ffprobe raw output + * Parses ffprobe raw output. * * @param string $type One of FFProbe::TYPE_* constant * @param string $data The data diff --git a/src/FFMpeg/Filters/Video/SynchronizeFilter.php b/src/FFMpeg/Filters/Video/SynchronizeFilter.php index f189d8f..748a191 100644 --- a/src/FFMpeg/Filters/Video/SynchronizeFilter.php +++ b/src/FFMpeg/Filters/Video/SynchronizeFilter.php @@ -14,8 +14,14 @@ namespace FFMpeg\Filters\Video; use FFMpeg\Format\VideoInterface; use FFMpeg\Media\Video; +/** + * Synchronizes audio and video in case of desynchronized movies. + */ class SynchronizeFilter implements VideoFilterInterface { + /** + * {@inheritdoc} + */ public function apply(Video $video, VideoInterface $format) { $streams = $video->getStreams(); diff --git a/src/FFMpeg/Filters/Video/VideoFilters.php b/src/FFMpeg/Filters/Video/VideoFilters.php index 393580b..1f31f93 100644 --- a/src/FFMpeg/Filters/Video/VideoFilters.php +++ b/src/FFMpeg/Filters/Video/VideoFilters.php @@ -25,7 +25,7 @@ class VideoFilters } /** - * Resizes a video to a given dimension + * Resizes a video to a given dimension. * * @param Dimension $dimension * @param string $mode diff --git a/src/FFMpeg/Filters/Video/VideoResampleFilter.php b/src/FFMpeg/Filters/Video/VideoResampleFilter.php index e35b87d..b27e9dd 100644 --- a/src/FFMpeg/Filters/Video/VideoResampleFilter.php +++ b/src/FFMpeg/Filters/Video/VideoResampleFilter.php @@ -27,7 +27,7 @@ class VideoResampleFilter implements VideoFilterInterface } /** - * Returns the frame rate + * Returns the frame rate. * * @return FrameRate */ @@ -37,7 +37,7 @@ class VideoResampleFilter implements VideoFilterInterface } /** - * Returns the GOP size + * Returns the GOP size. * * @see https://wikipedia.org/wiki/Group_of_pictures * diff --git a/src/FFMpeg/Format/Audio/DefaultAudio.php b/src/FFMpeg/Format/Audio/DefaultAudio.php index 2a3c653..a0002d1 100644 --- a/src/FFMpeg/Format/Audio/DefaultAudio.php +++ b/src/FFMpeg/Format/Audio/DefaultAudio.php @@ -45,7 +45,7 @@ abstract class DefaultAudio extends EventEmitter implements AudioInterface, Prog /** * Sets the audio codec, Should be in the available ones, otherwise an - * exception is thrown + * exception is thrown. * * @param string $audioCodec * @@ -74,7 +74,7 @@ abstract class DefaultAudio extends EventEmitter implements AudioInterface, Prog } /** - * Sets the kiloBitrate value + * Sets the kiloBitrate value. * * @param integer $kiloBitrate * @throws InvalidArgumentException diff --git a/src/FFMpeg/Format/AudioInterface.php b/src/FFMpeg/Format/AudioInterface.php index 47ed5d6..3cf254b 100644 --- a/src/FFMpeg/Format/AudioInterface.php +++ b/src/FFMpeg/Format/AudioInterface.php @@ -13,28 +13,28 @@ namespace FFMpeg\Format; interface AudioInterface extends FormatInterface { /** - * Get the audio kiloBitrate value + * Gets the audio kiloBitrate value. * * @return integer */ public function getAudioKiloBitrate(); /** - * Return an array of extra parameters to add to ffmpeg commandline + * Returns an array of extra parameters to add to ffmpeg commandline. * * @return array() */ public function getExtraParams(); /** - * Returns the audio codec + * Returns the audio codec. * * @return string */ public function getAudioCodec(); /** - * Returns the list of available audio codecs for this format + * Returns the list of available audio codecs for this format. * * @return array */ diff --git a/src/FFMpeg/Format/ProgressableInterface.php b/src/FFMpeg/Format/ProgressableInterface.php index 7318d65..4cd417d 100644 --- a/src/FFMpeg/Format/ProgressableInterface.php +++ b/src/FFMpeg/Format/ProgressableInterface.php @@ -18,7 +18,7 @@ use FFMpeg\Media\MediaTypeInterface; interface ProgressableInterface extends EventEmitterInterface { /** - * Creates the progress listener + * Creates the progress listener. * * @param MediaTypeInterface $media * @param FFProbe $ffprobe diff --git a/src/FFMpeg/Format/Video/DefaultVideo.php b/src/FFMpeg/Format/Video/DefaultVideo.php index 7427175..f74b23e 100644 --- a/src/FFMpeg/Format/Video/DefaultVideo.php +++ b/src/FFMpeg/Format/Video/DefaultVideo.php @@ -41,7 +41,7 @@ abstract class DefaultVideo extends DefaultAudio implements VideoInterface } /** - * Sets the kiloBitrate value + * Sets the kiloBitrate value. * * @param integer $kiloBitrate * @throws InvalidArgumentException @@ -67,7 +67,7 @@ abstract class DefaultVideo extends DefaultAudio implements VideoInterface /** * Sets the video codec, Should be in the available ones, otherwise an - * exception is thrown + * exception is thrown. * * @param string $videoCodec * @throws InvalidArgumentException diff --git a/src/FFMpeg/Format/VideoInterface.php b/src/FFMpeg/Format/VideoInterface.php index d1bbcf6..6bf91a1 100644 --- a/src/FFMpeg/Format/VideoInterface.php +++ b/src/FFMpeg/Format/VideoInterface.php @@ -14,14 +14,14 @@ namespace FFMpeg\Format; interface VideoInterface extends AudioInterface { /** - * Get the kiloBitrate value + * Gets the kiloBitrate value. * * @return integer */ public function getKiloBitrate(); /** - * Returns the number of passes + * Returns the number of passes. * * @return string */ @@ -40,14 +40,14 @@ interface VideoInterface extends AudioInterface public function getModulus(); /** - * Returns the video codec + * Returns the video codec. * * @return string */ public function getVideoCodec(); /** - * Returns true if the current format supports B-Frames + * Returns true if the current format supports B-Frames. * * @see https://wikipedia.org/wiki/Video_compression_picture_types * @@ -56,7 +56,7 @@ interface VideoInterface extends AudioInterface public function supportBFrames(); /** - * Returns the list of available video codecs for this format + * Returns the list of available video codecs for this format. * * @return array */ diff --git a/src/FFMpeg/Media/Audio.php b/src/FFMpeg/Media/Audio.php index 2ba0304..b20187b 100644 --- a/src/FFMpeg/Media/Audio.php +++ b/src/FFMpeg/Media/Audio.php @@ -43,7 +43,7 @@ class Audio extends AbstractStreamableMedia } /** - * Export the audio in the desired format, applies registered filters + * Exports the audio in the desired format, applies registered filters. * * @param FormatInterface $format * @param string $outputPathfile diff --git a/src/FFMpeg/Media/Frame.php b/src/FFMpeg/Media/Frame.php index 9ffb38d..9fd840c 100644 --- a/src/FFMpeg/Media/Frame.php +++ b/src/FFMpeg/Media/Frame.php @@ -75,6 +75,7 @@ class Frame extends AbstractMediaType public function saveAs($pathfile, $accurate = false) { /** + * might be optimized with http://ffmpeg.org/trac/ffmpeg/wiki/Seeking%20with%20FFmpeg * @see http://ffmpeg.org/ffmpeg.html#Main-options */ if (!$accurate) { diff --git a/src/FFMpeg/Media/MediaTypeInterface.php b/src/FFMpeg/Media/MediaTypeInterface.php index eca7f52..93cd05d 100644 --- a/src/FFMpeg/Media/MediaTypeInterface.php +++ b/src/FFMpeg/Media/MediaTypeInterface.php @@ -14,7 +14,7 @@ namespace FFMpeg\Media; interface MediaTypeInterface { /** - * Returns the available filters + * Returns the available filters. */ public function filters(); diff --git a/src/FFMpeg/Media/Video.php b/src/FFMpeg/Media/Video.php index b368497..e34e939 100644 --- a/src/FFMpeg/Media/Video.php +++ b/src/FFMpeg/Media/Video.php @@ -45,7 +45,7 @@ class Video extends AbstractStreamableMedia } /** - * Export the video in the desired format, applies registered filters + * Exports the video in the desired format, applies registered filters. * * @param FormatInterface $format * @param string $outputPathfile @@ -154,7 +154,7 @@ class Video extends AbstractStreamableMedia } /** - * Get the frame at timecode + * Gets the frame at timecode. * * @param Timecode $at * @return Frame