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 520300 - [alsasrc] provide-clock=false messes up buffer durations
[alsasrc] provide-clock=false messes up buffer durations
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal blocker
: 0.10.18
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-04 14:40 UTC by René Stadler
Modified: 2008-03-10 17:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fix the problem (2.21 KB, patch)
2008-03-10 15:01 UTC, Wim Taymans
committed Details | Review

Description René Stadler 2008-03-04 14:40:01 UTC
This outputs some funny buffer durations:

gst-launch-0.10 -v alsasrc provide-clock=false ! fakesink

...

/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:00.018047808, duration: 0:00:00.00326738
4, offset: 0, offset_end: 940, flags: 32) 0x8197a80"
/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:00.039414808, duration: 0:00:00.00321557
7, offset: 940, offset_end: 1880, flags: 0) 0x8197ad0"
/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:00.060690808, duration: 0:00:00.00325477
0, offset: 1880, offset_end: 2820, flags: 0) 0x8197b20"
/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:00.082106808, duration: 0:00:00.00315396
2, offset: 2820, offset_end: 3760, flags: 0) 0x8197b70"
/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:00.124777808, duration: 5124095:34:33.69
1349771, offset: 3760, offset_end: 4700, flags: 0) 0x819e820"
/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:00.124881808, duration: 0:00:00.00300934
8, offset: 4700, offset_end: 5640, flags: 0) 0x819e870"
/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:00.167540808, duration: 5124095:34:33.69
1217157, offset: 5640, offset_end: 6580, flags: 0) 0x819e8c0"
/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:00.167631808, duration: 0:00:00.00288973
3, offset: 6580, offset_end: 7520, flags: 0) 0x819e910"
/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:00.210081808, duration: 5124095:34:33.69
1306542, offset: 7520, offset_end: 8460, flags: 0) 0x819e960"
/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:00.210163808, duration: 0:00:00.00298811
9, offset: 8460, offset_end: 9400, flags: 0) 0x819e9b0"
/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:00.231378808, duration: 0:00:00.00308831
2, offset: 9400, offset_end: 10340, flags: 0) 0x819ea00"


Broken duration values like 5124095:34:33.69 keep popping up.  Also, the duration seems to decrease over time.  When they reach almost 0, only values very close to 5124095:34:33.688102923 and 5124095:34:33.709365730 appear:

/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:03.580915808, duration: 5124095:34:33.688272996, offset: 156040, offset_end: 156980, flags: 0) 0x819eb40"
/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:03.581023808, duration: 5124095:34:33.709480188, offset: 156980, offset_end: 157920, flags: 0) 0x819eb90"
/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:03.623544808, duration: 5124095:34:33.688274381, offset: 157920, offset_end: 158860, flags: 0) 0x819ec00"
/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:03.623646808, duration: 5124095:34:33.709487574, offset: 158860, offset_end: 159800, flags: 0) 0x819ec50"
/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:03.666242808, duration: 5124095:34:33.688206767, offset: 159800, offset_end: 160740, flags: 0) 0x819eca0"
/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:03.666396808, duration: 5124095:34:33.709367959, offset: 160740, offset_end: 161680, flags: 0) 0x819ecf0"
/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:03.708885808, duration: 5124095:34:33.688194152, offset: 161680, offset_end: 162620, flags: 0) 0x819eca0"
/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:03.709002808, duration: 5124095:34:33.709392345, offset: 162620, offset_end: 163560, flags: 0) 0x819ec50"
/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:03.751543808, duration: 5124095:34:33.688166538, offset: 163560, offset_end: 164500, flags: 0) 0x819ec00"
/pipeline0/fakesink0: last-message = "chain   ******* < ( 7520 bytes, timestamp: 0:00:03.751659808, duration: 5124095:34:33.709365730, offset: 164500, offset_end: 165440, flags: 0) 0x819eb90"
Comment 1 Wim Taymans 2008-03-10 15:01:33 UTC
Created attachment 106974 [details] [review]
patch to fix the problem

This patch sets the duration of the buffers to the ideal duration (based on samplerate and number of samples).
Comment 2 René Stadler 2008-03-10 15:07:01 UTC
The patch works, the durations match the provide-clock=true case.
Comment 3 Wim Taymans 2008-03-10 17:19:49 UTC
        * gst-libs/gst/audio/gstbaseaudiosrc.c:
        (gst_base_audio_src_create):
        Fix duration when no clock was provided. Fixes #520300.