changeset 9159:7a9a124bbc06 libavcodec

Add REGISTER_HWACCEL() for hardware accelerators.
author gb
date Tue, 10 Mar 2009 14:35:55 +0000
parents 0d5eed0f1b45
children 678152bdb3a1
files allcodecs.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/allcodecs.c	Mon Mar 09 23:27:38 2009 +0000
+++ b/allcodecs.c	Tue Mar 10 14:35:55 2009 +0000
@@ -26,6 +26,10 @@
 
 #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 @@
         return;
     initialized = 1;
 
+    /* hardware accelerators */
+
     /* video codecs */
     REGISTER_DECODER (AASC, aasc);
     REGISTER_DECODER (AMV, amv);