dashdemux: don't wait for the whole duration of a fragment when seeking
This commit is contained in:
parent
489d7a174c
commit
0bed9a6646
@ -1030,16 +1030,18 @@ gst_dash_demux_stream_loop (GstDashDemux * demux)
|
|||||||
goto error_pushing;
|
goto error_pushing;
|
||||||
}
|
}
|
||||||
demux->need_segment = FALSE;
|
demux->need_segment = FALSE;
|
||||||
|
demux->last_position_shift = demux->position_shift;
|
||||||
demux->position_shift = 0;
|
demux->position_shift = 0;
|
||||||
g_list_free (listfragment);
|
g_list_free (listfragment);
|
||||||
if (GST_STATE (demux) == GST_STATE_PLAYING) {
|
if (GST_STATE (demux) == GST_STATE_PLAYING) {
|
||||||
/* Wait for the duration of a fragment before resuming this task */
|
/* Wait for the duration of a fragment before resuming this task */
|
||||||
g_get_current_time (&demux->next_push);
|
g_get_current_time (&demux->next_push);
|
||||||
g_time_val_add (&demux->next_push,
|
g_time_val_add (&demux->next_push,
|
||||||
gst_mpd_client_get_next_fragment_duration (demux->client)
|
(gst_mpd_client_get_next_fragment_duration (demux->client) -
|
||||||
/ GST_SECOND * G_USEC_PER_SEC);
|
demux->last_position_shift) / GST_SECOND * G_USEC_PER_SEC);
|
||||||
GST_DEBUG_OBJECT (demux, "Next push scheduled at %s",
|
GST_DEBUG_OBJECT (demux, "Next push scheduled at %s",
|
||||||
g_time_val_to_iso8601 (&demux->next_push));
|
g_time_val_to_iso8601 (&demux->next_push));
|
||||||
|
demux->last_position_shift = 0;
|
||||||
} else {
|
} else {
|
||||||
/* The pipeline is now set up, wait until playback begins */
|
/* The pipeline is now set up, wait until playback begins */
|
||||||
goto pause_streaming;
|
goto pause_streaming;
|
||||||
|
@ -96,6 +96,7 @@ struct _GstDashDemux
|
|||||||
/* Position in the stream */
|
/* Position in the stream */
|
||||||
GstClockTime position;
|
GstClockTime position;
|
||||||
GstClockTime position_shift;
|
GstClockTime position_shift;
|
||||||
|
GstClockTime last_position_shift;
|
||||||
gboolean need_segment;
|
gboolean need_segment;
|
||||||
/* Download rate */
|
/* Download rate */
|
||||||
guint64 dnl_rate;
|
guint64 dnl_rate;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user