Help with setting Caps in src code - not using gst-parse-launch

JimmyHan leedag8 at gmail.com
Fri Mar 19 01:34:51 UTC 2021


Hello Beginner here, 

Started learning and understanding more n more with practice.
I have been searching up n down for examples on adding caps in code but
after a few days I still don't have a clue. 

E.g setting width and height, or denoise, detail, brightness, hue,
frc-algorithm and the list goes on.
My boss has built a UI in html, php; where he has been able to add to inser
text or choose from a drop down list options for the pipeline.

Looks like this screenshot of my setup:
<http://gstreamer-devel.966125.n4.nabble.com/file/t379895/rsz_screenshot_from_2021-03-18_17-24-45.png> 

My task was to add and integrate those options shown in the image.After
choosing those options I then create a xml file, then read that xml file
options into variables using an xmlreader. 

For e.g I know a video source capabilities would include width and height. 
I know how to add those caps using gst-launch-1.0 or gst-parse-launch


what I really wanna know is how do I get that done in code. 
I don't even have any idea which element has capabilities such as the others
shown in the image but for now I'd just like to how to add them in code.

I have seen e.g. such as:

/GstElements *capsfilter;/
GstCaps * caps;

/capsfilter = gst_element_factory_make ("capsfilter", "capsfilter");/ 
/caps  = gst_caps_new_simple ("video/x-raw", "width", G_TYPE_INT, 1920,
"height", G_TYPE_INT, 1080, "framerate", G_TYPE_INT, 60, NULL);/
g_object_set (capsfilter, "caps", caps, NULL);
/gst_caps_unref (caps);/

I'd also appreciate any idea or guide on adjusting these in code:
denoise, detail, brightness, hue, frc-algorithm, etc



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210318/89fbd34d/attachment.htm>


More information about the gstreamer-devel mailing list