avdemux: Add support for video/x-pva
authorSebastian Dröge <slomo@circular-chaos.org>
Thu, 22 Aug 2013 12:23:12 +0000 (14:23 +0200)
committerSebastian Dröge <slomo@circular-chaos.org>
Thu, 22 Aug 2013 12:23:43 +0000 (14:23 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=158719

ext/libav/gstavcodecmap.c
ext/libav/gstavdemux.c

index 88d19a0..f705f34 100644 (file)
@@ -3080,6 +3080,8 @@ gst_ffmpeg_formatid_to_caps (const gchar * format_name)
     caps = gst_caps_from_string ("video/webm");
   } else if (!strcmp (format_name, "voc")) {
     caps = gst_caps_from_string ("audio/x-voc");
+  } else if (!strcmp (format_name, "pva")) {
+    caps = gst_caps_from_string ("video/x-pva");
   } else {
     gchar *name;
 
@@ -3258,6 +3260,18 @@ gst_ffmpeg_formatid_get_codecids (const gchar * format_name,
 
     *video_codec_list = tmp_vlist;
     *audio_codec_list = tmp_alist;
+  } else if ((!strcmp (format_name, "pva"))) {
+    static enum CodecID tgp_video_list[] = {
+      AV_CODEC_ID_MPEG2VIDEO,
+      AV_CODEC_ID_NONE
+    };
+    static enum CodecID tgp_audio_list[] = {
+      AV_CODEC_ID_MP2,
+      AV_CODEC_ID_NONE
+    };
+
+    *video_codec_list = tgp_video_list;
+    *audio_codec_list = tgp_audio_list;
   } else {
     GST_LOG ("Format %s not found", format_name);
     return FALSE;
index d0df524..74e4a39 100644 (file)
@@ -2003,6 +2003,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
         !strcmp (in_plugin->name, "nuv") ||
         !strcmp (in_plugin->name, "swf") ||
         !strcmp (in_plugin->name, "voc") ||
+        !strcmp (in_plugin->name, "pva") ||
         !strcmp (in_plugin->name, "gif") || !strcmp (in_plugin->name, "vc1test")
         )
       register_typefind_func = FALSE;
@@ -2039,6 +2040,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
         !strcmp (in_plugin->name, "aiff") ||
         !strcmp (in_plugin->name, "4xm") ||
         !strcmp (in_plugin->name, "yuv4mpegpipe") ||
+        !strcmp (in_plugin->name, "pva") ||
         !strcmp (in_plugin->name, "mpc") || !strcmp (in_plugin->name, "gif"))
       rank = GST_RANK_MARGINAL;
     else {