I am trying to write a GStreamer (0.10.34) plugin. I need manipulate an incoming image. I have my Sink caps set as “video/x-raw-yuv” so I know I’ll be getting video.
I am having trouble in understanding how to use the GstBuffer, more specifically:
- How do I get the bits per pixel?
- Given the bpp, how do I determine the dimensions of the buffer?
I am currently elbows deep in 0.10.34 core documentation reading about GstStructure and GstQuarks… I think I’m in the wrong area.
As always, thanks for any advice.
After some source code hunting (jpegenc), I found the BaseLib plugins, most importantly GstVideo. This gives you the function
gst_video_format_parse_capsGstVideoFormat seems to be what you use to parse incoming video information.