diff options
author | Tim Blechmann <tim@klingt.org> | 2024-05-07 09:34:39 +0800 |
---|---|---|
committer | Tim Blechmann <tim@klingt.org> | 2024-05-09 12:39:23 +0800 |
commit | 3625e0cdd5b8d2854908c8c04c0cba1bf3498144 (patch) | |
tree | eab6f3dfd9e01f328fdb656d7d59c8b837de0df8 | |
parent | 200f6d9c0db2af9166cea44cb1cdc48a85d0150e (diff) |
* `GST_DEBUG_GRAPH_SHOW_ALL` includes all the other flags
* dump graph in `QGstElement::finishStateChange` on failure
Pick-to: 6.5 6.7
Change-Id: I8c2e20ec11d3d9118bdae472cfc4488dd9df99ea
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
-rw-r--r-- | src/plugins/multimedia/gstreamer/common/qgst.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/plugins/multimedia/gstreamer/common/qgst.cpp b/src/plugins/multimedia/gstreamer/common/qgst.cpp index 6f1a291a1..191fae49b 100644 --- a/src/plugins/multimedia/gstreamer/common/qgst.cpp +++ b/src/plugins/multimedia/gstreamer/common/qgst.cpp @@ -957,8 +957,16 @@ bool QGstElement::finishStateChange(std::chrono::nanoseconds timeout) gst_element_get_state(element(), &state, &pending, timeout.count()); #ifndef QT_NO_DEBUG - if (change != GST_STATE_CHANGE_SUCCESS && change != GST_STATE_CHANGE_NO_PREROLL) + if (change != GST_STATE_CHANGE_SUCCESS && change != GST_STATE_CHANGE_NO_PREROLL) { qWarning() << "Could not finish change state of" << name() << change << state << pending; + + static const bool dumpEnabled = qEnvironmentVariableIsSet("GST_DEBUG_DUMP_DOT_DIR"); + if (dumpEnabled) { + QGstPipeline pipeline = getPipeline(); + if (pipeline) + pipeline.dumpGraph("finishStateChangeFailure"); + } + } #endif return change == GST_STATE_CHANGE_SUCCESS; } @@ -1103,11 +1111,7 @@ void QGstBin::dumpGraph(const char *fileNamePrefix) if (isNull()) return; - GST_DEBUG_BIN_TO_DOT_FILE(bin(), - GstDebugGraphDetails(GST_DEBUG_GRAPH_SHOW_ALL - | GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE - | GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS - | GST_DEBUG_GRAPH_SHOW_STATES), + GST_DEBUG_BIN_TO_DOT_FILE(bin(), GstDebugGraphDetails(GST_DEBUG_GRAPH_SHOW_ALL), fileNamePrefix); } |