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

Thornton, Keith keith.thornton at
Fri Mar 19 05:02:14 UTC 2021

I haven't tried this myself but you might find something useful in the re-negotiation part of

Von: gstreamer-devel <gstreamer-devel-bounces at> Im Auftrag von JimmyHan
Gesendet: Freitag, 19. März 2021 02:35
An: gstreamer-devel at
Betreff: Help with setting Caps in src code - not using gst-parse-launch

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:

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 the GStreamer-devel mailing list archive<> at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list