Add REGISTER_HWACCEL() for hardware accelerators.
authorGwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Tue, 10 Mar 2009 14:35:55 +0000 (14:35 +0000)
committerGwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Tue, 10 Mar 2009 14:35:55 +0000 (14:35 +0000)
Originally committed as revision 17925 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/allcodecs.c

index 0cb0e6d..b024e01 100644 (file)
 
 #include "avcodec.h"
 
+#define REGISTER_HWACCEL(X,x) { \
+          extern AVHWAccel x##_hwaccel; \
+          if(CONFIG_##X##_HWACCEL) av_register_hwaccel(&x##_hwaccel); }
+
 #define REGISTER_ENCODER(X,x) { \
           extern AVCodec x##_encoder; \
           if(CONFIG_##X##_ENCODER)  avcodec_register(&x##_encoder); }
@@ -49,6 +53,8 @@ void avcodec_register_all(void)
         return;
     initialized = 1;
 
+    /* hardware accelerators */
+
     /* video codecs */
     REGISTER_DECODER (AASC, aasc);
     REGISTER_DECODER (AMV, amv);