mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-08 21:28:45 +00:00
Revert "qtdemux: expose streams with first moof for fragmented format"
This reverts commit d8bb6687ea
.
https://bugzilla.gnome.org/show_bug.cgi?id=764733
This commit is contained in:
parent
0c4cc14533
commit
707c69cb72
2 changed files with 16 additions and 39 deletions
|
@ -591,7 +591,6 @@ gst_qtdemux_init (GstQTDemux * qtdemux)
|
||||||
qtdemux->state = QTDEMUX_STATE_INITIAL;
|
qtdemux->state = QTDEMUX_STATE_INITIAL;
|
||||||
qtdemux->pullbased = FALSE;
|
qtdemux->pullbased = FALSE;
|
||||||
qtdemux->posted_redirect = FALSE;
|
qtdemux->posted_redirect = FALSE;
|
||||||
qtdemux->pending_configure = FALSE;
|
|
||||||
qtdemux->neededbytes = 16;
|
qtdemux->neededbytes = 16;
|
||||||
qtdemux->todrop = 0;
|
qtdemux->todrop = 0;
|
||||||
qtdemux->adapter = gst_adapter_new ();
|
qtdemux->adapter = gst_adapter_new ();
|
||||||
|
@ -1996,7 +1995,6 @@ gst_qtdemux_reset (GstQTDemux * qtdemux, gboolean hard)
|
||||||
gst_caps_replace (&qtdemux->media_caps, NULL);
|
gst_caps_replace (&qtdemux->media_caps, NULL);
|
||||||
qtdemux->timescale = 0;
|
qtdemux->timescale = 0;
|
||||||
qtdemux->got_moov = FALSE;
|
qtdemux->got_moov = FALSE;
|
||||||
qtdemux->pending_configure = FALSE;
|
|
||||||
if (qtdemux->protection_system_ids) {
|
if (qtdemux->protection_system_ids) {
|
||||||
g_ptr_array_free (qtdemux->protection_system_ids, TRUE);
|
g_ptr_array_free (qtdemux->protection_system_ids, TRUE);
|
||||||
qtdemux->protection_system_ids = NULL;
|
qtdemux->protection_system_ids = NULL;
|
||||||
|
@ -6035,7 +6033,6 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
|
||||||
&fourcc);
|
&fourcc);
|
||||||
if (fourcc == FOURCC_moov) {
|
if (fourcc == FOURCC_moov) {
|
||||||
gint n;
|
gint n;
|
||||||
gboolean got_samples = FALSE;
|
|
||||||
|
|
||||||
/* in usual fragmented setup we could try to scan for more
|
/* in usual fragmented setup we could try to scan for more
|
||||||
* and end up at the the moov (after mdat) again */
|
* and end up at the the moov (after mdat) again */
|
||||||
|
@ -6067,27 +6064,19 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
|
||||||
qtdemux_node_dump (demux, demux->moov_node);
|
qtdemux_node_dump (demux, demux->moov_node);
|
||||||
qtdemux_parse_tree (demux);
|
qtdemux_parse_tree (demux);
|
||||||
qtdemux_prepare_streams (demux);
|
qtdemux_prepare_streams (demux);
|
||||||
|
if (!demux->got_moov)
|
||||||
|
qtdemux_expose_streams (demux);
|
||||||
|
else {
|
||||||
|
|
||||||
for (n = 0; n < demux->n_streams; n++) {
|
for (n = 0; n < demux->n_streams; n++) {
|
||||||
QtDemuxStream *stream = demux->streams[n];
|
QtDemuxStream *stream = demux->streams[n];
|
||||||
got_samples |= stream->stbl_index >= 0;
|
|
||||||
}
|
|
||||||
if (!demux->fragmented || got_samples) {
|
|
||||||
if (!demux->got_moov) {
|
|
||||||
qtdemux_expose_streams (demux);
|
|
||||||
} else {
|
|
||||||
for (n = 0; n < demux->n_streams; n++) {
|
|
||||||
QtDemuxStream *stream = demux->streams[n];
|
|
||||||
gst_qtdemux_configure_stream (demux, stream);
|
gst_qtdemux_configure_stream (demux, stream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gst_qtdemux_check_send_pending_segment (demux);
|
|
||||||
demux->pending_configure = FALSE;
|
|
||||||
} else {
|
|
||||||
demux->pending_configure = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
demux->got_moov = TRUE;
|
demux->got_moov = TRUE;
|
||||||
|
gst_qtdemux_check_send_pending_segment (demux);
|
||||||
|
|
||||||
/* fragmented streams headers shouldn't contain edts atoms */
|
/* fragmented streams headers shouldn't contain edts atoms */
|
||||||
if (!demux->fragmented) {
|
if (!demux->fragmented) {
|
||||||
|
@ -6106,7 +6095,6 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
|
||||||
guint64 dist = 0;
|
guint64 dist = 0;
|
||||||
GstClockTime prev_pts;
|
GstClockTime prev_pts;
|
||||||
guint64 prev_offset;
|
guint64 prev_offset;
|
||||||
gint n;
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (demux, "Parsing [moof]");
|
GST_DEBUG_OBJECT (demux, "Parsing [moof]");
|
||||||
|
|
||||||
|
@ -6140,10 +6128,8 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
|
||||||
ret = GST_FLOW_ERROR;
|
ret = GST_FLOW_ERROR;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
/* in MSS we need to expose the pads after the first moof as we won't get a moov
|
/* in MSS we need to expose the pads after the first moof as we won't get a moov */
|
||||||
* Also, fragmented format need to be exposed if a moov have no valid sample data */
|
if (demux->mss_mode && !demux->exposed) {
|
||||||
if (demux->mss_mode || demux->pending_configure) {
|
|
||||||
if (!demux->exposed) {
|
|
||||||
if (!demux->pending_newsegment) {
|
if (!demux->pending_newsegment) {
|
||||||
GstSegment segment;
|
GstSegment segment;
|
||||||
gst_segment_init (&segment, GST_FORMAT_TIME);
|
gst_segment_init (&segment, GST_FORMAT_TIME);
|
||||||
|
@ -6151,14 +6137,6 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
|
||||||
demux->pending_newsegment = gst_event_new_segment (&segment);
|
demux->pending_newsegment = gst_event_new_segment (&segment);
|
||||||
}
|
}
|
||||||
qtdemux_expose_streams (demux);
|
qtdemux_expose_streams (demux);
|
||||||
} else {
|
|
||||||
for (n = 0; n < demux->n_streams; n++) {
|
|
||||||
QtDemuxStream *stream = demux->streams[n];
|
|
||||||
gst_qtdemux_configure_stream (demux, stream);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gst_qtdemux_check_send_pending_segment (demux);
|
|
||||||
demux->pending_configure = FALSE;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
GST_DEBUG_OBJECT (demux, "Discarding [moof]");
|
GST_DEBUG_OBJECT (demux, "Discarding [moof]");
|
||||||
|
|
|
@ -89,7 +89,6 @@ struct _GstQTDemux {
|
||||||
gboolean posted_redirect;
|
gboolean posted_redirect;
|
||||||
|
|
||||||
/* push based variables */
|
/* push based variables */
|
||||||
gboolean pending_configure;
|
|
||||||
guint neededbytes;
|
guint neededbytes;
|
||||||
guint todrop;
|
guint todrop;
|
||||||
GstAdapter *adapter;
|
GstAdapter *adapter;
|
||||||
|
|
Loading…
Reference in a new issue