Detecting video stream resolution in appsink with GStreamer 1.0
Tim Müller
tim at centricular.com
Mon Jan 29 14:55:27 UTC 2018
On Mon, 2018-01-29 at 07:23 -0700, tobatrance wrote:
Hi,
> Once you pulled a sample with gst_app_sink_pull_sample you can
> extract its buffer with gst_sample_get_buffer and following get the
> video frame and video info with gst_video_frame_map. The video info
> object got the information you're looking for.
That should work. Alternatively, you can also look at the GstCaps in
the GstSample with gst_sample_get_caps() and either poke at the fields
directly or parse it into a VideoInfo struct with
gst_video_info_from_caps(). Or you look at the caps on the element's
sink pad with gst_pad_get_current_caps().
Cheers
-tim
--
Tim Müller, Centricular Ltd - http://www.centricular.com
More information about the gstreamer-devel
mailing list