Merge pull request #95 from MrHash/master

Support for Wav and Aac audio encoding
This commit is contained in:
Romain Neutron 2014-04-21 19:22:27 +02:00
commit 7bff8d0d95
4 changed files with 88 additions and 0 deletions

View file

@ -0,0 +1,31 @@
<?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 AAC audio format
*/
class Aac extends DefaultAudio
{
public function __construct()
{
$this->audioCodec = 'libfdk_aac';
}
/**
* {@inheritDoc}
*/
public function getAvailableAudioCodecs()
{
return array('libfdk_aac');
}
}

View file

@ -0,0 +1,31 @@
<?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 WAV audio format
*/
class Wav extends DefaultAudio
{
public function __construct()
{
$this->audioCodec = 'pcm_s16le';
}
/**
* {@inheritDoc}
*/
public function getAvailableAudioCodecs()
{
return array('pcm_s16le');
}
}

View file

@ -0,0 +1,13 @@
<?php
namespace FFMpeg\Tests\Format\Audio;
use FFMpeg\Format\Audio\Aac;
class AacTest extends AudioTestCase
{
public function getFormat()
{
return new Aac();
}
}

View file

@ -0,0 +1,13 @@
<?php
namespace FFMpeg\Tests\Format\Audio;
use FFMpeg\Format\Audio\Wav;
class WavTest extends AudioTestCase
{
public function getFormat()
{
return new Wav();
}
}