Caps filtering
Sebastian Dröge
sebastian at centricular.com
Tue Nov 17 03:44:20 PST 2015
On Mo, 2015-11-16 at 05:01 -0800, R S wrote:
> Hi,
>
> I am new to GStreamer. I am designing a source capture plugin named
> "my_src". Following is the sample pipeline:
>
> gst-launch-1.0 my_src name=src src.raw_src ! 'video/x-raw,
> framerate=(fraction)15/1, width=640, height=480' ! filesink
> location=test_640_360.yuv
>
> I want to extract the caps from the pipeline and initialize my camera
> accordingly before starting to stream. Please give me idea, how to
> fetch height, width, format, framerate etc. from my pipe during
> initialization.
If your source element is based on GstBaseSrc (it should!), then you
will get the caps that are negotiated in the GstBaseSrc::set_caps()
vfunc. GstBaseSrc will check before starting what downstream supports,
and then chooses one of the options (see the GstBaseSrc::fixate() vfunc
for overriding the default behaviour) and notifies you about those
caps.
--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151117/0aa0d8b8/attachment.sig>
More information about the gstreamer-devel
mailing list