GNOME Bugzilla – Bug 432876
current time level in queue
Last modified: 2007-05-24 14:40:20 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.
Created attachment 86904 [details] [review] use buffer timestamp diff when duration is missing
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.
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.
Latest version works fine.