mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +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>
|
||||
|
||||
* gst/rtpmanager/rtpsession.c: (obtain_source),
|
||||
|
|
|
@ -363,6 +363,8 @@ gst_mxf_demux_reset (GstMXFDemux * demux)
|
|||
demux->footer_partition_pack_offset = 0;
|
||||
demux->offset = 0;
|
||||
|
||||
demux->pull_footer_metadata = TRUE;
|
||||
|
||||
demux->run_in = -1;
|
||||
|
||||
memset (&demux->current_package_uid, 0, sizeof (MXFUMID));
|
||||
|
@ -1272,8 +1274,9 @@ gst_mxf_demux_handle_header_metadata_resolve_references (GstMXFDemux * demux)
|
|||
MXFMetadataEssenceContainerData, i);
|
||||
|
||||
for (j = 0; j < demux->content_storage.n_essence_container_data; j++) {
|
||||
if (mxf_ul_is_equal (&demux->content_storage.
|
||||
essence_container_data_uids[j], &data->instance_uid)) {
|
||||
if (mxf_ul_is_equal (&demux->
|
||||
content_storage.essence_container_data_uids[j],
|
||||
&data->instance_uid)) {
|
||||
demux->content_storage.essence_container_data[j] = data;
|
||||
break;
|
||||
}
|
||||
|
@ -2369,13 +2372,15 @@ gst_mxf_demux_handle_klv_packet (GstMXFDemux * demux, const MXFUL * key,
|
|||
GstFlowReturn ret = GST_FLOW_OK;
|
||||
|
||||
/* 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.closed || !demux->partition.complete)
|
||||
&& demux->footer_partition_pack_offset != 0) {
|
||||
GST_DEBUG_OBJECT (demux,
|
||||
"Open or incomplete header partition, trying to get final metadata from the last partitions");
|
||||
gst_mxf_demux_parse_footer_metadata (demux);
|
||||
demux->pull_footer_metadata = FALSE;
|
||||
}
|
||||
|
||||
/* TODO: - Pull random index pack from footer partition?
|
||||
|
|
|
@ -70,6 +70,7 @@ struct _GstMXFDemux
|
|||
/* Structural metadata */
|
||||
gboolean update_metadata;
|
||||
gboolean final_metadata;
|
||||
gboolean pull_footer_metadata;
|
||||
MXFMetadataPreface preface;
|
||||
GArray *identification;
|
||||
MXFMetadataContentStorage content_storage;
|
||||
|
|
Loading…
Reference in a new issue