mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
gst/: API change fix.
Original commit message from CVS: * gst/qtdemux/qtdemux.c: (gst_qtdemux_get_src_query_types), (gst_qtdemux_handle_src_query): * gst/speed/gstspeed.c: (speed_get_query_types), (speed_src_query): * gst/tta/gstttaparse.c: (gst_tta_parse_src_event), (gst_tta_parse_get_query_types), (gst_tta_parse_query): API change fix.
This commit is contained in:
parent
ba7ee6ae6c
commit
3ab46f21f0
1 changed files with 9 additions and 3 deletions
|
@ -312,6 +312,7 @@ gst_qtdemux_get_src_query_types (GstPad * pad)
|
||||||
{
|
{
|
||||||
static const GstQueryType src_types[] = {
|
static const GstQueryType src_types[] = {
|
||||||
GST_QUERY_POSITION,
|
GST_QUERY_POSITION,
|
||||||
|
GST_QUERY_DURATION,
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -326,9 +327,14 @@ gst_qtdemux_handle_src_query (GstPad * pad, GstQuery * query)
|
||||||
|
|
||||||
switch (GST_QUERY_TYPE (query)) {
|
switch (GST_QUERY_TYPE (query)) {
|
||||||
case GST_QUERY_POSITION:
|
case GST_QUERY_POSITION:
|
||||||
if (qtdemux->duration != 0 && qtdemux->timescale != 0 &&
|
if (GST_CLOCK_TIME_IS_VALID (qtdemux->last_ts)) {
|
||||||
GST_CLOCK_TIME_IS_VALID (qtdemux->last_ts)) {
|
gst_query_set_position (query, GST_FORMAT_TIME, qtdemux->last_ts);
|
||||||
gst_query_set_position (query, GST_FORMAT_TIME, qtdemux->last_ts,
|
res = TRUE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GST_QUERY_DURATION:
|
||||||
|
if (qtdemux->duration != 0 && qtdemux->timescale != 0) {
|
||||||
|
gst_query_set_duration (query, GST_FORMAT_TIME,
|
||||||
(guint64) qtdemux->duration * GST_SECOND / qtdemux->timescale);
|
(guint64) qtdemux->duration * GST_SECOND / qtdemux->timescale);
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue