Commit 987c41d4 authored by aurel's avatar aurel

split definition of PCM_CODEC into PCM_ENCODER and PCM_DECODER

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10946 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 160f8976
...@@ -483,7 +483,8 @@ static int pcm_decode_frame(AVCodecContext *avctx, ...@@ -483,7 +483,8 @@ static int pcm_decode_frame(AVCodecContext *avctx,
return src - buf; return src - buf;
} }
#define PCM_CODEC(id, name) \ #ifdef CONFIG_ENCODERS
#define PCM_ENCODER(id,name) \
AVCodec name ## _encoder = { \ AVCodec name ## _encoder = { \
#name, \ #name, \
CODEC_TYPE_AUDIO, \ CODEC_TYPE_AUDIO, \
...@@ -493,7 +494,13 @@ AVCodec name ## _encoder = { \ ...@@ -493,7 +494,13 @@ AVCodec name ## _encoder = { \
pcm_encode_frame, \ pcm_encode_frame, \
pcm_encode_close, \ pcm_encode_close, \
NULL, \ NULL, \
}; \ };
#else
#define PCM_ENCODER(id,name)
#endif
#ifdef CONFIG_DECODERS
#define PCM_DECODER(id,name) \
AVCodec name ## _decoder = { \ AVCodec name ## _decoder = { \
#name, \ #name, \
CODEC_TYPE_AUDIO, \ CODEC_TYPE_AUDIO, \
...@@ -503,7 +510,13 @@ AVCodec name ## _decoder = { \ ...@@ -503,7 +510,13 @@ AVCodec name ## _decoder = { \
NULL, \ NULL, \
NULL, \ NULL, \
pcm_decode_frame, \ pcm_decode_frame, \
} };
#else
#define PCM_DECODER(id,name)
#endif
#define PCM_CODEC(id, name) \
PCM_ENCODER(id,name) PCM_DECODER(id,name)
PCM_CODEC(CODEC_ID_PCM_S32LE, pcm_s32le); PCM_CODEC(CODEC_ID_PCM_S32LE, pcm_s32le);
PCM_CODEC(CODEC_ID_PCM_S32BE, pcm_s32be); PCM_CODEC(CODEC_ID_PCM_S32BE, pcm_s32be);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment