Why xvimagesink uses more cpu than ximagesink in this case?

Yogesh Marwaha yogeshm.007 at gmail.com
Sun Jul 24 09:05:40 PDT 2011


On 24 July 2011 21:18, Haikal <conecones at gmail.com> wrote:
> On Sun, Jul 24, 2011 at 9:55 PM, Yogesh Marwaha <yogeshm.007 at gmail.com> wrote:
>> Hi,
>>
>> Just consider these simple pipelines:-
>>
>> gst-launch -v audiotestsrc ! goom ! ffmpegcolorspace ! ximagesink
>>
>> gst-launch -v audiotestsrc ! goom ! ffmpegcolorspace ! xvimagesink
>>
>> 2nd uses more cpu than first; though one would think xvimagesink would be
>> better. Any explanation?
>>
>
> $ gst-inspect ximagesink
> Plugin Details:
>  Name:                 ximagesink
>  Description:          X11 video output element based on standard Xlib calls
>
> $ gst-inspect xvimagesink
> Plugin Details:
>  Name:                 xvimagesink
>  Description:          XFree86 video output plugin using Xv extension
>
> Based on what i read on wikipedia, xv extension [0] is more
> sophisticated than xlib [1]. And of course, it will use more cpu. One
> feature on xv extension that not in xlib, is scaling. Just try to
> resize the window manually, you'll see the different ;)

I agree that xvimagesink is more "sophisticated", but it is supposed
to use the gpu for its "sophisticated" stuff.

In the given pipeline, out of all sophisticated stuff it can do, all
it is needed to do is draw image to screen, yet it is taking more of
cpu.

Resizing of window (in this pipeline) is a different issue. Because
ximagesink cant resize image, it forces goom to draw with a higher
resolution, hence increased cpu usage.

Regards,

Yogesh Marwaha


More information about the gstreamer-devel mailing list