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 592657 - [appsink] Blocks after entering on pause state
[appsink] Blocks after entering on pause state
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.25
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-08-22 02:33 UTC by tiagokatcipis
Modified: 2009-09-10 14:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
source code to reproduce the problem (2.36 KB, application/x-gzip)
2009-08-22 02:33 UTC, tiagokatcipis
Details

Description tiagokatcipis 2009-08-22 02:33:01 UTC
Created attachment 141383 [details]
source code to reproduce the problem

If i use appsink with block behaviour, setting a max number of buffers and
using another thread to pull these buffers, the stream thread blocks when
reaches the limit of buffers and the other thread pull the buffers just fine
unblocking the pipe. When i set the pipeline to PAUSE state, it goes to pause
ok, but when i try to set it back to playing, the pipe seens to go to play
state but the stream thread seens to be blocked. I tried to change the sync and
async properties, but the problem persists.

It is interesting that i can pull out the remaining buffers from appsink even
before setting the pipeline back to playing, but after the remaining buffers
end i got blocked on the pull_buffer function, thats why i think the streaming
thread got blocked.

Here is the source code that can reproduce the problem:

https://svn.inf.ufsc.br/katcipis/c/gstreamer/bug_appsink_block/

Or see the attachment.
Comment 1 tiagokatcipis 2009-08-22 02:40:11 UTC
Sorry 

"It is interesting that i can pull out the remaining buffers from appsink AFTER setting the pipeline back to playing"

sorry for my lousy english, hope i was clear enough now.
Comment 2 tiagokatcipis 2009-08-22 11:10:34 UTC
Since it is my first bug report i would like to congratulate everyone involved on gstreamer support and development, you are doing a great job, the framework has a great design and is very well documented, using the framework and even writing new plugins is easy thanks to all the documentation and tools provided.

Hope i can help with this bug report, and more in the future. 

best regards
Comment 3 Wim Taymans 2009-08-24 11:17:27 UTC
commit 2c08c76383ffa2baae5c8f7edf2c5af446390f28
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Mon Aug 24 13:15:06 2009 +0200

    appsink: don't block in paused
    
    When we are asked to unlock we should either leave the render function or call
    the wait_preroll method to release the stream lock.
    
    Fixes #592657
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2009-09-10 12:01:51 UTC
(In reply to comment #2)
> Since it is my first bug report i would like to congratulate everyone involved
> on gstreamer support and development, you are doing a great job, the framework
> has a great design and is very well documented, using the framework and even
> writing new plugins is easy thanks to all the documentation and tools provided.
> 
> Hope i can help with this bug report, and more in the future. 
> 
> best regards

join the irc channel. if you wrote useful plugins open a bug report and put them there as a patch against gst-plugin-bad. Study existing plugins and improve them :) There are many good things to do.
Comment 5 tiagokatcipis 2009-09-10 14:35:50 UTC
I have made just simple plugins that where too specific to a project on my work (one where a modification of wavparse that ignores the duration on the wav header, so i could open and play files where they where still being created, the other removes silence from the stream and plays only voice, its very simple and uses a VAD to do the job, since gstreamer has cutter i imagine that it is not too usefull).

Im thinking on making a AEC (using speex), or helping on one that is already being made. And if i find anything that can be improved on a plugin i will improve and patch, im very new at gstreamer but im really looking forward to help :-), i dont like the idea of only using something and not helping at all.

best regards
Katcipis