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 678386 - [matroskademux] Returns TRUE for unsupported POSITION/DURATION queries
[matroskademux] Returns TRUE for unsupported POSITION/DURATION queries
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.36
Other All
: Normal normal
: 0.10.32
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-06-19 10:34 UTC by Xavi Artigas
Modified: 2012-06-26 09:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Playback tutorial 3 from the GStreamer SDK (5.22 KB, text/plain)
2012-06-19 10:34 UTC, Xavi Artigas
Details

Description Xavi Artigas 2012-06-19 10:34:41 UTC
Created attachment 216729 [details]
Playback tutorial 3 from the GStreamer SDK

Although there seems to be code in basesink to handle Position Queries in Percent format, it fails in all the sinks I tested (ximage and d3dvideosink): The query returns TRUE, but position is GST_CLOCK_TIME_NONE.

If line 79 of the attached code is changed to
    GstFormat format = GST_FORMAT_PERCENT;
instead of GST_FORMAT_TIME, all queries will fail.
Comment 1 Sebastian Dröge (slomo) 2012-06-25 11:38:42 UTC
This change in gst-plugins-good makes it almost work:

commit 8cbaaba94885486cb124892aad6d36dc7925b922
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Mon Jun 25 13:31:16 2012 +0200

    matroskademux: Return FALSE from queries if we can't answer POSITION/DURATION queries


Additionally your validity checks for the duration are not correct. It will return 0xffffffffffffffff as duration in percent, and that is not a valid clock time. Just use GST_FORMAT_PERCENT_MAX instead of querying the duration in percent. Then everything works.

Also don't use GST_CLOCK_TIME_IS_VALID() on the position in percentage either.