Dynamic pipeline (videosink swapping)

Victor Jaquez vjaquez at igalia.com
Mon Apr 4 07:48:28 UTC 2022

On Mon, 04 Apr 2022 at 14:33, Rob Kramer via gstreamer-devel wrote:
> On 4/4/22 13:40, Nirbheek Chauhan via gstreamer-devel wrote:
> > 
> > playbin uses decodebin, which will autoplug elements that are rank
> > MARGINAL or higher. The new va decoders are ranked as NONE, since they
> > are new. To autoplug them, you need to change their rank. This is one
> > way to do it:
> > 
> > export GST_PLUGIN_FEATURE_RANK=vampeg2dec:257,vah264dec:257,vah265dec:257,vapostproc:257
> > 
> > This will set the rank to PRIMARY+1, which is higher than the vaapi
> > elements, which will make the app prefer va over vaapi.
> Thanks again, that seems to select the vampeg2dec element, and seems to work
> with my dynamic sink plugger example..
> In the dot file, there is no mention of VASurface anymore though. Is that
> expected, or are things being copied between video and main memory? When
> using gst-play-1.0, it does look like the vampeg2dec version uses ~5% less
> CPU (~10% vs ~15%).

Yes, when the va decoder negotiates with downstream, it tries to check
if downstream can handle video meta, if it doesn't (which tee might
report drop), va encoder internally downloads and copies the frame onto
system memory.

> I've uploaded a dot-file from gst-play, in case you'd like to have a look:
> https://pastebin.com/VYPXJP2d

Even more, your pipeline does a color conversion in CPU memory.


> Cheers!
>     Rob

More information about the gstreamer-devel mailing list