Tools: Adde how to use Gstreamer Debugger (gst-debugger)
authorGeunsik Lim <geunsik.lim@samsung.com>
Mon, 19 Nov 2018 07:07:59 +0000 (16:07 +0900)
committerMyungJoo Ham <myungjoo.ham@gmail.com>
Mon, 19 Nov 2018 09:42:32 +0000 (09:42 +0000)
Fixed issue 132#issuecomment-439788784.

This commit is to explain how to use a Gstreamer Debugger tool to
introspect a gst-pipeline remotely with a graphical client.

**Changes proposed in this PR:**
* Version 2:
1. Added GStreamer-based totem player as an example

* Version 1:
1. Added How to use Gstreamer debugger
2. Added How to patch ver 0.90.0 to build on Ubuntu 16.04

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
tools/debugging/README.md
tools/debugging/gstreamer-debugger-screen.png [new file with mode: 0644]

index aa39108..855d02c 100644 (file)
@@ -57,3 +57,53 @@ $ eog ${number_of_test_case}.png
 
 And then, you can see elements and caps graph in a pipeline.
 
+
+### gst-debugger
+gst-debugger (a.k.a Gstreamer Debugger) toolset allows to introspect gst-pipeline remotely. It provides graphical client, and GStreamer's plugin.
+This guide is written on Ubuntu 16.04 X86_64 distribution.
+
+#### Build the source code
+```bash
+$ git clone https://github.com/GNOME/gst-debugger.git
+$ cd gst-debugger
+$ git checkout 0.90.0
+$ ./autogen.sh
+$ vi ./src/gst-debugger/controller/controller.cpp
+---------------- patch: start --------------------
+@@ -16,6 +16,7 @@
+ #include "common/common.h"
+
+ #include <gtkmm.h>
++#include <iostream>
+
+ Controller::Controller(IMainView *view)
+  : view(view)
+---------------- patch: end ----------------------
+$ make -j`nproc`
+$ sudo make install
+$ ls -al /usr/local/lib/libgst-debugger-common*.so.*
+lrwxrwxrwx 1 root root      37 Nov 19 14:59 /usr/local/lib/libgst-debugger-common-c-0.1.so.0 -> libgst-debugger-common-c-0.1.so.0.0.0
+-rwxr-xr-x 1 root root  250808 Nov 19 14:59 /usr/local/lib/libgst-debugger-common-c-0.1.so.0.0.0
+lrwxrwxrwx 1 root root      39 Nov 19 14:59 /usr/local/lib/libgst-debugger-common-cpp-0.1.so.0 -> libgst-debugger-common-cpp-0.1.so.0.0.0
+-rwxr-xr-x 1 root root 1848904 Nov 19 14:59 /usr/local/lib/libgst-debugger-common-cpp-0.1.so.0.0.0
+
+```
+
+#### Run gst-debugger
+The toolset consists of the rich client, and debugserver (Default port: 8080). debugserver is implemented as a tracer plugin, and has to be loaded with your pipeline as following:
+```bash
+Case1: Run videotestsrc plugin with gst-launch command.
+$ GST_TRACERS="debugserver(port=8080)" gst-launch-1.0 videotestsrc ! autovideosink
+
+Case2: Run a Totem movie player that is developed by GStreamer.
+$ wget http://www.html5videoplayer.net/videos/toystory.mp4
+$ GST_TRACERS="debugserver(port=8080)" totem  ./toystory.mp4
+```
+
+Now you can use a debugging client to connect to the debugger and inspect your pipeline as following:
+```bash
+$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
+$ gst-debugger-1.0
+```
+Starting from now, enjoy a debugging with gst-debugger.
+<img src=gstreamer-debugger-screen.png border=0></img>
diff --git a/tools/debugging/gstreamer-debugger-screen.png b/tools/debugging/gstreamer-debugger-screen.png
new file mode 100644 (file)
index 0000000..dbff0cf
Binary files /dev/null and b/tools/debugging/gstreamer-debugger-screen.png differ