diff options
author | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-05-20 10:37:32 +0200 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-05-20 10:42:43 +0200 |
commit | 80cc653364fe330dfa4bf310f98d98d4cef0698b (patch) | |
tree | 4aa993904b8cd8205362668f2bfb3abf651ab083 /src/gsttools | |
parent | 7a4478a4a411df9f21e1499d2301049f9045b7d6 (diff) |
GStreamer: Dump dot file if GST_DEBUG_DUMP_DOT_DIR is set
Dump dot file on play only.
Change-Id: Ide7fe0cad56f06a89604cf40b59b858c9c9d09f2
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src/gsttools')
-rw-r--r-- | src/gsttools/qgstreamerplayersession.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/gsttools/qgstreamerplayersession.cpp b/src/gsttools/qgstreamerplayersession.cpp index 5c9eebca2..56f78cb9f 100644 --- a/src/gsttools/qgstreamerplayersession.cpp +++ b/src/gsttools/qgstreamerplayersession.cpp @@ -63,7 +63,6 @@ #include <qvideorenderercontrol.h> //#define DEBUG_PLAYBIN -//#define DEBUG_VO_BIN_DUMP QT_BEGIN_NAMESPACE @@ -659,12 +658,6 @@ void QGstreamerPlayerSession::setVideoRenderer(QObject *videoOutput) if (!m_playbin) return; -#ifdef DEBUG_VO_BIN_DUMP - gst_debug_bin_to_dot_file_with_ts(GST_BIN(m_playbin), - GstDebugGraphDetails(GST_DEBUG_GRAPH_SHOW_ALL /* GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE | GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS | GST_DEBUG_GRAPH_SHOW_STATES*/), - "playbin_set"); -#endif - GstElement *videoSink = 0; if (m_renderer && m_renderer->isReady()) videoSink = m_renderer->videoSink(); @@ -925,11 +918,6 @@ void QGstreamerPlayerSession::finishVideoOutputChange() gst_object_unref(GST_OBJECT(srcPad)); -#ifdef DEBUG_VO_BIN_DUMP - gst_debug_bin_to_dot_file_with_ts(GST_BIN(m_playbin), - GstDebugGraphDetails(GST_DEBUG_GRAPH_SHOW_ALL /* | GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE | GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS | GST_DEBUG_GRAPH_SHOW_STATES */), - "playbin_finish"); -#endif } #if !GST_CHECK_VERSION(1,0,0) @@ -992,6 +980,9 @@ bool QGstreamerPlayerSession::isSeekable() const bool QGstreamerPlayerSession::play() { + static bool dumpDot = qEnvironmentVariableIsSet("GST_DEBUG_DUMP_DOT_DIR"); + if (dumpDot) + gst_debug_bin_to_dot_file_with_ts(GST_BIN(m_pipeline), GstDebugGraphDetails(GST_DEBUG_GRAPH_SHOW_ALL), "session.play"); #ifdef DEBUG_PLAYBIN qDebug() << Q_FUNC_INFO; #endif |