Using more threads to increase bandwidth

Chris Tapp opensource at keylevel.com
Mon Nov 18 13:47:30 PST 2013


I've got an app using GStreamer 0.10 which takes arbitrary video streams and makes images available for rendering in GLES. I'm using two pipelines, both created using parse_launch.

1) playbin2 with video going to a fakesink;
2) appsrc ! ffmpefcolorspace ! videoscale ! fakesink.

The first pipleline plays the video in real time so that audio playback works.

The second is then used to convert the latest frame in the fakesink to the video format/size requested by GLES.

This is working as I want, but it gives lower frame rates than I would expect at times. I'm running on a dual core Atom with hyper-threading, so I should be able to have four threads running at a time.

The ppipeline created by playbin2 will have queues in it and so will use multiple threads. I tried adding some to the second pipeline:

  appsrc ! queue2 ! ffmpefcolorspace ! queue2 ! videoscale ! fakesink

but this hasn't pushed the peak cpu use up from it's 'normal' level of about 265%. I was hoping that this would help as I thought keeping 6 buffers in the pipeline would mean that the color space conversion and scaling would then run in different threads.

What should I be doing to maximize CPU usage?

Chris Tapp

opensource at keylevel.com
www.keylevel.com





More information about the gstreamer-devel mailing list