mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-27 08:48:19 +00:00
dashdemux: Export the period start time to the base class
https://bugzilla.gnome.org/show_bug.cgi?id=754222
This commit is contained in:
parent
d1c5669a38
commit
0d0455e346
|
@ -327,6 +327,14 @@ gst_dash_demux_get_presentation_offset (GstAdaptiveDemux * demux,
|
|||
dashstream->index);
|
||||
}
|
||||
|
||||
static GstClockTime
|
||||
gst_dash_demux_get_period_start_time (GstAdaptiveDemux * demux)
|
||||
{
|
||||
GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (demux);
|
||||
|
||||
return gst_mpd_parser_get_period_start_time (dashdemux->client);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_dash_demux_class_init (GstDashDemuxClass * klass)
|
||||
{
|
||||
|
@ -411,6 +419,8 @@ gst_dash_demux_class_init (GstDashDemuxClass * klass)
|
|||
gst_dash_demux_get_live_seek_range;
|
||||
gstadaptivedemux_class->get_presentation_offset =
|
||||
gst_dash_demux_get_presentation_offset;
|
||||
gstadaptivedemux_class->get_period_start_time =
|
||||
gst_dash_demux_get_period_start_time;
|
||||
|
||||
gstadaptivedemux_class->finish_fragment =
|
||||
gst_dash_demux_stream_fragment_finished;
|
||||
|
|
|
@ -3757,14 +3757,26 @@ gst_mpd_parser_get_stream_presentation_offset (GstMpdClient * client,
|
|||
{
|
||||
GstActiveStream *stream = NULL;
|
||||
|
||||
g_return_val_if_fail (client != NULL, FALSE);
|
||||
g_return_val_if_fail (client->active_streams != NULL, FALSE);
|
||||
g_return_val_if_fail (client != NULL, 0);
|
||||
g_return_val_if_fail (client->active_streams != NULL, 0);
|
||||
stream = g_list_nth_data (client->active_streams, stream_idx);
|
||||
g_return_val_if_fail (stream != NULL, FALSE);
|
||||
g_return_val_if_fail (stream != NULL, 0);
|
||||
|
||||
return stream->presentationTimeOffset;
|
||||
}
|
||||
|
||||
GstClockTime
|
||||
gst_mpd_parser_get_period_start_time (GstMpdClient * client)
|
||||
{
|
||||
GstStreamPeriod *stream_period = NULL;
|
||||
|
||||
g_return_val_if_fail (client != NULL, 0);
|
||||
stream_period = gst_mpdparser_get_stream_period (client);
|
||||
g_return_val_if_fail (stream_period != NULL, 0);
|
||||
|
||||
return stream_period->start;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_mpd_client_get_utc_timing_sources:
|
||||
* @client: #GstMpdClient to check for UTCTiming elements
|
||||
|
|
|
@ -527,6 +527,7 @@ gboolean gst_mpd_client_seek_to_time (GstMpdClient * client, GDateTime * time);
|
|||
gint gst_mpd_client_check_time_position (GstMpdClient * client, GstActiveStream * stream, GstClockTime ts, gint64 * diff);
|
||||
GstClockTime gst_mpd_parser_get_stream_presentation_offset (GstMpdClient *client, guint stream_idx);
|
||||
gchar** gst_mpd_client_get_utc_timing_sources (GstMpdClient *client, guint methods, GstMPDUTCTimingType *selected_method);
|
||||
GstClockTime gst_mpd_parser_get_period_start_time (GstMpdClient *client);
|
||||
|
||||
/* Period selection */
|
||||
guint gst_mpd_client_get_period_index_at_time (GstMpdClient * client, GstDateTime * time);
|
||||
|
|
Loading…
Reference in a new issue