From cf97e06650740516fb2760c141d42ae304e30e2c Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Wed, 31 Oct 2012 00:30:24 +0100 Subject: [PATCH] Add VideoInterface getPasses method --- src/FFMpeg/Format/Video.php | 7 ++++++- src/FFMpeg/Format/Video/DefaultVideo.php | 8 ++++++++ src/FFMpeg/Format/Video/Ogg.php | 2 +- src/FFMpeg/Format/Video/X264.php | 8 ++++++++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/FFMpeg/Format/Video.php b/src/FFMpeg/Format/Video.php index 4e62b52..49bf0ae 100644 --- a/src/FFMpeg/Format/Video.php +++ b/src/FFMpeg/Format/Video.php @@ -18,5 +18,10 @@ namespace FFMpeg\Format; */ interface Video extends Audio { - + /** + * Returns the number of passes + * + * @return string + */ + public function getPasses(); } diff --git a/src/FFMpeg/Format/Video/DefaultVideo.php b/src/FFMpeg/Format/Video/DefaultVideo.php index a6d6c5f..3df5d73 100644 --- a/src/FFMpeg/Format/Video/DefaultVideo.php +++ b/src/FFMpeg/Format/Video/DefaultVideo.php @@ -222,4 +222,12 @@ abstract class DefaultVideo extends DefaultAudio implements Interactive, Resampl return $this; } + + /** + * {@inheritDoc} + */ + public function getPasses() + { + return 1; + } } diff --git a/src/FFMpeg/Format/Video/Ogg.php b/src/FFMpeg/Format/Video/Ogg.php index a77fdad..a1aca8c 100644 --- a/src/FFMpeg/Format/Video/Ogg.php +++ b/src/FFMpeg/Format/Video/Ogg.php @@ -28,7 +28,7 @@ class Ogg extends DefaultVideo { return true; } - + /** * {@inheritDoc} */ diff --git a/src/FFMpeg/Format/Video/X264.php b/src/FFMpeg/Format/Video/X264.php index 3263e28..fd57231 100644 --- a/src/FFMpeg/Format/Video/X264.php +++ b/src/FFMpeg/Format/Video/X264.php @@ -44,4 +44,12 @@ class X264 extends DefaultVideo { return array('libx264'); } + + /** + * {@inheritDoc} + */ + public function getPasses() + { + return 2; + } }