diff --git a/src/FFMpeg/Format/AudioFormat.php b/src/FFMpeg/Format/Audio.php similarity index 97% rename from src/FFMpeg/Format/AudioFormat.php rename to src/FFMpeg/Format/Audio.php index 9c2f7d2..87fc8d4 100644 --- a/src/FFMpeg/Format/AudioFormat.php +++ b/src/FFMpeg/Format/Audio.php @@ -11,7 +11,7 @@ namespace FFMpeg\Format; -interface AudioFormat +interface Audio { /** diff --git a/src/FFMpeg/Format/Audio/Flac.php b/src/FFMpeg/Format/Audio/Flac.php index 079165d..1e83401 100644 --- a/src/FFMpeg/Format/Audio/Flac.php +++ b/src/FFMpeg/Format/Audio/Flac.php @@ -11,14 +11,14 @@ namespace FFMpeg\Format\Audio; -use FFMpeg\Format\DefaultAudioFormat; +use FFMpeg\Format\DefaultAudio; /** * The Flac audio format * * @author Romain Neutron imprec@gmail.com */ -class Flac extends DefaultAudioFormat +class Flac extends DefaultAudio { protected $audioCodec = 'flac'; diff --git a/src/FFMpeg/Format/Audio/Mp3.php b/src/FFMpeg/Format/Audio/Mp3.php index 8f52831..7ba9d19 100644 --- a/src/FFMpeg/Format/Audio/Mp3.php +++ b/src/FFMpeg/Format/Audio/Mp3.php @@ -11,14 +11,14 @@ namespace FFMpeg\Format\Audio; -use FFMpeg\Format\DefaultAudioFormat; +use FFMpeg\Format\DefaultAudio; /** * The MP3 audio format * * @author Romain Neutron imprec@gmail.com */ -class Mp3 extends DefaultAudioFormat +class Mp3 extends DefaultAudio { protected $audioCodec = 'libmp3lame'; diff --git a/src/FFMpeg/Format/DefaultAudioFormat.php b/src/FFMpeg/Format/DefaultAudio.php similarity index 97% rename from src/FFMpeg/Format/DefaultAudioFormat.php rename to src/FFMpeg/Format/DefaultAudio.php index 69bb81c..47948a9 100644 --- a/src/FFMpeg/Format/DefaultAudioFormat.php +++ b/src/FFMpeg/Format/DefaultAudio.php @@ -18,7 +18,7 @@ use FFMpeg\Exception\InvalidArgumentException; * * @author Romain Neutron imprec@gmail.com */ -abstract class DefaultAudioFormat implements AudioFormat +abstract class DefaultAudio implements Audio { protected $audioCodec; protected $audioSampleRate = 44100; diff --git a/src/FFMpeg/Format/DefaultVideoFormat.php b/src/FFMpeg/Format/DefaultVideo.php similarity index 97% rename from src/FFMpeg/Format/DefaultVideoFormat.php rename to src/FFMpeg/Format/DefaultVideo.php index 4c52d98..fb85a6c 100644 --- a/src/FFMpeg/Format/DefaultVideoFormat.php +++ b/src/FFMpeg/Format/DefaultVideo.php @@ -18,7 +18,7 @@ use FFMpeg\Exception\InvalidArgumentException; * * @author Romain Neutron imprec@gmail.com */ -abstract class DefaultVideoFormat extends DefaultAudioFormat implements VideoFormat +abstract class DefaultVideo extends DefaultAudio implements Video { protected $width; protected $height; diff --git a/src/FFMpeg/Format/VideoFormat.php b/src/FFMpeg/Format/Video.php similarity index 96% rename from src/FFMpeg/Format/VideoFormat.php rename to src/FFMpeg/Format/Video.php index b838a3d..4a4bf42 100644 --- a/src/FFMpeg/Format/VideoFormat.php +++ b/src/FFMpeg/Format/Video.php @@ -16,7 +16,7 @@ namespace FFMpeg\Format; * * @author Romain Neutron imprec@gmail.com */ -interface VideoFormat extends AudioFormat +interface Video extends Audio { /** diff --git a/src/FFMpeg/Format/Video/Ogg.php b/src/FFMpeg/Format/Video/Ogg.php index 236eccb..463034f 100644 --- a/src/FFMpeg/Format/Video/Ogg.php +++ b/src/FFMpeg/Format/Video/Ogg.php @@ -11,14 +11,14 @@ namespace FFMpeg\Format\Video; -use FFMpeg\Format\DefaultVideoFormat; +use FFMpeg\Format\DefaultVideo; /** * The Ogg video format * * @author Romain Neutron imprec@gmail.com */ -class Ogg extends DefaultVideoFormat +class Ogg extends DefaultVideo { protected $audioCodec = 'libvorbis'; protected $videoCodec = 'libtheora'; diff --git a/src/FFMpeg/Format/Video/WebM.php b/src/FFMpeg/Format/Video/WebM.php index 79cd20d..9ebcd1e 100644 --- a/src/FFMpeg/Format/Video/WebM.php +++ b/src/FFMpeg/Format/Video/WebM.php @@ -11,14 +11,14 @@ namespace FFMpeg\Format\Video; -use FFMpeg\Format\DefaultVideoFormat; +use FFMpeg\Format\DefaultVideo; /** * The WebM video format * * @author Romain Neutron imprec@gmail.com */ -class WebM extends DefaultVideoFormat +class WebM extends DefaultVideo { protected $audioCodec = 'libvorbis'; protected $videoCodec = 'libvpx'; diff --git a/src/FFMpeg/Format/Video/X264.php b/src/FFMpeg/Format/Video/X264.php index 023a6cd..fcc7216 100644 --- a/src/FFMpeg/Format/Video/X264.php +++ b/src/FFMpeg/Format/Video/X264.php @@ -11,14 +11,14 @@ namespace FFMpeg\Format\Video; -use FFMpeg\Format\DefaultVideoFormat; +use FFMpeg\Format\DefaultVideo; /** * The X264 video format * * @author Romain Neutron imprec@gmail.com */ -class X264 extends DefaultVideoFormat +class X264 extends DefaultVideo { protected $audioCodec = 'libmp3lame'; protected $videoCodec = 'libx264'; diff --git a/tests/src/FFMpeg/Format/DefaultAudioFormatTest.php b/tests/src/FFMpeg/Format/DefaultAudioTest.php similarity index 74% rename from tests/src/FFMpeg/Format/DefaultAudioFormatTest.php rename to tests/src/FFMpeg/Format/DefaultAudioTest.php index c568bf4..2616cbc 100644 --- a/tests/src/FFMpeg/Format/DefaultAudioFormatTest.php +++ b/tests/src/FFMpeg/Format/DefaultAudioTest.php @@ -2,21 +2,21 @@ namespace FFMpeg\Format; -class DefaultAudioFormatTest extends \PHPUnit_Framework_TestCase +class DefaultAudioTest extends \PHPUnit_Framework_TestCase { /** - * @var DefaultAudioFormat + * @var DefaultAudio */ protected $object; protected function setUp() { - $this->object = new DefaultAudioFormatTester(); + $this->object = new DefaultAudioTester(); } /** - * @covers FFMpeg\Format\DefaultAudioFormat::getExtraParams + * @covers FFMpeg\Format\DefaultAudio::getExtraParams */ public function testGetExtraParams() { @@ -24,7 +24,7 @@ class DefaultAudioFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultAudioFormat::getAudioCodec + * @covers FFMpeg\Format\DefaultAudio::getAudioCodec */ public function testGetAudioCodec() { @@ -32,7 +32,7 @@ class DefaultAudioFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultAudioFormat::setAudioCodec + * @covers FFMpeg\Format\DefaultAudio::setAudioCodec */ public function testSetAudioCodec() { @@ -43,7 +43,7 @@ class DefaultAudioFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultAudioFormat::setAudioCodec + * @covers FFMpeg\Format\DefaultAudio::setAudioCodec * @expectedException \InvalidArgumentException */ public function testSetWrongAudioCodec() @@ -52,7 +52,7 @@ class DefaultAudioFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultAudioFormat::getAudioSampleRate + * @covers FFMpeg\Format\DefaultAudio::getAudioSampleRate */ public function testGetAudioSampleRate() { @@ -60,7 +60,7 @@ class DefaultAudioFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultAudioFormat::setAudioSampleRate + * @covers FFMpeg\Format\DefaultAudio::setAudioSampleRate */ public function testSetAudioSampleRate() { @@ -69,7 +69,7 @@ class DefaultAudioFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultAudioFormat::setAudioSampleRate + * @covers FFMpeg\Format\DefaultAudio::setAudioSampleRate * @expectedException \InvalidArgumentException * @dataProvider getWrongAudioSampleRate */ @@ -84,7 +84,7 @@ class DefaultAudioFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultAudioFormat::getKiloBitrate + * @covers FFMpeg\Format\DefaultAudio::getKiloBitrate */ public function testGetKiloBitrate() { @@ -92,7 +92,7 @@ class DefaultAudioFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultAudioFormat::setKiloBitrate + * @covers FFMpeg\Format\DefaultAudio::setKiloBitrate */ public function testSetKiloBitrate() { @@ -101,7 +101,7 @@ class DefaultAudioFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultAudioFormat::setKiloBitrate + * @covers FFMpeg\Format\DefaultAudio::setKiloBitrate * @dataProvider getWrongKiloBitrate * @expectedException \InvalidArgumentException */ @@ -117,7 +117,7 @@ class DefaultAudioFormatTest extends \PHPUnit_Framework_TestCase } -class DefaultAudioFormatTester extends DefaultAudioFormat +class DefaultAudioTester extends DefaultAudio { protected $audioCodec = 'audiocodec1'; diff --git a/tests/src/FFMpeg/Format/DefaultVideoFormatTest.php b/tests/src/FFMpeg/Format/DefaultVideoTest.php similarity index 78% rename from tests/src/FFMpeg/Format/DefaultVideoFormatTest.php rename to tests/src/FFMpeg/Format/DefaultVideoTest.php index fc33cf8..9bb0ffd 100644 --- a/tests/src/FFMpeg/Format/DefaultVideoFormatTest.php +++ b/tests/src/FFMpeg/Format/DefaultVideoTest.php @@ -2,23 +2,23 @@ namespace FFMpeg\Format; -class DefaultVideoFormatTest extends \PHPUnit_Framework_TestCase +class DefaultVideoTest extends \PHPUnit_Framework_TestCase { /** - * @var DefaultVideoFormat + * @var DefaultVideo */ protected $object; protected function setUp() { - $this->object = new DefaultVideoFormatTester(); + $this->object = new DefaultVideoTester(); } /** - * @covers FFMpeg\Format\DefaultVideoFormat::setDimensions - * @covers FFMpeg\Format\DefaultVideoFormat::getWidth - * @covers FFMpeg\Format\DefaultVideoFormat::getHeight + * @covers FFMpeg\Format\DefaultVideo::setDimensions + * @covers FFMpeg\Format\DefaultVideo::getWidth + * @covers FFMpeg\Format\DefaultVideo::getHeight */ public function testSetDimensions() { @@ -32,7 +32,7 @@ class DefaultVideoFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultVideoFormat::setDimensions + * @covers FFMpeg\Format\DefaultVideo::setDimensions * @dataProvider getWrongDimensions * @expectedException \InvalidArgumentException */ @@ -59,7 +59,7 @@ class DefaultVideoFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultVideoFormat::getFrameRate + * @covers FFMpeg\Format\DefaultVideo::getFrameRate */ public function testGetFrameRate() { @@ -67,7 +67,7 @@ class DefaultVideoFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultVideoFormat::setFrameRate + * @covers FFMpeg\Format\DefaultVideo::setFrameRate */ public function testSetFrameRate() { @@ -76,7 +76,7 @@ class DefaultVideoFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultVideoFormat::setFrameRate + * @covers FFMpeg\Format\DefaultVideo::setFrameRate * @dataProvider getWrongFrameRates * @expectedException \InvalidArgumentException */ @@ -96,7 +96,7 @@ class DefaultVideoFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultVideoFormat::getVideoCodec + * @covers FFMpeg\Format\DefaultVideo::getVideoCodec */ public function testGetVideoCodec() { @@ -104,7 +104,7 @@ class DefaultVideoFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultVideoFormat::setVideoCodec + * @covers FFMpeg\Format\DefaultVideo::setVideoCodec */ public function testSetVideoCodec() { @@ -115,7 +115,7 @@ class DefaultVideoFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultVideoFormat::setVideoCodec + * @covers FFMpeg\Format\DefaultVideo::setVideoCodec * @expectedException \InvalidArgumentException */ public function testSetWrongVideoCodec() @@ -124,7 +124,7 @@ class DefaultVideoFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultVideoFormat::getGOPsize + * @covers FFMpeg\Format\DefaultVideo::getGOPsize */ public function testGetGOPsize() { @@ -132,7 +132,7 @@ class DefaultVideoFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultVideoFormat::setGOPsize + * @covers FFMpeg\Format\DefaultVideo::setGOPsize */ public function testSetGOPsize() { @@ -141,7 +141,7 @@ class DefaultVideoFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultVideoFormat::setGOPsize + * @covers FFMpeg\Format\DefaultVideo::setGOPsize * @dataProvider getWrongGOPsize * @expectedException \InvalidArgumentException */ @@ -156,7 +156,7 @@ class DefaultVideoFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultVideoFormat::getMultiple + * @covers FFMpeg\Format\DefaultVideo::getMultiple */ public function testGetMultiple() { @@ -169,7 +169,7 @@ class DefaultVideoFormatTest extends \PHPUnit_Framework_TestCase } /** - * @covers FFMpeg\Format\DefaultVideoFormat::getKiloBitrate + * @covers FFMpeg\Format\DefaultVideo::getKiloBitrate */ public function testGetKiloBitrate() { @@ -178,7 +178,7 @@ class DefaultVideoFormatTest extends \PHPUnit_Framework_TestCase } -class DefaultVideoFormatTester extends DefaultVideoFormat +class DefaultVideoTester extends DefaultVideo { protected $audioCodec = 'audiocodec1';