mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 20:59:44 +00:00
dashdemux: tests: tested latency query
Updated query test to also check if dash responds correctly to a latency query. https://bugzilla.gnome.org/show_bug.cgi?id=762144
This commit is contained in:
parent
a7f1eb234f
commit
f89fe6cb45
1 changed files with 18 additions and 1 deletions
|
@ -1037,6 +1037,9 @@ testQueryCheckDataReceived (GstAdaptiveDemuxTestEngine * engine,
|
|||
gboolean seekable;
|
||||
gint64 segment_start;
|
||||
gint64 segment_end;
|
||||
gboolean live;
|
||||
GstClockTime min_latency;
|
||||
GstClockTime max_latency;
|
||||
gchar *uri;
|
||||
gchar *redirect_uri;
|
||||
gboolean redirect_permanent;
|
||||
|
@ -1048,13 +1051,16 @@ testQueryCheckDataReceived (GstAdaptiveDemuxTestEngine * engine,
|
|||
fail_unless (g_list_length (pads) == 1);
|
||||
pad = GST_PAD (pads->data);
|
||||
|
||||
/* duration query */
|
||||
query = gst_query_new_duration (GST_FORMAT_TIME);
|
||||
ret = gst_pad_peer_query (pad, query);
|
||||
fail_unless (ret == TRUE);
|
||||
gst_query_parse_duration (query, NULL, &duration);
|
||||
/* mediaPresentationDuration=\"PT135.743S\" */
|
||||
fail_unless (duration == 135743 * GST_MSECOND);
|
||||
gst_query_unref (query);
|
||||
|
||||
/* seek query */
|
||||
query = gst_query_new_seeking (GST_FORMAT_TIME);
|
||||
ret = gst_pad_peer_query (pad, query);
|
||||
fail_unless (ret == TRUE);
|
||||
|
@ -1065,13 +1071,24 @@ testQueryCheckDataReceived (GstAdaptiveDemuxTestEngine * engine,
|
|||
fail_unless (segment_end == duration);
|
||||
gst_query_unref (query);
|
||||
|
||||
/* latency query */
|
||||
query = gst_query_new_latency ();
|
||||
ret = gst_pad_peer_query (pad, query);
|
||||
fail_unless (ret == TRUE);
|
||||
gst_query_parse_latency (query, &live, &min_latency, &max_latency);
|
||||
fail_unless (live == FALSE);
|
||||
fail_unless (min_latency == 0);
|
||||
fail_unless (max_latency == -1);
|
||||
gst_query_unref (query);
|
||||
|
||||
/* uri query */
|
||||
query = gst_query_new_uri ();
|
||||
ret = gst_pad_peer_query (pad, query);
|
||||
fail_unless (ret == TRUE);
|
||||
gst_query_parse_uri (query, &uri);
|
||||
gst_query_parse_uri_redirection (query, &redirect_uri);
|
||||
gst_query_parse_uri_redirection_permanent (query, &redirect_permanent);
|
||||
fail_unless (strcmp (uri, "http://unit.test/test.mpd") == 0);
|
||||
fail_unless (g_strcmp0 (uri, "http://unit.test/test.mpd") == 0);
|
||||
/* adaptive demux does not reply with redirect information */
|
||||
fail_unless (redirect_uri == NULL);
|
||||
fail_unless (redirect_permanent == FALSE);
|
||||
|
|
Loading…
Reference in a new issue