Remove suffix of Format classes
This commit is contained in:
parent
f0d6756b5e
commit
cd33043f78
11 changed files with 47 additions and 47 deletions
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace FFMpeg\Format;
|
namespace FFMpeg\Format;
|
||||||
|
|
||||||
interface AudioFormat
|
interface Audio
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -11,14 +11,14 @@
|
||||||
|
|
||||||
namespace FFMpeg\Format\Audio;
|
namespace FFMpeg\Format\Audio;
|
||||||
|
|
||||||
use FFMpeg\Format\DefaultAudioFormat;
|
use FFMpeg\Format\DefaultAudio;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Flac audio format
|
* The Flac audio format
|
||||||
*
|
*
|
||||||
* @author Romain Neutron imprec@gmail.com
|
* @author Romain Neutron imprec@gmail.com
|
||||||
*/
|
*/
|
||||||
class Flac extends DefaultAudioFormat
|
class Flac extends DefaultAudio
|
||||||
{
|
{
|
||||||
protected $audioCodec = 'flac';
|
protected $audioCodec = 'flac';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,14 +11,14 @@
|
||||||
|
|
||||||
namespace FFMpeg\Format\Audio;
|
namespace FFMpeg\Format\Audio;
|
||||||
|
|
||||||
use FFMpeg\Format\DefaultAudioFormat;
|
use FFMpeg\Format\DefaultAudio;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The MP3 audio format
|
* The MP3 audio format
|
||||||
*
|
*
|
||||||
* @author Romain Neutron imprec@gmail.com
|
* @author Romain Neutron imprec@gmail.com
|
||||||
*/
|
*/
|
||||||
class Mp3 extends DefaultAudioFormat
|
class Mp3 extends DefaultAudio
|
||||||
{
|
{
|
||||||
protected $audioCodec = 'libmp3lame';
|
protected $audioCodec = 'libmp3lame';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ use FFMpeg\Exception\InvalidArgumentException;
|
||||||
*
|
*
|
||||||
* @author Romain Neutron imprec@gmail.com
|
* @author Romain Neutron imprec@gmail.com
|
||||||
*/
|
*/
|
||||||
abstract class DefaultAudioFormat implements AudioFormat
|
abstract class DefaultAudio implements Audio
|
||||||
{
|
{
|
||||||
protected $audioCodec;
|
protected $audioCodec;
|
||||||
protected $audioSampleRate = 44100;
|
protected $audioSampleRate = 44100;
|
||||||
|
|
@ -18,7 +18,7 @@ use FFMpeg\Exception\InvalidArgumentException;
|
||||||
*
|
*
|
||||||
* @author Romain Neutron imprec@gmail.com
|
* @author Romain Neutron imprec@gmail.com
|
||||||
*/
|
*/
|
||||||
abstract class DefaultVideoFormat extends DefaultAudioFormat implements VideoFormat
|
abstract class DefaultVideo extends DefaultAudio implements Video
|
||||||
{
|
{
|
||||||
protected $width;
|
protected $width;
|
||||||
protected $height;
|
protected $height;
|
||||||
|
|
@ -16,7 +16,7 @@ namespace FFMpeg\Format;
|
||||||
*
|
*
|
||||||
* @author Romain Neutron imprec@gmail.com
|
* @author Romain Neutron imprec@gmail.com
|
||||||
*/
|
*/
|
||||||
interface VideoFormat extends AudioFormat
|
interface Video extends Audio
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -11,14 +11,14 @@
|
||||||
|
|
||||||
namespace FFMpeg\Format\Video;
|
namespace FFMpeg\Format\Video;
|
||||||
|
|
||||||
use FFMpeg\Format\DefaultVideoFormat;
|
use FFMpeg\Format\DefaultVideo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Ogg video format
|
* The Ogg video format
|
||||||
*
|
*
|
||||||
* @author Romain Neutron imprec@gmail.com
|
* @author Romain Neutron imprec@gmail.com
|
||||||
*/
|
*/
|
||||||
class Ogg extends DefaultVideoFormat
|
class Ogg extends DefaultVideo
|
||||||
{
|
{
|
||||||
protected $audioCodec = 'libvorbis';
|
protected $audioCodec = 'libvorbis';
|
||||||
protected $videoCodec = 'libtheora';
|
protected $videoCodec = 'libtheora';
|
||||||
|
|
|
||||||
|
|
@ -11,14 +11,14 @@
|
||||||
|
|
||||||
namespace FFMpeg\Format\Video;
|
namespace FFMpeg\Format\Video;
|
||||||
|
|
||||||
use FFMpeg\Format\DefaultVideoFormat;
|
use FFMpeg\Format\DefaultVideo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The WebM video format
|
* The WebM video format
|
||||||
*
|
*
|
||||||
* @author Romain Neutron imprec@gmail.com
|
* @author Romain Neutron imprec@gmail.com
|
||||||
*/
|
*/
|
||||||
class WebM extends DefaultVideoFormat
|
class WebM extends DefaultVideo
|
||||||
{
|
{
|
||||||
protected $audioCodec = 'libvorbis';
|
protected $audioCodec = 'libvorbis';
|
||||||
protected $videoCodec = 'libvpx';
|
protected $videoCodec = 'libvpx';
|
||||||
|
|
|
||||||
|
|
@ -11,14 +11,14 @@
|
||||||
|
|
||||||
namespace FFMpeg\Format\Video;
|
namespace FFMpeg\Format\Video;
|
||||||
|
|
||||||
use FFMpeg\Format\DefaultVideoFormat;
|
use FFMpeg\Format\DefaultVideo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The X264 video format
|
* The X264 video format
|
||||||
*
|
*
|
||||||
* @author Romain Neutron imprec@gmail.com
|
* @author Romain Neutron imprec@gmail.com
|
||||||
*/
|
*/
|
||||||
class X264 extends DefaultVideoFormat
|
class X264 extends DefaultVideo
|
||||||
{
|
{
|
||||||
protected $audioCodec = 'libmp3lame';
|
protected $audioCodec = 'libmp3lame';
|
||||||
protected $videoCodec = 'libx264';
|
protected $videoCodec = 'libx264';
|
||||||
|
|
|
||||||
|
|
@ -2,21 +2,21 @@
|
||||||
|
|
||||||
namespace FFMpeg\Format;
|
namespace FFMpeg\Format;
|
||||||
|
|
||||||
class DefaultAudioFormatTest extends \PHPUnit_Framework_TestCase
|
class DefaultAudioTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var DefaultAudioFormat
|
* @var DefaultAudio
|
||||||
*/
|
*/
|
||||||
protected $object;
|
protected $object;
|
||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->object = new DefaultAudioFormatTester();
|
$this->object = new DefaultAudioTester();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FFMpeg\Format\DefaultAudioFormat::getExtraParams
|
* @covers FFMpeg\Format\DefaultAudio::getExtraParams
|
||||||
*/
|
*/
|
||||||
public function testGetExtraParams()
|
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()
|
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()
|
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
|
* @expectedException \InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
public function testSetWrongAudioCodec()
|
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()
|
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()
|
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
|
* @expectedException \InvalidArgumentException
|
||||||
* @dataProvider getWrongAudioSampleRate
|
* @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()
|
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()
|
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
|
* @dataProvider getWrongKiloBitrate
|
||||||
* @expectedException \InvalidArgumentException
|
* @expectedException \InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
|
|
@ -117,7 +117,7 @@ class DefaultAudioFormatTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class DefaultAudioFormatTester extends DefaultAudioFormat
|
class DefaultAudioTester extends DefaultAudio
|
||||||
{
|
{
|
||||||
|
|
||||||
protected $audioCodec = 'audiocodec1';
|
protected $audioCodec = 'audiocodec1';
|
||||||
|
|
@ -2,23 +2,23 @@
|
||||||
|
|
||||||
namespace FFMpeg\Format;
|
namespace FFMpeg\Format;
|
||||||
|
|
||||||
class DefaultVideoFormatTest extends \PHPUnit_Framework_TestCase
|
class DefaultVideoTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var DefaultVideoFormat
|
* @var DefaultVideo
|
||||||
*/
|
*/
|
||||||
protected $object;
|
protected $object;
|
||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->object = new DefaultVideoFormatTester();
|
$this->object = new DefaultVideoTester();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FFMpeg\Format\DefaultVideoFormat::setDimensions
|
* @covers FFMpeg\Format\DefaultVideo::setDimensions
|
||||||
* @covers FFMpeg\Format\DefaultVideoFormat::getWidth
|
* @covers FFMpeg\Format\DefaultVideo::getWidth
|
||||||
* @covers FFMpeg\Format\DefaultVideoFormat::getHeight
|
* @covers FFMpeg\Format\DefaultVideo::getHeight
|
||||||
*/
|
*/
|
||||||
public function testSetDimensions()
|
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
|
* @dataProvider getWrongDimensions
|
||||||
* @expectedException \InvalidArgumentException
|
* @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()
|
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()
|
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
|
* @dataProvider getWrongFrameRates
|
||||||
* @expectedException \InvalidArgumentException
|
* @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()
|
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()
|
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
|
* @expectedException \InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
public function testSetWrongVideoCodec()
|
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()
|
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()
|
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
|
* @dataProvider getWrongGOPsize
|
||||||
* @expectedException \InvalidArgumentException
|
* @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()
|
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()
|
public function testGetKiloBitrate()
|
||||||
{
|
{
|
||||||
|
|
@ -178,7 +178,7 @@ class DefaultVideoFormatTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class DefaultVideoFormatTester extends DefaultVideoFormat
|
class DefaultVideoTester extends DefaultVideo
|
||||||
{
|
{
|
||||||
|
|
||||||
protected $audioCodec = 'audiocodec1';
|
protected $audioCodec = 'audiocodec1';
|
||||||
Loading…
Add table
Add a link
Reference in a new issue