diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-09-02 18:33:51 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-09-14 19:53:03 +0200 |
commit | 0d0455e346438c6bf3bc68c3510587016f1a5bdc (patch) | |
tree | 6feb7501a73d1c4d089a661cb2eaea469bafd578 /ext | |
parent | d1c5669a384dfb7bc451eb68ba1dbfe11675a149 (diff) | |
download | gstreamer-plugins-bad-0d0455e346438c6bf3bc68c3510587016f1a5bdc.tar.gz |
dashdemux: Export the period start time to the base class
https://bugzilla.gnome.org/show_bug.cgi?id=754222
Diffstat (limited to 'ext')
-rw-r--r-- | ext/dash/gstdashdemux.c | 10 | ||||
-rw-r--r-- | ext/dash/gstmpdparser.c | 18 | ||||
-rw-r--r-- | ext/dash/gstmpdparser.h | 1 |
3 files changed, 26 insertions, 3 deletions
diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c index fd9bb3f7e..91de3c620 100644 --- a/ext/dash/gstdashdemux.c +++ b/ext/dash/gstdashdemux.c @@ -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; diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c index 02422b145..7312cf953 100644 --- a/ext/dash/gstmpdparser.c +++ b/ext/dash/gstmpdparser.c @@ -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 diff --git a/ext/dash/gstmpdparser.h b/ext/dash/gstmpdparser.h index b31b7e6c3..ff380e298 100644 --- a/ext/dash/gstmpdparser.h +++ b/ext/dash/gstmpdparser.h @@ -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); |