[gst-devel] CPU load while in GST_PAUSED_STATE

Mathrick mnews2 at wp.pl
Sat Jan 24 06:25:01 CET 2004


W liście z sob, 24-01-2004, godz. 14:37, Thomas Comiotto pisze: 
> Hello, 
> 
> I am running a most miminalistic pipeline videotestsrc ! xvideosink within a 
> GTK idle_func() for testing purposes using GST 6.4. 
> Now, as soon as I swich the pipeline to GST_PAUSED_STATE, or alternatively, 
> stop iterating the pipeline for a while, the CPU load goes up to all of the 
> available CPU time (97%) while the running/iterated pipeline generates a load 
> of 1.7%.
> I thought an uniterated/paused pipeline would mean just freezing the stream in 
> its current state while doing _nothing_ so what am i missing?

Of course _pipeline_ is not doing much, but _your app_ does a lot - it
constantly invokes idle_func() that returns immediately, and gets
invoked again. So it's effectively equivalent to while (1);. You have to
disable idle handler after pausing pipeline.

> I am using GST 6.4 because I can't figure out how to get the XID needed for 
> stealing sockets in GTK in GST7.3. What is the preferred method of including 
> GST videosinks in GTK widgets, since in 7.3 gst_util_get_int_arg () doesn't 
> seem to be available anymore.

It's done using various *Overlay [1] interfaces. So far only XOverlay
implemented by x[v]imagesink elements seems to be available. Others can
provide you with specifics.

Cheers,
Maciej

[1] That overlay has nothing to do with "normal" overlay == "hardware
accelerated video display area". It's just (rather unfortunate) name for
"method of embedding video in apps". Different types of *Overlay
interfaces (will) exist for various embedding types, like X, DirectFB,
SDL, etc.

-- 
"Tautologizm to coś tautologicznego"
   Maciej Katafiasz <mnews2 at wp.pl>
       http://mathrick.blog.pl





More information about the gstreamer-devel mailing list