mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
media: use new api
This commit is contained in:
parent
6854a3c00f
commit
bbab01747d
1 changed files with 4 additions and 5 deletions
|
@ -299,7 +299,6 @@ do_loop (GstRTSPMediaClass * klass)
|
|||
static void
|
||||
collect_media_stats (GstRTSPMedia * media)
|
||||
{
|
||||
GstFormat format;
|
||||
gint64 position, duration;
|
||||
|
||||
media->range.unit = GST_RTSP_RANGE_NPT;
|
||||
|
@ -311,15 +310,15 @@ collect_media_stats (GstRTSPMedia * media)
|
|||
media->range.max.seconds = -1;
|
||||
} else {
|
||||
/* get the position */
|
||||
format = GST_FORMAT_TIME;
|
||||
if (!gst_element_query_position (media->pipeline, &format, &position)) {
|
||||
if (!gst_element_query_position (media->pipeline, GST_FORMAT_TIME,
|
||||
&position)) {
|
||||
GST_INFO ("position query failed");
|
||||
position = 0;
|
||||
}
|
||||
|
||||
/* get the duration */
|
||||
format = GST_FORMAT_TIME;
|
||||
if (!gst_element_query_duration (media->pipeline, &format, &duration)) {
|
||||
if (!gst_element_query_duration (media->pipeline, GST_FORMAT_TIME,
|
||||
&duration)) {
|
||||
GST_INFO ("duration query failed");
|
||||
duration = -1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue