List Info

Thread: gstreamer/glib scheduler behavior




gstreamer/glib scheduler behavior
user name
2006-04-18 16:38:00
I have some questions about gstreamer/glib scheduler:

- Is gstreamer run loop get descheduled and give some CPU to
other
process/threads when it has nothing to do ?

- Is gstreamer going into a sleep function when it has
nothing to do or
is it blocked on a semaphore or mutex ?

- Is it possible to increase thread priority for audio
driver ? Is it
done inside the plug-in ?

- If I want to implement a video output plug-in of a video
player, will
gstreamer call video output plug-in according to the video 
time stamp
included in the input file or should I manage some sleep
functions
inside the video output plug-in ?

David



 
 


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking
scripting language
that extends applications into web and mobile media. Attend
the live webcast
and join the prime developer group breaking into this new
coding territory!
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
gstreamer-devel mailing list
gstreamer-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
gstreamer/glib scheduler behavior
user name
2006-04-19 14:03:13
On Tue, 2006-04-18 at 18:38 +0200, David Giguet wrote:
> I have some questions about gstreamer/glib scheduler:
> 
> - Is gstreamer run loop get descheduled and give some
CPU to other
> process/threads when it has nothing to do ?

In GStreamer 0.10, elements (mostly sources or demuxers)
start a kernel
thread to perform the data passing. The normal rules apply
for
scheduling these threads, ie.
a running thread gets unscheduled if a) it consumed its CPU
slice b) if
needs to acquire a mutex (rare, happens only when
manipulating the
running pipeline) c) it performs a blocking operation such
as
select/read/cond_wait/... 
So, most of a typical playback pipeline is spent in
cond_wait for the
clock synchronisation, during that time any other thread can
run freely.

> 
> - Is gstreamer going into a sleep function when it has
nothing to do or
> is it blocked on a semaphore or mutex ?

It is blocked on a mutex or any other blocking kernel
operation
currently.

> 
> - Is it possible to increase thread priority for audio
driver ? Is it
> done inside the plug-in ?

Since we rely on glib's GThread API, there is a method
g_thread_set_priority() which claims it doesn't do much on
Linux...

> 
> - If I want to implement a video output plug-in of a
video player, will
> gstreamer call video output plug-in according to the
video  time stamp
> included in the input file or should I manage some
sleep functions
> inside the video output plug-in ?

The gstvideosink base class will do any synchronisation for
you, you
just need to render the images when your vmethod is called.
An example
of a well written videosink can be found in the
gst-plugins-base module
in sys/xvimage/xvimagesink.c

Wim
> 
> David

> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a
groundbreaking scripting language
> that extends applications into web and mobile media.
Attend the live webcast
> and join the prime developer group breaking into this
new coding territory!
> http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devellists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
-- 
Wim Taymans <wimfluendo.com>



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
gstreamer-devel mailing list
gstreamer-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )