Getting size size with playbin2

Sebastian Dröge slomo at circular-chaos.org
Tue Jun 11 00:20:55 PDT 2013


On Di, 2013-06-11 at 10:11 +0300, Nikos Chantziaras wrote:
> There doesn't seem to be a direct way to get the video size (its 
> resolution, not byte size) in GStreamer.  I'm not sure how to do this. 
> It seems I have to watch for some signal from the pipeline (I'm using 
> playbin2) which is emitted when that information becomes available.  But 
> which signal?  And once it's emitted, how do I extract that information?
> 
> It all seems awfully round-about for such a simple operation, and it's 
> not clear at all how to proceed with this.  Any hints?
> 
> I'm on GStreamer 0.10.36.

You could connect to the "notify::caps" signal of the sinkpad of the
video sink, then get the caps (gst_pad_get_negotiated_caps()) and then
use the GstCaps and GstStructure API to extract width, height and
pixel-aspect-ratio.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130611/590020d4/attachment.pgp>


More information about the gstreamer-devel mailing list