From 1cb6723d8636758aebf684f100113acadacf7aec Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Mon, 11 Jun 2012 19:19:03 +0200 Subject: [PATCH] Implement supportBFrames method to resizableVideos --- src/FFMpeg/Format/Video/Ogg.php | 8 ++++++++ src/FFMpeg/Format/Video/WebM.php | 8 ++++++++ src/FFMpeg/Format/Video/X264.php | 8 ++++++++ tests/src/FFMpeg/Format/Video/DefaultVideoTest.php | 5 +++++ 4 files changed, 29 insertions(+) diff --git a/src/FFMpeg/Format/Video/Ogg.php b/src/FFMpeg/Format/Video/Ogg.php index 0ff0673..a77fdad 100644 --- a/src/FFMpeg/Format/Video/Ogg.php +++ b/src/FFMpeg/Format/Video/Ogg.php @@ -21,6 +21,14 @@ class Ogg extends DefaultVideo protected $audioCodec = 'libvorbis'; protected $videoCodec = 'libtheora'; + /** + * {@inheritDoc} + */ + public function supportBFrames() + { + return true; + } + /** * {@inheritDoc} */ diff --git a/src/FFMpeg/Format/Video/WebM.php b/src/FFMpeg/Format/Video/WebM.php index 3831d08..dc4a78d 100644 --- a/src/FFMpeg/Format/Video/WebM.php +++ b/src/FFMpeg/Format/Video/WebM.php @@ -21,6 +21,14 @@ class WebM extends DefaultVideo protected $audioCodec = 'libvorbis'; protected $videoCodec = 'libvpx'; + /** + * {@inheritDoc} + */ + public function supportBFrames() + { + return true; + } + /** * {@inheritDoc} */ diff --git a/src/FFMpeg/Format/Video/X264.php b/src/FFMpeg/Format/Video/X264.php index 9fa2cde..3263e28 100644 --- a/src/FFMpeg/Format/Video/X264.php +++ b/src/FFMpeg/Format/Video/X264.php @@ -21,6 +21,14 @@ class X264 extends DefaultVideo protected $audioCodec = 'libmp3lame'; protected $videoCodec = 'libx264'; + /** + * {@inheritDoc} + */ + public function supportBFrames() + { + return true; + } + /** * {@inheritDoc} */ diff --git a/tests/src/FFMpeg/Format/Video/DefaultVideoTest.php b/tests/src/FFMpeg/Format/Video/DefaultVideoTest.php index 1d17b79..9f50bf6 100644 --- a/tests/src/FFMpeg/Format/Video/DefaultVideoTest.php +++ b/tests/src/FFMpeg/Format/Video/DefaultVideoTest.php @@ -171,6 +171,11 @@ class DefaultVideoTester extends DefaultVideo protected $audioCodec = 'audiocodec1'; protected $videoCodec = 'videocodec2'; + public function supportBFrames() + { + return true; + } + public function getAvailableAudioCodecs() { return array('audiocodec1', 'audiocodec2', 'audiocodec3');