| 1 |
/* |
|---|
| 2 |
* FFissionCodec.h |
|---|
| 3 |
* |
|---|
| 4 |
* Copyright (c) 2006 David Conrad |
|---|
| 5 |
* |
|---|
| 6 |
* This program is free software; you can redistribute it and/or |
|---|
| 7 |
* modify it under the terms of the GNU Lesser General Public |
|---|
| 8 |
* License as published by the Free Software Foundation; |
|---|
| 9 |
* version 2.1 of the License. |
|---|
| 10 |
* |
|---|
| 11 |
* This program is distributed in the hope that it will be useful, |
|---|
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 14 |
* Lesser General Public License for more details. |
|---|
| 15 |
* |
|---|
| 16 |
* You should have received a copy of the GNU Lesser General Public |
|---|
| 17 |
* License along with this program; if not, write to the Free Software |
|---|
| 18 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|---|
| 19 |
* |
|---|
| 20 |
*/ |
|---|
| 21 |
|
|---|
| 22 |
#ifndef __FFISSIONCODEC_H__ |
|---|
| 23 |
#define __FFISSIONCODEC_H__ |
|---|
| 24 |
|
|---|
| 25 |
#include "ACSimpleCodec.h" |
|---|
| 26 |
extern "C" { |
|---|
| 27 |
#include "avcodec.h" |
|---|
| 28 |
} |
|---|
| 29 |
|
|---|
| 30 |
//============================================================================= |
|---|
| 31 |
// ACffAudioCodec |
|---|
| 32 |
// |
|---|
| 33 |
// This class encapsulates the common implementation of an audio codec using ffmpeg. |
|---|
| 34 |
//============================================================================= |
|---|
| 35 |
|
|---|
| 36 |
class FFissionCodec : public ACSimpleCodec { |
|---|
| 37 |
|
|---|
| 38 |
// Construction/Destruction |
|---|
| 39 |
public: |
|---|
| 40 |
FFissionCodec(UInt32 inInputBufferByteSize); |
|---|
| 41 |
virtual ~FFissionCodec(); |
|---|
| 42 |
|
|---|
| 43 |
// Data Handling |
|---|
| 44 |
virtual void Initialize(const AudioStreamBasicDescription* inInputFormat, const AudioStreamBasicDescription* inOutputFormat, const void* inMagicCookie, UInt32 inMagicCookieByteSize); |
|---|
| 45 |
|
|---|
| 46 |
virtual void GetProperty(AudioCodecPropertyID inPropertyID, UInt32& ioPropertyDataSize, void* outPropertyData); |
|---|
| 47 |
virtual void GetPropertyInfo(AudioCodecPropertyID inPropertyID, UInt32& outPropertyDataSize, bool& outWritable); |
|---|
| 48 |
|
|---|
| 49 |
protected: |
|---|
| 50 |
AVCodec *avCodec; |
|---|
| 51 |
AVCodecContext *avContext; |
|---|
| 52 |
}; |
|---|
| 53 |
|
|---|
| 54 |
#endif |
|---|