gstreamer-0.10要素のパイプラインを出力したいと思います。これはどうすればできますか?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'
pipedefがすでにパイプラインになっています.g_print(pipedef)だけで動作します。 –