Merge pull request #58 from jacobbudin/0.3
Added Vorbis (.ogg) audio format
This commit is contained in:
		
				commit
				
					
						b604734dde
					
				
			
		
					 2 changed files with 52 additions and 0 deletions
				
			
		
							
								
								
									
										39
									
								
								src/FFMpeg/Format/Audio/Vorbis.php
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								src/FFMpeg/Format/Audio/Vorbis.php
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,39 @@ | |||
| <?php | ||||
| 
 | ||||
| /* | ||||
|  * This file is part of PHP-FFmpeg. | ||||
|  * | ||||
|  * (c) Alchemy <info@alchemy.fr> | ||||
|  * | ||||
|  * For the full copyright and license information, please view the LICENSE | ||||
|  * file that was distributed with this source code. | ||||
|  */ | ||||
| 
 | ||||
| namespace FFMpeg\Format\Audio; | ||||
| 
 | ||||
| /** | ||||
|  * The Vorbis audio format | ||||
|  */ | ||||
| class Vorbis extends DefaultAudio | ||||
| { | ||||
|     public function __construct() | ||||
|     { | ||||
|         $this->audioCodec = 'vorbis'; | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * {@inheritdoc} | ||||
|      */ | ||||
|     public function getExtraParams() | ||||
|     { | ||||
|         return array('-strict', '-2'); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * {@inheritDoc} | ||||
|      */ | ||||
|     public function getAvailableAudioCodecs() | ||||
|     { | ||||
|         return array('vorbis'); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										13
									
								
								tests/FFMpeg/Tests/Format/Audio/VorbisTest.php
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								tests/FFMpeg/Tests/Format/Audio/VorbisTest.php
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,13 @@ | |||
| <?php | ||||
| 
 | ||||
| namespace FFMpeg\Tests\Format\Audio; | ||||
| 
 | ||||
| use FFMpeg\Format\Audio\Vorbis; | ||||
| 
 | ||||
| class VorbisTest extends AudioTestCase | ||||
| { | ||||
|     public function getFormat() | ||||
|     { | ||||
|         return new Vorbis(); | ||||
|     } | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue