How to get GstVideoInfo from GstBuffer

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to get GstVideoInfo from GstBuffer

Baby Octopus
Administrator
Hi,

I'm adding GstPadProbe to the sink pad of textoverlay element to know its video resolution with the probe_type as GST_PAD_PROBE_TYPE_BUFFER

I'm getting GstBuffer *buffer in the callback. How can I extract GstVideoInfo fro GstBuffer?

Thanks

~BO
Reply | Threaded
Open this post in threaded view
|

Re: How to get GstVideoInfo from GstBuffer

Nicolas Dufresne-4
Le mercredi 16 novembre 2016 à 04:23 -0800, Baby Octopus a écrit :
> I'm getting GstBuffer *buffer in the callback. How can I extract
> GstVideoInfo fro GstBuffer?

You can't. You need to track the GST_CAPS_EVENT. This is of type
GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM. Then you can use
gst_event_parse_caps() and gst_video_info_from_caps().

Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel