After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 590045 - Query position fails when pipeline is paused and format is not time
Query position fails when pipeline is paused and format is not time
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal minor
: 0.10.25
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-07-28 17:58 UTC by Stian Selnes (stianse)
Modified: 2009-07-29 15:36 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Patch to query upstream about format conversion when it's necessary and pipeline is paused (1.29 KB, patch)
2009-07-28 18:01 UTC, Stian Selnes (stianse)
committed Details | Review

Description Stian Selnes (stianse) 2009-07-28 17:58:55 UTC
Please describe the problem:
Calling gst_element_query_position() fails when the pipeline is in paused state and the format is GST_FORMAT_DEFAULT.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Excerpt from log when calling gst_element_query_position with GST_FORMAT_DEFAULT.
GST_DEBUG="*sink*:5,*parse*:5"

When in playing state
--------------------------------------
0:00:16.620629794  5226 0xb60004e0 DEBUG               basesink gstbasesink.c:4479:gst_base_sink_query:<ximagesink0> position format 1
0:00:16.620701731  5226 0xb60004e0 DEBUG               basesink gstbasesink.c:4224:gst_base_sink_get_position_last:<ximagesink0> POSITION: 99:99:99.999999999
0:00:16.620752505  5226 0xb60004e0 DEBUG               basesink gstbasesink.c:4403:gst_base_sink_get_position:<ximagesink0> now 0:09:40.891340772 - base 0:09:40.211725692 - accum 0:00:00.000000000 + time 0:00:00.000000000
0:00:16.620814105  5226 0xb60004e0 DEBUG               basesink gstbasesink.c:4457:gst_base_sink_get_position:<ximagesink0> convert failed, try upstream
0:00:16.620863413  5226 0xb60004e0 DEBUG               rawparse gstrawparse.c:929:gst_raw_parse_src_query: src_query position
0:00:16.620900080  5226 0xb60004e0 LOG                 rawparse gstrawparse.c:937:gst_raw_parse_src_query: query position
0:00:16.620935699  5226 0xb60004e0 DEBUG               rawparse gstrawparse.c:524:gst_raw_parse_convert: converting value 1000000000 from time (3) to default (1)
0:00:16.621010709  5226 0xb60004e0 DEBUG               rawparse gstrawparse.c:610:gst_raw_parse_convert: ret=1 result 3


When in paused state
----------------------------------------
0:00:18.172938612  5226  0x93673e8 DEBUG               basesink gstbasesink.c:4479:gst_base_sink_query:<ximagesink0> position format 1
0:00:18.172992389  5226  0x93673e8 DEBUG               basesink gstbasesink.c:4428:gst_base_sink_get_position:<ximagesink0> position in PAUSED
0:00:18.173032339  5226  0x93673e8 DEBUG               basesink gstbasesink.c:4266:gst_base_sink_get_position_paused:<ximagesink0> POSITION as max: 0:00:01.000000000, time 0:00:00.000000000
0:00:18.173095685  5226  0x93673e8 DEBUG               basesink gstbasesink.c:4415:gst_base_sink_get_position:<ximagesink0> res: 0, POSITION: 99:99:99.999999999
Comment 1 Stian Selnes (stianse) 2009-07-28 18:01:30 UTC
Created attachment 139406 [details] [review]
Patch to query upstream about format conversion when it's necessary and pipeline is paused
Comment 2 Sebastian Dröge (slomo) 2009-07-29 11:34:06 UTC
Looks good, I'll push this after 0.10.24 release.

commit 2ab7976cd69875fcc592f24733e1003ce4d80227
Author: Stian Selnes <stian.selnes@gmail.com>
Date:   Wed Jul 29 13:33:11 2009 +0200

    basesink: Query upstream for the position if conversion in PAUSED failed
    
    Fixes bug #590045.
Comment 3 Wim Taymans 2009-07-29 15:36:05 UTC
I have an improved patch that I will push as well.