Unable to set Capabilities on v4l2src using C
Nicolas Dufresne
nicolas at ndufresne.ca
Thu Mar 18 20:53:14 UTC 2021
Le jeudi 18 mars 2021 à 14:05 -0500, iotsystek a écrit :
> Setup:
> I am using GStreamer 1.18.2 on embedded Linux with a couple of USB cameras
> and sending the video to Windows.
>
> I have a working pipeline.
> USB Cameras attached to the embedded computer using the following command
> example:
>
> gst-launch-1.0 v4l2src device=/dev/video0 ! \
> 'video/x-raw, width=640, height=480' ! \
> videorate max-rate=6 ! \
> videoconvert ! \
> x264enc pass=qual quantizer=20 tune=zerolatency ! \
> rtph264pay ! \
> udpsink host=192.168.168.32 port=1234
>
> The PC receives and displays the streams with no issue.
>
> Now I am attempting to translate the gst-launch-1.0 command into C code. I
> have been totally unsuccessful in setting the capabilities ('video/x-raw,
> width=640, height=480') on the v4l2src, which does not have a ‘caps’
> property.
You'll need to place an element called "capsfilter" which has a caps property.
>
> I would be grateful for both a code snippet / example detailing the C source
> code needed to do this and guidance as to where I might look to find this
> kind of answer directly. Is there a repository of GStreamer version 1.0 C
> Code snipets?
>
> Also related to the above. Once I have this working I will need to be able
> to change these camera height and width capabilities.
>
> I also have a socket connection (totally unrelated to GStreamer) to the
> embedded Linux system and use it for control and feedback of additional
> hardware. I will need to raise and lower the cameras width and height while
> it is running via this socket connection. Will I have to totally stop the
> video flow or is there a way to adjust these setting on the fly.
>
> Again the code snippet would be greatly appreciated.
>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list