Title: [121169] trunk/Source/WebCore
- Revision
- 121169
- Author
- [email protected]
- Date
- 2012-06-25 10:47:44 -0700 (Mon, 25 Jun 2012)
Log Message
[GTK] Add graphviz debug output for the gstreamer video pipeline.
https://bugs.webkit.org/show_bug.cgi?id=89660
Patch by Allan Xavier <[email protected]> on 2012-06-25
Reviewed by Martin Robinson.
Dump the current video pipeline as a graphviz DOT file when the
pipeline state changes or when an error occours.
No new tests as the change is only useful for debugging.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (121168 => 121169)
--- trunk/Source/WebCore/ChangeLog 2012-06-25 17:43:36 UTC (rev 121168)
+++ trunk/Source/WebCore/ChangeLog 2012-06-25 17:47:44 UTC (rev 121169)
@@ -1,3 +1,18 @@
+2012-06-25 Allan Xavier <[email protected]>
+
+ [GTK] Add graphviz debug output for the gstreamer video pipeline.
+ https://bugs.webkit.org/show_bug.cgi?id=89660
+
+ Reviewed by Martin Robinson.
+
+ Dump the current video pipeline as a graphviz DOT file when the
+ pipeline state changes or when an error occours.
+
+ No new tests as the change is only useful for debugging.
+
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
+
2012-06-25 Adam Barth <[email protected]>
ASSERT(m_wheelEventHandlerCount > 0) can fire
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (121168 => 121169)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2012-06-25 17:43:36 UTC (rev 121168)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2012-06-25 17:47:44 UTC (rev 121169)
@@ -749,6 +749,8 @@
gst_message_parse_error(message, &err.outPtr(), &debug.outPtr());
LOG_VERBOSE(Media, "Error: %d, %s", err->code, err->message);
+ GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(m_playBin), GST_DEBUG_GRAPH_SHOW_ALL, "webkit-video.error");
+
error = MediaPlayer::Empty;
if (err->code == GST_STREAM_ERROR_CODEC_NOT_FOUND
|| err->code == GST_STREAM_ERROR_WRONG_TYPE
@@ -788,8 +790,19 @@
// Ignore state changes from internal elements. They are
// forwarded to playbin2 anyway.
- if (GST_MESSAGE_SRC(message) == reinterpret_cast<GstObject*>(m_playBin))
+ if (GST_MESSAGE_SRC(message) == reinterpret_cast<GstObject*>(m_playBin)) {
updateStates();
+
+ // Construct a filename for the graphviz dot file output.
+ GstState oldState, newState;
+ gst_message_parse_state_changed(message, &oldState, &newState, 0);
+
+ CString dotFileName = String::format("webkit-video.%s_%s",
+ gst_element_state_get_name(oldState),
+ gst_element_state_get_name(newState)).utf8();
+
+ GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(m_playBin), GST_DEBUG_GRAPH_SHOW_ALL, dotFileName.data());
+ }
break;
case GST_MESSAGE_BUFFERING:
processBufferingStats(message);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes