comparison allcodecs.c @ 9159:7a9a124bbc06 libavcodec

Add REGISTER_HWACCEL() for hardware accelerators.
author gb
date Tue, 10 Mar 2009 14:35:55 +0000
parents 303929f52007
children 5b4f4d83431f
comparison
equal deleted inserted replaced
9158:0d5eed0f1b45 9159:7a9a124bbc06
24 * Provides registration of all codecs, parsers and bitstream filters for libavcodec. 24 * Provides registration of all codecs, parsers and bitstream filters for libavcodec.
25 */ 25 */
26 26
27 #include "avcodec.h" 27 #include "avcodec.h"
28 28
29 #define REGISTER_HWACCEL(X,x) { \
30 extern AVHWAccel x##_hwaccel; \
31 if(CONFIG_##X##_HWACCEL) av_register_hwaccel(&x##_hwaccel); }
32
29 #define REGISTER_ENCODER(X,x) { \ 33 #define REGISTER_ENCODER(X,x) { \
30 extern AVCodec x##_encoder; \ 34 extern AVCodec x##_encoder; \
31 if(CONFIG_##X##_ENCODER) avcodec_register(&x##_encoder); } 35 if(CONFIG_##X##_ENCODER) avcodec_register(&x##_encoder); }
32 #define REGISTER_DECODER(X,x) { \ 36 #define REGISTER_DECODER(X,x) { \
33 extern AVCodec x##_decoder; \ 37 extern AVCodec x##_decoder; \
46 static int initialized; 50 static int initialized;
47 51
48 if (initialized) 52 if (initialized)
49 return; 53 return;
50 initialized = 1; 54 initialized = 1;
55
56 /* hardware accelerators */
51 57
52 /* video codecs */ 58 /* video codecs */
53 REGISTER_DECODER (AASC, aasc); 59 REGISTER_DECODER (AASC, aasc);
54 REGISTER_DECODER (AMV, amv); 60 REGISTER_DECODER (AMV, amv);
55 REGISTER_ENCDEC (ASV1, asv1); 61 REGISTER_ENCDEC (ASV1, asv1);