av: Use av_codec_is_{en,de}coder() API instead of private struct fields
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 5 Dec 2012 09:52:34 +0000 (10:52 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 5 Dec 2012 09:52:34 +0000 (10:52 +0100)
ext/libav/gstavauddec.c
ext/libav/gstavaudenc.c
ext/libav/gstavviddec.c
ext/libav/gstavvidenc.c

index d01ae35..a7befb2 100644 (file)
@@ -775,7 +775,8 @@ gst_ffmpegauddec_register (GstPlugin * plugin)
     gchar *plugin_name;
 
     /* only decoders */
-    if (!in_plugin->decode || in_plugin->type != AVMEDIA_TYPE_AUDIO) {
+    if (!av_codec_is_decoder (in_plugin)
+        || in_plugin->type != AVMEDIA_TYPE_AUDIO) {
       goto next;
     }
 
index e7588b0..6356559 100644 (file)
@@ -589,7 +589,7 @@ gst_ffmpegaudenc_register (GstPlugin * plugin)
     }
 
     /* only encoders */
-    if (!in_plugin->encode2) {
+    if (!av_codec_is_encoder (in_plugin)) {
       goto next;
     }
 
index b763f94..279b74d 100644 (file)
@@ -1621,7 +1621,8 @@ gst_ffmpegviddec_register (GstPlugin * plugin)
     gchar *plugin_name;
 
     /* only video decoders */
-    if (!in_plugin->decode || in_plugin->type != AVMEDIA_TYPE_VIDEO)
+    if (!av_codec_is_decoder (in_plugin)
+        || in_plugin->type != AVMEDIA_TYPE_VIDEO)
       goto next;
 
     /* no quasi-codecs, please */
index 8dd5a0d..807da68 100644 (file)
@@ -981,7 +981,8 @@ gst_ffmpegvidenc_register (GstPlugin * plugin)
     }
 
     /* only video encoders */
-    if (!in_plugin->encode2 || in_plugin->type != AVMEDIA_TYPE_VIDEO)
+    if (!av_codec_is_encoder (in_plugin)
+        || in_plugin->type != AVMEDIA_TYPE_VIDEO)
       goto next;
 
     /* FIXME : We should have a method to know cheaply whether we have a mapping