<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-US">I haven’t tried this myself but you might find something useful in the re-negotiation part of<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-US"><a href="https://gstreamer.freedesktop.org/documentation/plugin-development/advanced/negotiation.html?gi-language=c">https://gstreamer.freedesktop.org/documentation/plugin-development/advanced/negotiation.html?gi-language=c</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-US">Grüße<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Von:</b> gstreamer-devel <gstreamer-devel-bounces@lists.freedesktop.org>
<b>Im Auftrag von </b>JimmyHan<br>
<b>Gesendet:</b> Freitag, 19. März 2021 02:35<br>
<b>An:</b> gstreamer-devel@lists.freedesktop.org<br>
<b>Betreff:</b> Help with setting Caps in src code - not using gst-parse-launch<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hello Beginner here, <br>
<br>
Started learning and understanding more n more with practice. <br>
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.
<br>
<br>
E.g setting width and height, or denoise, detail, brightness, hue, frc-algorithm and the list goes on.
<br>
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.
<br>
<br>
Looks like this screenshot of my setup:<br>
<img border="0" width="500" height="406" style="width:5.2083in;height:4.2333in" id="_x0000_i1027" src="http://gstreamer-devel.966125.n4.nabble.com/file/t379895/rsz_screenshot_from_2021-03-18_17-24-45.png"><br>
<br>
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.
<br>
<br>
For e.g I know a video source capabilities would include width and height. <br>
I know how to add those caps using gst-launch-1.0 or gst-parse-launch<br>
<br>
<br>
what I really wanna know is how do I get that done in code. <br>
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.
<br>
<br>
I have seen e.g. such as:<br>
<br>
<i>GstElements *capsfilter;</i><br>
GstCaps * caps;<br>
<br>
<i>capsfilter = gst_element_factory_make ("capsfilter", "capsfilter");</i> <br>
<i>caps = gst_caps_new_simple ("video/x-raw", "width", G_TYPE_INT, 1920, "height", G_TYPE_INT, 1080, "framerate", G_TYPE_INT, 60, NULL);</i><br>
g_object_set (capsfilter, "caps", caps, NULL);<br>
<i>gst_caps_unref (caps);</i> <br>
<br>
I'd also appreciate any idea or guide on adjusting these in code:<br>
denoise, detail, brightness, hue, frc-algorithm, etc <o:p></o:p></p>
<div class="MsoNormal">
<hr size="2" width="240" style="width:180.0pt" align="left">
</div>
<p class="MsoNormal">Sent from the <a href="https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgstreamer-devel.966125.n4.nabble.com%2F&data=04%7C01%7C%7C4ec28fd90c424277540c08d8ea810e9d%7C28042244bb514cd680347776fa3703e8%7C1%7C1%7C637517187306190690%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=aWUz23YXz9TItRImkreoEdWZ38UmVS6IrE%2BnVaJCzFo%3D&reserved=0">
GStreamer-devel mailing list archive</a> at Nabble.com.<o:p></o:p></p>
</div>
</body>
</html>