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 432876 - current time level in queue
current time level in queue
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal normal
: 0.10.13
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-04-24 08:16 UTC by Jonas Holmberg
Modified: 2007-05-24 14:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
use buffer timestamp diff when duration is missing (3.31 KB, patch)
2007-04-24 08:18 UTC, Jonas Holmberg
none Details | Review

Description Jonas Holmberg 2007-04-24 08:16:38 UTC
Please describe the problem:
queue is not updating current time level if duration is missing in buffers

Steps to reproduce:
1. Link a src element that does not set buffer duration to a queue
2. PLAY
3. read current-level-time


Actual results:
current-level-time property is always 0

Expected results:
current-level-time property should be > 0 when there are buffers in the queue

Does this happen every time?
Yes

Other information:
queue could figure out duration of a buffer by comparing a buffers's timestamp with the timestamp of the next buffer.
Comment 1 Jonas Holmberg 2007-04-24 08:18:05 UTC
Created attachment 86904 [details] [review]
use buffer timestamp diff when duration is missing
Comment 2 Wim Taymans 2007-05-10 15:22:21 UTC
alternative patch that also takes into account the NEWSEGMENT events. Does this also work for you?

        * plugins/elements/gstqueue.c: (gst_queue_class_init),
        (update_time_level), (gst_queue_locked_flush),
        (gst_queue_handle_sink_event), (gst_queue_chain),
        (gst_queue_push_one), (gst_queue_loop):
        * plugins/elements/gstqueue.h:
        Be smarter when calculating the current amount of data in the queue by
        measuring the difference between start and end timestamps (in running
        time) inside the queue. Fixes #432876.
        API: GstQueue::pushing to notify elements that we are pushing data again
        since the running signal is rather broken for this purpose.
Comment 3 Jonas Holmberg 2007-05-11 16:05:53 UTC
As you said on IRC: Current level time is 0 until a buffer is pushed. I need current level time to be updated before src pad is linked.
Comment 4 Jonas Holmberg 2007-05-14 10:16:43 UTC
Latest version works fine.