qtmux: Add prores support
authorThibault Saunier <tsaunier@gnome.org>
Sun, 11 Oct 2015 08:18:40 +0000 (09:18 +0100)
committerThibault Saunier <tsaunier@gnome.org>
Wed, 28 Oct 2015 13:19:00 +0000 (14:19 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=756388

gst/isomp4/gstqtmux.c
gst/isomp4/gstqtmuxmap.c

index c62171b..e1e22df 100644 (file)
@@ -4026,6 +4026,18 @@ gst_qt_mux_video_sink_set_caps (GstQTPad * qtpad, GstCaps * caps)
 
     gst_structure_get_uint (structure, "format", &fourcc);
     entry.fourcc = fourcc;
+  } else if (strcmp (mimetype, "video/x-prores") == 0) {
+    const gchar *variant;
+
+    variant = gst_structure_get_string (structure, "format");
+    if (!variant || !g_strcmp0 (variant, "standard"))
+      entry.fourcc = GST_MAKE_FOURCC ('a', 'p', 'c', 'n');
+    else if (!g_strcmp0 (variant, "lt"))
+      entry.fourcc = GST_MAKE_FOURCC ('a', 'p', 'c', 's');
+    else if (!g_strcmp0 (variant, "hq"))
+      entry.fourcc = GST_MAKE_FOURCC ('a', 'p', 'c', 'h');
+    else if (!g_strcmp0 (variant, "proxy"))
+      entry.fourcc = GST_MAKE_FOURCC ('a', 'p', '4', 'h');
   }
 
   if (!entry.fourcc)
index e088a42..006f16d 100644 (file)
   "divxversion = (int) 5, "\
   COMMON_VIDEO_CAPS
 
+#define PRORES_CAPS \
+  "video/x-prores, variant = (string) {standard, lt, hq, proxy}, " \
+  COMMON_VIDEO_CAPS
+
 #define SVQ_CAPS \
   "video/x-svq, " \
   "svqversion = (int) 3, " \
@@ -156,6 +160,7 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = {
             "format = (string) { RGB, UYVY, v210 }, "
             COMMON_VIDEO_CAPS "; "
             MPEG4V_CAPS "; "
+            PRORES_CAPS "; "
             H263_CAPS "; "
             H264_CAPS "; "
             SVQ_CAPS "; "