How get buffer width, height from Gstreamer Caps

     Next lines of code helps to get buffer width, height from Gst.Caps for further buffer processing. In general, Caps are simple description of media formats and consists of multiple Gst.Structures

#1. Take Zero Structure from caps

#2. Query width from Structure using get_int

#3. Query height from Structure

     Here is full code for simple function that gets width, height from Caps.

     How to get caps inside Custom Gstreamer Plugin?

     Further readings:

Add a Comment

Your email address will not be published. Required fields are marked *