mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-05 22:12:34 +00:00
adaptivedemux2: Fix usage of GstClockTime vs GstClockTimeDiff
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8286>
This commit is contained in:
parent
65b4d26db6
commit
32ebee5594
6 changed files with 20 additions and 18 deletions
|
@ -2082,8 +2082,8 @@ gst_adaptive_demux2_stream_next_download (GstAdaptiveDemux2Stream * stream)
|
|||
|
||||
GST_DEBUG_OBJECT (stream,
|
||||
"stream_time after restart seek: %" GST_STIME_FORMAT
|
||||
" position %" GST_STIME_FORMAT, GST_STIME_ARGS (stream_time),
|
||||
GST_STIME_ARGS (stream->current_position));
|
||||
" position %" GST_TIME_FORMAT, GST_STIME_ARGS (stream_time),
|
||||
GST_TIME_ARGS (stream->current_position));
|
||||
}
|
||||
|
||||
/* Trigger (re)computation of the parsebin input segment */
|
||||
|
|
|
@ -325,8 +325,8 @@ gst_adaptive_demux_track_drain_to (GstAdaptiveDemuxTrack * track,
|
|||
GstAdaptiveDemux *demux = track->demux;
|
||||
|
||||
GST_DEBUG_ID (track->id,
|
||||
"draining to running time %" GST_STIME_FORMAT,
|
||||
GST_STIME_ARGS (drain_running_time));
|
||||
"draining to running time %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (drain_running_time));
|
||||
|
||||
while (track->next_position == GST_CLOCK_STIME_NONE ||
|
||||
track->next_position < drain_running_time) {
|
||||
|
|
|
@ -548,8 +548,8 @@ gst_hlsdemux_stream_handle_internal_time (GstHLSDemuxStream * hls_stream,
|
|||
if (current_segment->discont) {
|
||||
GST_DEBUG_OBJECT (hls_stream,
|
||||
"DISCONT segment, Updating time map to stream_time:%" GST_STIME_FORMAT
|
||||
" internal_time:%" GST_TIME_FORMAT, GST_STIME_ARGS (internal_time),
|
||||
GST_TIME_ARGS (current_stream_time));
|
||||
" internal_time:%" GST_TIME_FORMAT,
|
||||
GST_STIME_ARGS (current_stream_time), GST_TIME_ARGS (internal_time));
|
||||
gst_time_map_set_values (map, current_stream_time, internal_time,
|
||||
current_segment->datetime);
|
||||
return GST_HLS_PARSER_RESULT_DONE;
|
||||
|
|
|
@ -831,8 +831,8 @@ gst_hlsdemux_handle_content_webvtt (GstHLSDemux * demux,
|
|||
gchar **original_lines;
|
||||
GstClockTime localtime = GST_CLOCK_TIME_NONE;
|
||||
GstClockTime mpegtime = GST_CLOCK_TIME_NONE;
|
||||
GstClockTime low_stream_time = GST_CLOCK_STIME_NONE;
|
||||
GstClockTime high_stream_time = GST_CLOCK_STIME_NONE;
|
||||
GstClockTimeDiff low_stream_time = GST_CLOCK_STIME_NONE;
|
||||
GstClockTimeDiff high_stream_time = GST_CLOCK_STIME_NONE;
|
||||
gboolean found_timing = FALSE;
|
||||
gboolean found_text = FALSE;
|
||||
GPtrArray *builder;
|
||||
|
@ -971,11 +971,12 @@ out:
|
|||
* reassess which segment we really are in */
|
||||
GST_WARNING ("Cue %" GST_STIME_FORMAT " -> %" GST_STIME_FORMAT
|
||||
" is outside of segment %" GST_STIME_FORMAT " -> %"
|
||||
GST_STIME_FORMAT, GST_STIME_ARGS (low_stream_time),
|
||||
GST_STIME_FORMAT,
|
||||
GST_STIME_ARGS (low_stream_time),
|
||||
GST_STIME_ARGS (high_stream_time),
|
||||
GST_STIME_ARGS (current_segment->stream_time),
|
||||
GST_STIME_ARGS (current_segment->stream_time +
|
||||
current_segment->duration));
|
||||
GST_STIME_ARGS ((GstClockTimeDiff) (current_segment->stream_time +
|
||||
current_segment->duration)));
|
||||
|
||||
GstM3U8SeekResult seek_result;
|
||||
|
||||
|
|
|
@ -1230,8 +1230,8 @@ gst_hls_demux_reset_for_lost_sync (GstHLSDemux * hlsdemux)
|
|||
gst_hls_media_playlist_recalculate_stream_time (hls_stream->playlist,
|
||||
hls_stream->current_segment);
|
||||
GST_DEBUG_OBJECT (stream,
|
||||
"Resynced variant playlist to %" GST_STIME_FORMAT,
|
||||
GST_STIME_ARGS (stream->current_position));
|
||||
"Resynced variant playlist to %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (stream->current_position));
|
||||
map =
|
||||
gst_hls_demux_find_time_map (hlsdemux,
|
||||
hls_stream->current_segment->discont_sequence);
|
||||
|
|
|
@ -1476,7 +1476,8 @@ gst_hls_media_playlist_find_partial_position (GstHLSMediaPlaylist * playlist,
|
|||
|
||||
GST_DEBUG ("partial segment %d ts:%" GST_STIME_FORMAT " end:%"
|
||||
GST_STIME_FORMAT, part_idx, GST_STIME_ARGS (cand->stream_time),
|
||||
GST_STIME_ARGS (cand->stream_time + cand->duration));
|
||||
GST_STIME_ARGS ((GstClockTimeDiff) (cand->stream_time +
|
||||
cand->duration)));
|
||||
|
||||
/* If the target timestamp is before this partial segment, or in the first half, this
|
||||
* is the partial segment to land in */
|
||||
|
@ -1529,8 +1530,8 @@ gst_hls_media_playlist_find_position (GstHLSMediaPlaylist * playlist,
|
|||
GST_DEBUG ("segment %d ts:%" GST_STIME_FORMAT " end:%" GST_STIME_FORMAT
|
||||
" partial only: %d",
|
||||
seg_idx, GST_STIME_ARGS (cand->stream_time),
|
||||
GST_STIME_ARGS (cand->stream_time + cand->duration),
|
||||
cand->partial_only);
|
||||
GST_STIME_ARGS ((GstClockTimeDiff) (cand->stream_time +
|
||||
cand->duration)), cand->partial_only);
|
||||
|
||||
/* Ignore any (disallowed by the spec) partial_only segment if
|
||||
* the playlist is no longer live */
|
||||
|
@ -2531,8 +2532,8 @@ gst_hls_media_playlist_has_lost_sync (GstHLSMediaPlaylist * m3u8,
|
|||
first = g_ptr_array_index (m3u8->segments, 0);
|
||||
|
||||
GST_DEBUG ("position %" GST_TIME_FORMAT " first %" GST_STIME_FORMAT
|
||||
" duration %" GST_STIME_FORMAT, GST_TIME_ARGS (position),
|
||||
GST_STIME_ARGS (first->stream_time), GST_STIME_ARGS (first->duration));
|
||||
" duration %" GST_TIME_FORMAT, GST_TIME_ARGS (position),
|
||||
GST_STIME_ARGS (first->stream_time), GST_TIME_ARGS (first->duration));
|
||||
|
||||
if (first->stream_time <= 0)
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue