From 86088f92bec6ea5eb3bbc04fc027f828a7019eea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 6 Feb 2009 11:55:45 +0100 Subject: mxfdemux: For tracks with no known mapping use dummy caps --- gst/mxf/mxfdemux.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'gst/mxf') diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index af37fe8e..db5b6209 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -769,14 +769,29 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux) etrack->handler = mxf_essence_element_handler_find (track); if (!etrack->handler) { + gchar essence_container[96]; + gchar *name; + GST_WARNING_OBJECT (demux, "No essence element handler for track found"); - goto next; - } - caps = - etrack->handler->create_caps (track, &etrack->tags, - &etrack->handle_func, &etrack->mapping_data); + mxf_ul_to_string (&track->parent.descriptor[0]->essence_container, + essence_container); + + if (track->parent.type == MXF_METADATA_TRACK_PICTURE_ESSENCE) { + name = g_strdup_printf ("video/x-mxf-%s", essence_container); + } else if (track->parent.type == MXF_METADATA_TRACK_SOUND_ESSENCE) { + name = g_strdup_printf ("audio/x-mxf-%s", essence_container); + } else { + name = g_strdup_printf ("application/x-mxf-%s", essence_container); + } + caps = gst_caps_new_simple (name, NULL); + g_free (name); + } else { + caps = + etrack->handler->create_caps (track, &etrack->tags, + &etrack->handle_func, &etrack->mapping_data); + } GST_DEBUG_OBJECT (demux, "Created caps %" GST_PTR_FORMAT, caps); -- cgit v1.2.1