gpt4 book ai didi

c++ - gstreamer-0.10 打印管道字符串

转载 作者:行者123 更新时间:2023-11-28 02:01:45 26 4
gpt4 key购买 nike

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

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

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);

我正在尝试查看管道:

g_print(gst_element_info(jpgPipeline));

但是当我尝试编译它时收到很多警告。

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'

最佳答案

第一个也是最重要的:请使用 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

关于c++ - gstreamer-0.10 打印管道字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39267300/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com