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 582167 - jacksink does not flush the jack port when going to READY
jacksink does not flush the jack port when going to READY
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.22
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-05-11 13:08 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2009-05-28 07:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
flush the ports (5.15 KB, patch)
2009-05-11 13:18 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review

Description Stefan Sauer (gstreamer, gtkdoc dev) 2009-05-11 13:08:43 UTC
gst-plugins-base/tests/examples/seek 15 "audiotestsrc ! jackaudiosink"

- press play, it beeps
- press stop, it plays a stuttering beep

- press play, it beeps
- press pause, jack_process_cb writes silence
- press stop, its stops

patch follow, it works for me, but some review would be nice.
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2009-05-11 13:18:32 UTC
Created attachment 134390 [details] [review]
flush the ports

I am not sure if there is a better way to achive the same.
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2009-05-28 07:17:17 UTC
No one seems to object ...

commit a0898363d9dd1bb524da2d9715afd83d2f267887
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Mon May 11 16:12:54 2009 +0300

    jack: when stopping playback, do one more cycle to flush the port. Fixes #582167
    
    The gst_jack_audio_client_set_active() flags the port as deactivating and uses
    a GCond to wait until the jack_process_cb() has run once more and cleared the
    flag. This way the client zero's the buffer. This happens if one manyally go
    to PAUSED and then to READY, while leting the mainloop run inbetween.