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 340842 - do latency calculation for live sources
do latency calculation for live sources
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
Other Linux
: Normal enhancement
: 0.10.13
Assigned To: Wim Taymans
GStreamer Maintainers
: 399606 439570 (view as bug list)
Depends on:
Reported: 2006-05-06 16:31 UTC by Sebastian Dröge (slomo)
Modified: 2007-05-19 13:28 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14

first attempt (36.64 KB, patch)
2007-01-10 14:11 UTC, Wim Taymans
needs-work Details | Review
second attempt (63.57 KB, patch)
2007-02-28 18:03 UTC, Wim Taymans
none Details | Review
patch to -base (5.38 KB, patch)
2007-02-28 18:06 UTC, Wim Taymans
none Details | Review
updated patch for core (77.57 KB, patch)
2007-03-09 15:31 UTC, Wim Taymans
none Details | Review
updated -base patch (8.56 KB, patch)
2007-03-09 15:33 UTC, Wim Taymans
committed Details | Review
update (68.11 KB, patch)
2007-03-12 16:06 UTC, Jan Schmidt
committed Details | Review

Description Sebastian Dröge (slomo) 2006-05-06 16:31:42 UTC
with the latest releases of everything on Ubuntu Dapper alsasrc only records the first second.
When doing
gst-launch-0.10 alsasrc ! alsasink
(or even when adding a audioconvert in between)
the first second is played and silence after that.
audiotestsrc works fine.

This is the log when running it with debug level 3:


Ubuntu Bug:
Comment 1 Jan Schmidt 2006-05-06 21:35:59 UTC
Try increasing the latency-time property on alsasrc. I suspect your problem is that the audio is being discarded by the alsasink as arriving too late.
Comment 2 Sebastian Dröge (slomo) 2006-05-08 06:48:08 UTC
Doesn't change anything
Comment 3 Wim Taymans 2006-05-08 08:31:43 UTC
cannot be made to work out of the box since we don't do latency calculation yet. adding sync=false to alsasink should somewhat work better. Using this bug to track this issue.
Comment 4 Sebastian Dröge (slomo) 2006-05-08 19:19:59 UTC
Yes sync=false solves this problem
Comment 5 Wim Taymans 2007-01-10 14:11:17 UTC
Created attachment 79947 [details] [review]
first attempt

This is the current status in my local tree. It's based on docs/design/draft-latency.txt.


- implement latency calculation
- implement SET_LATENCY event
- clean up GstBinState MESSAGE
Comment 6 Sebastian Dröge (slomo) 2007-01-23 22:12:08 UTC
*** Bug 399606 has been marked as a duplicate of this bug. ***
Comment 7 Sebastian Dröge (slomo) 2007-01-23 22:13:27 UTC
When running the pipeline now with the latest versions of everything one gets 

LC_ALL=C gst-launch-0.10 alsasrc ! alsasink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: audioclock0
WARNING: Element "alsasink0" warns: gstbaseaudiosink.c(696): gst_base_audio_sink_render (): /pipeline0/alsasink0:
Unexpected discontinuity in audio timestamps of more than half a second (0:00:00.641224489), resyncing
Comment 8 Wim Taymans 2007-02-28 18:03:04 UTC
Created attachment 83564 [details] [review]
second attempt

Second patch for core that changes the way state changes happen so that the latency query and configuration can be done during the final PAUSED->PLAYING state change of the pipeline.
Comment 9 Wim Taymans 2007-02-28 18:06:43 UTC
Created attachment 83566 [details] [review]
patch to -base

patch to add needed changes to -base plugins, mostly playbin etc..
Comment 10 Wim Taymans 2007-03-09 15:31:13 UTC
Created attachment 84312 [details] [review]
updated patch for core
Comment 11 Wim Taymans 2007-03-09 15:33:53 UTC
Created attachment 84313 [details] [review]
updated -base patch
Comment 12 Jan Schmidt 2007-03-12 16:06:32 UTC
Created attachment 84434 [details] [review]

Updated core patch which removes conflicts and fuzz due to the gst_buffer_copy_metadata API being committed.
Comment 13 Wim Taymans 2007-03-19 10:58:33 UTC
commited to CVS now.
Comment 14 Tim-Philipp Müller 2007-05-19 13:28:44 UTC
*** Bug 439570 has been marked as a duplicate of this bug. ***