gst/mxf/mxfdemux.c: Add a generic handler for descriptive metadata so we can get some debug output and let users file...
Original commit message from CVS: * gst/mxf/mxfdemux.c: (gst_mxf_demux_handle_descriptive_metadata), (gst_mxf_demux_handle_klv_packet): Add a generic handler for descriptive metadata so we can get some debug output and let users file bugs for unsupport descriptive metadata schemes.
This commit is contained in:
parent
c94b1bd2de
commit
a8ffb0e71d
@ -1,3 +1,11 @@
|
|||||||
|
2008-12-13 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||||
|
|
||||||
|
* gst/mxf/mxfdemux.c: (gst_mxf_demux_handle_descriptive_metadata),
|
||||||
|
(gst_mxf_demux_handle_klv_packet):
|
||||||
|
Add a generic handler for descriptive metadata so we can get some
|
||||||
|
debug output and let users file bugs for unsupport descriptive
|
||||||
|
metadata schemes.
|
||||||
|
|
||||||
2008-12-12 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
2008-12-12 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||||
|
|
||||||
* gst/mxf/mxfaes-bwf.c:
|
* gst/mxf/mxfaes-bwf.c:
|
||||||
|
2
common
2
common
@ -1 +1 @@
|
|||||||
Subproject commit 55e579eeead04cfde7c63b3a4f5b3d4f72c2f61d
|
Subproject commit 1c24dce4e32f0a725ebd1b8ba2cd48d373818f75
|
@ -1341,8 +1341,9 @@ gst_mxf_demux_handle_header_metadata_resolve_references (GstMXFDemux * demux)
|
|||||||
MXFMetadataEssenceContainerData, i);
|
MXFMetadataEssenceContainerData, i);
|
||||||
|
|
||||||
for (j = 0; j < demux->content_storage.n_essence_container_data; j++) {
|
for (j = 0; j < demux->content_storage.n_essence_container_data; j++) {
|
||||||
if (mxf_ul_is_equal (&demux->content_storage.
|
if (mxf_ul_is_equal (&demux->
|
||||||
essence_container_data_uids[j], &data->instance_uid)) {
|
content_storage.essence_container_data_uids[j],
|
||||||
|
&data->instance_uid)) {
|
||||||
demux->content_storage.essence_container_data[j] = data;
|
demux->content_storage.essence_container_data[j] = data;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2136,6 +2137,49 @@ gst_mxf_demux_handle_metadata (GstMXFDemux * demux, const MXFUL * key,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GstFlowReturn
|
||||||
|
gst_mxf_demux_handle_descriptive_metadata (GstMXFDemux * demux,
|
||||||
|
const MXFUL * key, GstBuffer * buffer)
|
||||||
|
{
|
||||||
|
guint32 type;
|
||||||
|
guint8 scheme;
|
||||||
|
GstFlowReturn ret = GST_FLOW_OK;
|
||||||
|
|
||||||
|
scheme = GST_READ_UINT8 (key->u + 12);
|
||||||
|
type = GST_READ_UINT24_BE (key->u + 13);
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (demux,
|
||||||
|
"Handling descriptive metadata of size %u at offset %"
|
||||||
|
G_GUINT64_FORMAT " with scheme 0x%02x and type 0x%06x",
|
||||||
|
GST_BUFFER_SIZE (buffer), demux->offset, scheme, type);
|
||||||
|
|
||||||
|
if (G_UNLIKELY (!demux->partition.valid)) {
|
||||||
|
GST_ERROR_OBJECT (demux, "Partition pack doesn't exist");
|
||||||
|
return GST_FLOW_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (G_UNLIKELY (!demux->primer.valid)) {
|
||||||
|
GST_ERROR_OBJECT (demux, "Primer pack doesn't exists");
|
||||||
|
return GST_FLOW_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!demux->update_metadata) {
|
||||||
|
GST_DEBUG_OBJECT (demux,
|
||||||
|
"Skipping parsing of metadata because it's older than what we have");
|
||||||
|
return GST_FLOW_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
default:
|
||||||
|
GST_WARNING_OBJECT (demux,
|
||||||
|
"Unknown or unhandled descriptive metadata of scheme 0x%02x and type 0x%06x",
|
||||||
|
scheme, type);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_mxf_demux_handle_generic_container_system_item (GstMXFDemux * demux,
|
gst_mxf_demux_handle_generic_container_system_item (GstMXFDemux * demux,
|
||||||
const MXFUL * key, GstBuffer * buffer)
|
const MXFUL * key, GstBuffer * buffer)
|
||||||
@ -2670,6 +2714,8 @@ gst_mxf_demux_handle_klv_packet (GstMXFDemux * demux, const MXFUL * key,
|
|||||||
ret = gst_mxf_demux_handle_primer_pack (demux, key, buffer);
|
ret = gst_mxf_demux_handle_primer_pack (demux, key, buffer);
|
||||||
} else if (mxf_is_metadata (key)) {
|
} else if (mxf_is_metadata (key)) {
|
||||||
ret = gst_mxf_demux_handle_metadata (demux, key, buffer);
|
ret = gst_mxf_demux_handle_metadata (demux, key, buffer);
|
||||||
|
} else if (mxf_is_descriptive_metadata (key)) {
|
||||||
|
ret = gst_mxf_demux_handle_descriptive_metadata (demux, key, buffer);
|
||||||
} else if (mxf_is_generic_container_system_item (key)) {
|
} else if (mxf_is_generic_container_system_item (key)) {
|
||||||
ret =
|
ret =
|
||||||
gst_mxf_demux_handle_generic_container_system_item (demux, key, buffer);
|
gst_mxf_demux_handle_generic_container_system_item (demux, key, buffer);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user