demux: Fixate documentation caps
authorThibault Saunier <tsaunier@igalia.com>
Fri, 4 Sep 2020 14:43:05 +0000 (10:43 -0400)
committerThibault Saunier <tsaunier@igalia.com>
Fri, 4 Sep 2020 14:43:05 +0000 (10:43 -0400)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/210>

docs/gst_plugins_cache.json
plugins/ges/gesdemux.c

index 8ccc214..dc9b8d3 100644 (file)
@@ -26,7 +26,7 @@
                         "presence": "sometimes"
                     },
                     "sink": {
-                        "caps": "text/x-xptv:\napplication/xges:\n",
+                        "caps": "application/xges:\ntext/x-xptv:\napplication/vnd.pixar.opentimelineio+json:\napplication/vnd.apple-xmeml+xml:\napplication/vnd.apple-fcp+xml:\n",
                         "direction": "sink",
                         "presence": "always"
                     },
index 5291ff6..4c413d0 100644 (file)
@@ -48,6 +48,12 @@ GST_DEBUG_CATEGORY_STATIC (gesdemux);
 #define GST_CAT_DEFAULT gesdemux
 
 G_DECLARE_FINAL_TYPE (GESDemux, ges_demux, GES, DEMUX, GESBaseBin);
+#define GES_DEMUX_DOC_CAPS \
+  "application/xges;" \
+  "text/x-xptv;" \
+  "application/vnd.pixar.opentimelineio+json;" \
+  "application/vnd.apple-xmeml+xml;" \
+  "application/vnd.apple-fcp+xml;" \
 
 struct _GESDemux
 {
@@ -189,9 +195,10 @@ ges_demux_set_property (GObject * object, guint property_id,
 static void
 ges_demux_class_init (GESDemuxClass * self_class)
 {
+  GstPadTemplate *pad_template;
   GObjectClass *gclass = G_OBJECT_CLASS (self_class);
   GstElementClass *gstelement_klass = GST_ELEMENT_CLASS (self_class);
-  GstCaps *sinkpad_caps;
+  GstCaps *sinkpad_caps, *doc_caps;
 
   GST_DEBUG_CATEGORY_INIT (gesdemux, "gesdemux", 0, "ges demux element");
 
@@ -218,9 +225,12 @@ ges_demux_class_init (GESDemuxClass * self_class)
       "Demuxer for complex timeline file formats using GES.",
       "Thibault Saunier <tsaunier@igalia.com");
 
-  gst_element_class_add_pad_template (gstelement_klass,
-      gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
-          sinkpad_caps));
+  pad_template =
+      gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, sinkpad_caps);
+  doc_caps = gst_caps_from_string (GES_DEMUX_DOC_CAPS);
+  gst_pad_template_set_documentation_caps (pad_template, doc_caps);
+  gst_clear_caps (&doc_caps);
+  gst_element_class_add_pad_template (gstelement_klass, pad_template);
   gst_caps_unref (sinkpad_caps);
 }