summaryrefslogtreecommitdiffstats
path: root/gst/mxf
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-02-06 11:55:45 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-02-06 11:55:45 +0100
commit86088f92bec6ea5eb3bbc04fc027f828a7019eea (patch)
tree13198c7d1ebabbffc7544df7efbc7d39e6131339 /gst/mxf
parent6eef7983fb17055a1fb10e704067e1500f48b597 (diff)
downloadgst-plugins-bad-86088f92bec6ea5eb3bbc04fc027f828a7019eea.tar.gz
gst-plugins-bad-86088f92bec6ea5eb3bbc04fc027f828a7019eea.tar.bz2
gst-plugins-bad-86088f92bec6ea5eb3bbc04fc027f828a7019eea.zip
mxfdemux: For tracks with no known mapping use dummy caps
Diffstat (limited to 'gst/mxf')
-rw-r--r--gst/mxf/mxfdemux.c25
1 files changed, 20 insertions, 5 deletions
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);