changeset 5880:6814207ffb27 libavcodec

split definition of PCM_CODEC into PCM_ENCODER and PCM_DECODER
author aurel
date Wed, 07 Nov 2007 22:54:31 +0000
parents ad73103623ab
children aa110f457c5a
files pcm.c
diffstat 1 files changed, 16 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pcm.c	Wed Nov 07 05:35:46 2007 +0000
+++ b/pcm.c	Wed Nov 07 22:54:31 2007 +0000
@@ -483,7 +483,8 @@
     return src - buf;
 }
 
-#define PCM_CODEC(id, name)                     \
+#ifdef CONFIG_ENCODERS
+#define PCM_ENCODER(id,name)                    \
 AVCodec name ## _encoder = {                    \
     #name,                                      \
     CODEC_TYPE_AUDIO,                           \
@@ -493,7 +494,13 @@
     pcm_encode_frame,                           \
     pcm_encode_close,                           \
     NULL,                                       \
-};                                              \
+};
+#else
+#define PCM_ENCODER(id,name)
+#endif
+
+#ifdef CONFIG_DECODERS
+#define PCM_DECODER(id,name)                    \
 AVCodec name ## _decoder = {                    \
     #name,                                      \
     CODEC_TYPE_AUDIO,                           \
@@ -503,7 +510,13 @@
     NULL,                                       \
     NULL,                                       \
     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_S32BE, pcm_s32be);