Changing appsource caps dynamically

Tim Müller tim at centricular.com
Mon Jun 18 13:33:10 UTC 2018


On Mon, 2018-06-18 at 06:16 -0700, Nostalgia wrote:

Hi,

> I have this pipeline : appsrc - omxh264enc - filter - appsink.
> I am using appsrc to push  raw video frame to the pipeline,  frame
> size (or resolution) is changing dynamically, so I must change appsrc
> caps before pushing frame to the pipeline.
> 
> Is it possible to do this change ? If yes, what steps do I follow to
> change caps without need to unref the pipeline ?

You should be able to just

 - push buffer in old format
 - set new caps on appsrc
 - push buffer in new format

and it should just work (assuming omxh264enc supports reconfiguring
itself on the fly), at least with recent GStreamer versions.

Cheers
-Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com


More information about the gstreamer-devel mailing list