GStreamer has a useful debugging feature where it can output a given pipeline to a Graphviz dot file. Having this feature enabled in WebKit would be helpful for debugging development/end user problems with the video pipeline. Some more information on this feature (along with an example) can be found in the GStreamer SDK documentation http://docs.gstreamer.com/display/GstSDK/Basic+tutorial+11%3A+Debugging+tools The following patch will output a dot file for errors and state changes in the video pipeline when the environment variable GST_DEBUG_DUMP_DOT_DIR is set. This is similar to how gst-launch implements the same functionality.
Created attachment 148794 [details] Patch for supporting graphviz debug output
Let me know if you need the commit-queue to land this patch.
Comment on attachment 148794 [details] Patch for supporting graphviz debug output View in context: https://bugs.webkit.org/attachment.cgi?id=148794&action=review > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:799 > + // Construct a filename for the graphviz dot file output Nit: You're missing a period at the end of this sentence. > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:801 > + dotFileName = g_strdup_printf("webkit-video.%s_%s", gst_element_state_get_name(oldState), gst_element_state_get_name(newState)); It's probably better to use CString dotFileName = String::format("webkit-video.%s_%s", gst_element_state_get_name(oldState), gst_element_state_get_name(newState)).utf8(); > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:803 > + GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(m_playBin), GST_DEBUG_GRAPH_SHOW_ALL, dotFileName); This would become: GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(m_playBin), GST_DEBUG_GRAPH_SHOW_ALL, dotFileName.data());
Created attachment 148844 [details] Patch for supporting graphviz debug output This revised patch has the following changes: * The improvements recommended by Martin in comment #3. * The string formatting call is now split onto multiple lines for better readability. * The pendingState variable has been removed (gst_message_parse_state_changed can handle null arguments).
Comment on attachment 148844 [details] Patch for supporting graphviz debug output Clearing flags on attachment: 148844 Committed r121169: <http://trac.webkit.org/changeset/121169>
All reviewed patches have been landed. Closing bug.