首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >gstreamer-0.10打印管道字符串

gstreamer-0.10打印管道字符串
EN

Stack Overflow用户
提问于 2016-09-01 17:08:45
回答 1查看 1.7K关注 0票数 1

我想打印出gstreamer-0.10元素的管道。如何做到这一点?

外部开发人员为我们编写的代码:

代码语言:javascript
复制
static GstElement* jpgPipeline  = NULL;
pipedef = g_strdup_printf("appsrc name=jpgsrc ! ffmpegcolorspace %s %s %s %s %s  ! ffmpegcolorspace ! jpegenc quality=%i ! multifilesink name=jpgsink location=\"image.jpg\"",cropStr, scaleStr, sharpenStr,vbStr,gammaStr,quality);
jpgPipeline = gst_parse_launch (pipedef, &error);
bus = gst_pipeline_get_bus(GST_PIPELINE(jpgPipeline));
gst_element_set_state (jpgPipeline, GST_STATE_PLAYING);

我正在尝试使用以下命令查看管道:

代码语言:javascript
复制
g_print(gst_element_info(jpgPipeline));

但是当我试图编译它的时候,我得到了很多警告。

代码语言:javascript
复制
main.c:331:2: warning: implicit declaration of function ‘gst_element_info’ [-Wimplicit-function-declaration]
  g_print(gst_element_info(jpgPipeline));
  ^
main.c:331:2: warning: passing argument 1 of ‘g_print’ makes pointer from integer without a cast [enabled by default]
In file included from /usr/include/glib-2.0/glib.h:62:0,
                 from /usr/include/gstreamer-0.10/gst/gst.h:27,
                 from main.c:5:
/usr/include/glib-2.0/glib/gmessages.h:265:17: note: expected ‘const gchar *’ but argument is of type ‘int’
 void            g_print                 (const gchar    *format,
                 ^
main.c:331:2: warning: format not a string literal and no format arguments [-Wformat-security]
  g_print(gst_element_info(jpgPipeline));
main.c:(.text.startup+0x651): undefined reference to `gst_element_info'
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-09-02 21:07:05

第一也是最重要的:请使用1.0,0.10已经过时多年了。

gst_element_info不存在。您希望以字符串的形式打印出有关管道的什么内容?里面的元素是什么?您希望如何表示链接?

也许使用点表示会更好。在这里找到一些说明:https://developer.ridgerun.com/wiki/index.php/How_to_generate_a_Gstreamer_pipeline_diagram_%28graph%29https://www.freedesktop.org/software/gstreamer-sdk/data/docs/latest/gstreamer-0.10/gstreamer-GstInfo.html#GST-DEBUG-BIN-TO-DOT-FILE:CAPS

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39267300

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档