summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@igalia.com>2020-09-04 10:43:05 -0400
committerThibault Saunier <tsaunier@igalia.com>2020-09-04 10:43:05 -0400
commit0eeb981ec6781bcef8499d9f98c6d072daf5a5d4 (patch)
treecd11ec37010fca94b6378980cc7585a488d94c51
parentbdbfe6f12055a0dc05dd4b7dd5529c16d7b85602 (diff)
demux: Fixate documentation caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/210>
-rw-r--r--docs/gst_plugins_cache.json2
-rw-r--r--plugins/ges/gesdemux.c18
2 files changed, 15 insertions, 5 deletions
diff --git a/docs/gst_plugins_cache.json b/docs/gst_plugins_cache.json
index 8ccc2147..dc9b8d3b 100644
--- a/docs/gst_plugins_cache.json
+++ b/docs/gst_plugins_cache.json
@@ -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"
},
diff --git a/plugins/ges/gesdemux.c b/plugins/ges/gesdemux.c
index 5291ff67..4c413d0b 100644
--- a/plugins/ges/gesdemux.c
+++ b/plugins/ges/gesdemux.c
@@ -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);
}