mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
gst/mxf/mxfdemux.*: Only try to pull the footer metadata once and not on every KLV packet if it failed before.
Original commit message from CVS: * gst/mxf/mxfdemux.c: (gst_mxf_demux_reset), (gst_mxf_demux_handle_klv_packet): * gst/mxf/mxfdemux.h: Only try to pull the footer metadata once and not on every KLV packet if it failed before.
This commit is contained in:
parent
8950978346
commit
e3337c6868
3 changed files with 17 additions and 3 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2008-11-27 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||||
|
|
||||||
|
* gst/mxf/mxfdemux.c: (gst_mxf_demux_reset),
|
||||||
|
(gst_mxf_demux_handle_klv_packet):
|
||||||
|
* gst/mxf/mxfdemux.h:
|
||||||
|
Only try to pull the footer metadata once and not on every KLV packet
|
||||||
|
if it failed before.
|
||||||
|
|
||||||
2008-11-26 Wim Taymans <wim.taymans@collabora.co.uk>
|
2008-11-26 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
* gst/rtpmanager/rtpsession.c: (obtain_source),
|
* gst/rtpmanager/rtpsession.c: (obtain_source),
|
||||||
|
|
|
@ -363,6 +363,8 @@ gst_mxf_demux_reset (GstMXFDemux * demux)
|
||||||
demux->footer_partition_pack_offset = 0;
|
demux->footer_partition_pack_offset = 0;
|
||||||
demux->offset = 0;
|
demux->offset = 0;
|
||||||
|
|
||||||
|
demux->pull_footer_metadata = TRUE;
|
||||||
|
|
||||||
demux->run_in = -1;
|
demux->run_in = -1;
|
||||||
|
|
||||||
memset (&demux->current_package_uid, 0, sizeof (MXFUMID));
|
memset (&demux->current_package_uid, 0, sizeof (MXFUMID));
|
||||||
|
@ -1272,8 +1274,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;
|
||||||
}
|
}
|
||||||
|
@ -2369,13 +2372,15 @@ gst_mxf_demux_handle_klv_packet (GstMXFDemux * demux, const MXFUL * key,
|
||||||
GstFlowReturn ret = GST_FLOW_OK;
|
GstFlowReturn ret = GST_FLOW_OK;
|
||||||
|
|
||||||
/* In pull mode try to get the last metadata */
|
/* In pull mode try to get the last metadata */
|
||||||
if (!demux->final_metadata && demux->random_access && demux->partition.valid
|
if (demux->pull_footer_metadata && !demux->final_metadata
|
||||||
|
&& demux->random_access && demux->partition.valid
|
||||||
&& demux->partition.type == MXF_PARTITION_PACK_HEADER
|
&& demux->partition.type == MXF_PARTITION_PACK_HEADER
|
||||||
&& (!demux->partition.closed || !demux->partition.complete)
|
&& (!demux->partition.closed || !demux->partition.complete)
|
||||||
&& demux->footer_partition_pack_offset != 0) {
|
&& demux->footer_partition_pack_offset != 0) {
|
||||||
GST_DEBUG_OBJECT (demux,
|
GST_DEBUG_OBJECT (demux,
|
||||||
"Open or incomplete header partition, trying to get final metadata from the last partitions");
|
"Open or incomplete header partition, trying to get final metadata from the last partitions");
|
||||||
gst_mxf_demux_parse_footer_metadata (demux);
|
gst_mxf_demux_parse_footer_metadata (demux);
|
||||||
|
demux->pull_footer_metadata = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: - Pull random index pack from footer partition?
|
/* TODO: - Pull random index pack from footer partition?
|
||||||
|
|
|
@ -70,6 +70,7 @@ struct _GstMXFDemux
|
||||||
/* Structural metadata */
|
/* Structural metadata */
|
||||||
gboolean update_metadata;
|
gboolean update_metadata;
|
||||||
gboolean final_metadata;
|
gboolean final_metadata;
|
||||||
|
gboolean pull_footer_metadata;
|
||||||
MXFMetadataPreface preface;
|
MXFMetadataPreface preface;
|
||||||
GArray *identification;
|
GArray *identification;
|
||||||
MXFMetadataContentStorage content_storage;
|
MXFMetadataContentStorage content_storage;
|
||||||
|
|
Loading…
Reference in a new issue