2016-09-01 2 views
0

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' 
+0

pipedef가 이미 파이프 라인에 있습니다. g_print (pipedef) 만 작동합니다. –

답변

2

첫 번째와 가장 중요한 사항 : 1.0을 사용하십시오. 0.10은 이제 몇 년 동안 폐기되었습니다.

gst_element_info 존재하지 않습니다. AFAIK. 파이프 라인에 대한 문자열로 인쇄 될 것으로 예상되는 것은 무엇입니까? 그 안에있는 요소들? 어떻게 링크를 표현하고 싶습니까?

도트 표현을 사용하면 더 좋을 것입니다. 여기에 몇 가지 지침이 있습니다 : https://developer.ridgerun.com/wiki/index.php/How_to_generate_a_Gstreamer_pipeline_diagram_%28graph%29 또는 https://www.freedesktop.org/software/gstreamer-sdk/data/docs/latest/gstreamer-0.10/gstreamer-GstInfo.html#GST-DEBUG-BIN-TO-DOT-FILE:CAPS