반응형

출처 : http://docs.gstreamer.com/display/GstSDK/Basic+tutorial+11%3a+Debugging+tools



uridecodebin


gstreamer playbin 이 동작했던 pipeline 을 알 수 있는 방법


playbin 이나 uridecodebin을 쓰면 내부적으로 pipeline을 만드는데 이 파이프라인을 .dot 파일로 저장하도록 되어있다.


.dot파일을 얻으려면 


환경변수 GST_DEBUG_DUMP_DOT_DIR 에 .dot 파일이 저장될 경로를 넣어놓으면 그곳에 GraphViz 같은 것으로 열어 볼 수 있는 파이프라인 그래프 파일이 저장된다.


생성된 .dot 파일을 열어보려면 sudo apt-get install xdot 하면 된다.


.dot 파일 여는 방법


http://www.youtube.com/watch?v=6eJnQo22nHA


$ dot -Tpng ./0.05.59.861491282-gst-launch.PLAYING_PAUSED.dot > kk.png

$ xdg-open ./kk.png



이렇게 쉘을 만들어 쓰면 편하다.


#!/bin/bash


for filename in ./*.dot; do

        dot -Tpng "$filename" > "$filename.png"

done


Getting pipeline graphs

For those cases where your pipeline starts to grow too large and you lose track of what is connected with what, GStreamer has the capability to output graph files. These are .dot files, readable with free programs like GraphViz, that describe the topology of your pipeline, along with the caps negotiated in each link.

This is also very handy when using all-in-one elements like playbin2  or uridecodebin, which instantiate several elements inside them. Use the .dot files to learn what pipeline they have created inside (and learn a bit of GStreamer along the way).

To obtain .dot files, simply set the GST_DEBUG_DUMP_DOT_DIR environment variable to point to the folder where you want the files to be placed. gst-launch will create a .dot file at each state change, so you can see the evolution of the caps negotiation. Unset the variable to disable this facility. From within your application, you can use the GST_DEBUG_BIN_TO_DOT_FILE() and GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS() macros to generate .dot files at your convenience.

Here you have an example of the kind of pipelines that playbin2 generates. It is very complex because playbin2 can handle many different cases: Your manual pipelines normally do not need to be this long. If your manual pipeline is starting to get very big, consider using playbin2.




반응형
Posted by Real_G