如何在 gstreamer 命令行的引号中使用引号。这是 gstreamer 版本 1.14.4 和 ubuntu 版本 4.9.140-tegra 使用 bash shell 都在 Jetson Nano 开发系统上运行。
我尝试了各种转义方法,但都没有用。
以下在接收器定义中包含双引号和引号并且不起作用。
gst-launch-1.0 playbin uri=file:///home/tom/Videos/UHD_demo_Nature.mp4 sink="glupload ! glshader fragment="\"`ca
t testfrag.frag`\"" ! glimagesinkelement"
我假设这是一个转义序列问题,我尝试了很多方法来转义,但我不想让任何人看到这个问题。 opengl 片段是正确的,并且可以使用一个简单的命令行示例工作:
gst-launch-1.0 videotestsrc ! glupload ! glshader fragment="\"`cat testfrag.frag`\"" ! glimagesink
任何想法是我需要更正双引号的命令 shell 问题或 gstreamer 问题。
这是片段:
\#version 100
#ifdef GL_ES
precision mediump float;
#endif
varying vec2 v_texcoord;
uniform sampler2D tex;
uniform float time;
uniform float width;
uniform float height;
vec4 myColor;
void main () {
myColor = texture2D( tex, v_texcoord );
gl_FragColor = myColor;
gl_FragColor.r = myColor.b;
gl_FragColor.b = myColor.r;
}
当我运行命令行时,出现以下错误:
Generates an error message:
WARNING: erroneous pipeline: no element "100"
您是否尝试过 %22
转义引号?
This网站显示了 html 编码,我从这一行得到了这个想法:
The query string for the new URI with '&' separating query elements. Elements containing '&' characters should encode them as "%26".
来自 this网站。
我是一名优秀的程序员,十分优秀!