简体   繁体   English

如何对gstreamer命令行的接收器定义的引号内的引号进行转义

[英]How to escape quotes inside quotes for a sink defintion for gstreamer command line

How to I use quotes in quotes for gstreamer command line. 如何在gstreamer命令行的引号中使用引号。 This is gstreamer version 1.14.4 and ubuntu version 4.9.140-tegra using bash shell all running on Jetson Nano dev system. 这是使用bash shell的gstreamer版本1.14.4和ubuntu版本4.9.140-tegra,它们都在Jetson Nano开发系统上运行。

I tried various escape methods and none worked. 我尝试了各种逃生方法,但都无济于事。

The following has double quotes with quotes inside the sink definition and doesn't work. 以下内容在接收器定义内用双引号引起来,并且不起作用。

gst-launch-1.0 playbin uri=file:///home/tom/Videos/UHD_demo_Nature.mp4 sink="glupload !  glshader fragment="\"`ca
t testfrag.frag`\"" ! glimagesinkelement"

I assume it's an escape sequence issue, I tried bunch of ways to escape but I would rather not bias anyone looking at this problem. 我认为这是一个转义序列问题,我尝试了多种方式进行转义,但我宁愿不偏向任何关注此问题的人。 The opengl fragment is correct and works using a simple command line example: opengl片段是正确的,并且可以使用一个简单的命令行示例进行工作:

gst-launch-1.0 videotestsrc ! glupload ! glshader fragment="\"`cat testfrag.frag`\"" ! glimagesink

Any ideas is this a command shell issue or gstreamer issue I need to correct concerning double quotes. 任何想法都是我需要更正有关双引号的命令外壳问题或gstreamer问题。

Here is the fragment: 这是片段:

\#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;

  }

When I run the command line I get the following error: 当我运行命令行时,出现以下错误:

Generates an error message:
WARNING: erroneous pipeline: no element "100"

Have you tried %22 to escape a quotationmark? 您是否尝试过%22来避免使用引号?

This site shows the html encodings, I got that idea from this line: 这个站点显示了html编码,我从这一行得到了这个想法:

The query string for the new URI with '&' separating query elements. 新URI的查询字符串,带有'&'分隔查询元素。 Elements containing '&' characters should encode them as "%26". 包含“&”字符的元素应将其编码为“%26”。

from this website. 这个网站。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM