diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-02-12 10:53:56 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-02-12 11:00:07 +0100 |
commit | e8efc4d020a821b8ab86aa3813d9422c03b4ecc0 (patch) | |
tree | 8bb26cb0d62a9c05f4491a815389869a0b557ab0 /gst | |
parent | 25e84ff22302891ee1a5007f444097a401616f11 (diff) | |
download | gst-plugins-bad-e8efc4d020a821b8ab86aa3813d9422c03b4ecc0.tar.gz gst-plugins-bad-e8efc4d020a821b8ab86aa3813d9422c03b4ecc0.tar.bz2 gst-plugins-bad-e8efc4d020a821b8ab86aa3813d9422c03b4ecc0.zip |
mxfdemux: Also include the picture/sound/data essence coding in the unknown caps
Diffstat (limited to 'gst')
-rw-r--r-- | gst/mxf/mxfdemux.c | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index ebab7bbb..6dfc93a8 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -779,6 +779,7 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux) etrack->handler = mxf_essence_element_handler_find (track); if (!etrack->handler) { gchar essence_container[48]; + gchar essence_compression[48]; gchar *name; GST_WARNING_OBJECT (demux, @@ -788,12 +789,39 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux) essence_container); if (track->parent.type == MXF_METADATA_TRACK_PICTURE_ESSENCE) { - name = g_strdup_printf ("video/x-mxf-%s", essence_container); + if (MXF_IS_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (track-> + parent.descriptor[0])) + mxf_ul_to_string (&MXF_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR + (track->parent.descriptor[0])->picture_essence_coding, + essence_compression); + + name = + g_strdup_printf ("video/x-mxf-%s-%s", essence_container, + essence_compression); } else if (track->parent.type == MXF_METADATA_TRACK_SOUND_ESSENCE) { - name = g_strdup_printf ("audio/x-mxf-%s", essence_container); + if (MXF_IS_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR (track-> + parent.descriptor[0])) + mxf_ul_to_string (&MXF_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR + (track->parent.descriptor[0])->sound_essence_compression, + essence_compression); + + name = + g_strdup_printf ("audio/x-mxf-%s-%s", essence_container, + essence_compression); + } else if (track->parent.type == MXF_METADATA_TRACK_DATA_ESSENCE) { + if (MXF_IS_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR (track-> + parent.descriptor[0])) + mxf_ul_to_string (&MXF_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR + (track->parent.descriptor[0])->data_essence_compression, + essence_compression); + + name = + g_strdup_printf ("application/x-mxf-%s-%s", essence_container, + essence_compression); } else { - name = g_strdup_printf ("application/x-mxf-%s", essence_container); + g_assert_not_reached (); } + caps = gst_caps_new_simple (name, NULL); g_free (name); } else { |