Hi
i need to use/set/change uniforms in glshader from bash .
but cannot find example how to use it. in python it works ok, but cannot find how to set it in bash. need to set several uniforms.
…! glshader fragment= … uniforms=“var=1.0” ! …
gives error
Thnx
As with any GstStructure
deserialisation, the GstStructure
needs a name. The name can be anything in this case as it is not used.
Try:
glshader uniforms="uniforms,var=1.0"
thanks, but seems it doesnt working - debugging gives error/note
FIXME _set_uniform:Dont know how to set the ‘var’ parameter. Unknown type.
but var is declared as uniform float in shader
shader defined as
#version 120
uff. thnx, seems fixed :
used type casting
“uniforms,var=(float)1.0”
float
is not a known GType. You would need to use gfloat
.
but it worked with gfloat as well as with float cast
now next problem - after gldownload i have several gdkpixbuffoverlays and textoverlays like that:
… ! gldownload ! gdkpixbufoverlay location=icon.png ! textoverlay text=“sometext” ! v4l2h264enc …
and it appears that R and B channel is swapped in opengl part as well as in overlays part.
after searching i found a some strange convert way - use v4l2convert twice, after gldownload - one for convert to BGRx, and next one to convert to NV12
if i 'll use only convert to BGRx - opengl image R and B is correct, but overlays gets Rand B swapped. so i need to use 2nd convert to NV12 immediately after 1st.
what formats/way i should use to get one v4l2convert conversion?