2021. 9. 27. 13:28ㆍMultimedia
- 목차
gStreamer pipeline 분석
1. prerequisite
~$ sudo apt-get install graphviz ~$ export GST_DEBUG_DUMP_DOT_DIR=/tmp/ |
2. run your pipeline
~$ gst-launch audiotestsrc num-buffers=1000 ! fakesink sync=false or ~$ gst-launch-1.0 filesrc location=/red_rookie.mp3 ! mpegaudioparse ! nvmediamp3auddec ! audioconvert ! audioresample ! pulsesink or ~$ gst-launch-1.0 playbin uri=file:///red_rookie.mp3 |
3. generate diagram
1) check output dot files
~$ ll /tmp
0.00.00.972540004-gst-launch.NULL_READY.dot
0.00.01.051387461-gst-launch.READY_PAUSED.dot
0.00.01.074729712-gst-launch.PAUSED_PLAYING.dot
0.00.12.187852589-gst-launch.PLAYING_PAUSED.dot
0.00.12.201485839-gst-launch.PAUSED_READY.dot
psplash_fifo
2) generate diagram
~$ dot -Tpng 0.00.12.187852589-gst-launch.PLAYING_PAUSED.dot > pipeline.png
3) see diagram
eog pipeline.png
4. helper script
DOT_FILES_DIR="fs/fs/graphs" PNG_FILES_DIR="fs/fs/graphs" DOT_FILES=`ls $DOT_FILES_DIR | grep dot` for dot_file in $DOT_FILES do png_file=`echo $dot_file | sed s/.dot/.png/` dot -Tpng $DOT_FILES_DIR/$dot_file > $PNG_FILES_DIR/$png_file done |
5. app에서 생성하기
1) define 추가
모든 element의 생성 및 link 이후에 다음의 코드를 수행
GST_DEBUG_BIN_TO_DOT_FILE(pipeline, GST_DEBUG_GRAPH_SHOW_ALL, "pipeline") |
2) 앱 실행
~$ GST_DEBUG_DUMP_DOT_DIR=. ./application
3) image 생성
앱 실행 위치에 dot file 생성
위에서 설명했던 것처럼 png file 생성 후 check
참고:
https://developer.ridgerun.com/wiki/index.php/How_to_generate_a_Gstreamer_pipeline_diagram_(graph)
'Multimedia' 카테고리의 다른 글
Motion Estimation, Compensation, Spatial Redundancy (0) | 2021.10.10 |
---|---|
JPEG (0) | 2021.10.09 |
GST tag (0) | 2021.09.23 |
GST clock running-time (0) | 2021.09.23 |
GST events (0) | 2021.09.23 |