[gst-devel] blocked glib idle/timeout
Edward Hervey
bilboed at gmail.com
Wed Mar 25 07:48:50 CET 2009
On Tue, 2009-03-24 at 17:18 -0700, Dan Taylor wrote:
> My simplest test pipeline has dvbsrc, mpegtsdemux (tried flutsdemux,
> too), and
> two filesinks (location is /dev/null). There's a new pad callback to
> connect
> the demuxer to the filesinks, which works when the specified program
> number
> is in the stream.
>
> When I use a program number that exists in the stream, the functions
> called with g_idle_add_full() and g_timeout_add_full(), and the shorter
> forms, are called. When the program number doesn't exist in the stream,
> the timeout is never called, and the idle function stops within a
> second.
> The application is only consuming 3% of a CPU, though, so it isn't busy-
> waiting in the traditionally bad sense.
>
> dvbsrc does not seem to care to where it sources data, and the only
> difference
> for the demuxer(s) is the the program number exists/does not exist.
>
> Anyone got an idea where the demuxers could be blocking glib idle and
> timeout?
>
> I'm working down at the sink end of the stream, so I don't know the
> demuxers
> very well, but I will look deeper into them if someone knows where to
> start.
The first question is ... do you have a GMainLoop running ?
g_idle_add* and g_timeout_add* will only work if you have a main loop
running.
The other question is ... why do you need to do that from the main
thread ? Can't you connect your pads directly from the 'pad_added'
callback ?
Edward
>
>
> ------------------------------------------------------------------------------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list