From bf98930546c7c5292be6c80db611caec590e0eb0 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Mon, 31 Aug 2015 19:21:54 +1000 Subject: [PATCH] gl: sprinkle some debug markers to ease debugging --- ext/gl/gstglimagesink.c | 5 +++++ gst-libs/gst/gl/gstglbasefilter.c | 6 ++++++ gst-libs/gst/gl/gstglcolorconvert.c | 4 ++++ gst-libs/gst/gl/gstglfilter.c | 2 ++ 4 files changed, 17 insertions(+) diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c index f629df7bd5..7672956c4b 100644 --- a/ext/gl/gstglimagesink.c +++ b/ext/gl/gstglimagesink.c @@ -1781,6 +1781,9 @@ gst_glimage_sink_on_resize (GstGLImageSink * gl_sink, gint width, gint height) gst_event_new_reconfigure ()); } + gst_gl_insert_debug_marker (gl_sink->context, "%s window resize to %ix%i", + GST_OBJECT_NAME (gl_sink), width, height); + /* default reshape */ if (!do_reshape) { if (gl_sink->keep_aspect_ratio) { @@ -1850,6 +1853,8 @@ gst_glimage_sink_on_draw (GstGLImageSink * gl_sink) window->is_drawing = TRUE; /* opengl scene */ + gst_gl_insert_debug_marker (gl_sink->context, "%s element drawing texture %u", + GST_OBJECT_NAME (gl_sink), gl_sink->redisplay_texture); GST_TRACE ("redrawing texture:%u", gl_sink->redisplay_texture); sync_meta = gst_buffer_get_gl_sync_meta (gl_sink->stored_sync); diff --git a/gst-libs/gst/gl/gstglbasefilter.c b/gst-libs/gst/gl/gstglbasefilter.c index e7b2e236a7..485fe2ac60 100644 --- a/gst-libs/gst/gl/gstglbasefilter.c +++ b/gst-libs/gst/gl/gstglbasefilter.c @@ -294,6 +294,9 @@ gst_gl_base_filter_gl_start (GstGLContext * context, gpointer data) GstGLBaseFilter *filter = GST_GL_BASE_FILTER (data); GstGLBaseFilterClass *filter_class = GST_GL_BASE_FILTER_GET_CLASS (filter); + gst_gl_insert_debug_marker (filter->context, + "starting element %s", GST_OBJECT_NAME (filter)); + if (filter_class->gl_start) { filter->priv->gl_result = filter_class->gl_start (filter); } else { @@ -309,6 +312,9 @@ gst_gl_base_filter_gl_stop (GstGLContext * context, gpointer data) GstGLBaseFilter *filter = GST_GL_BASE_FILTER (data); GstGLBaseFilterClass *filter_class = GST_GL_BASE_FILTER_GET_CLASS (filter); + gst_gl_insert_debug_marker (filter->context, + "stopping element %s", GST_OBJECT_NAME (filter)); + if (filter->priv->gl_started) { if (filter_class->gl_stop) filter_class->gl_stop (filter); diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c index 5915a39f30..1ab538f435 100644 --- a/gst-libs/gst/gl/gstglcolorconvert.c +++ b/gst-libs/gst/gl/gstglcolorconvert.c @@ -1732,6 +1732,10 @@ _do_convert (GstGLContext * context, GstGLColorConvert * convert) else views = 1; + gst_gl_insert_debug_marker (context, "%s converting from %s to %s", + GST_OBJECT_NAME (convert), + gst_video_format_to_string (GST_VIDEO_INFO_FORMAT (in_info)), + gst_video_format_to_string (GST_VIDEO_INFO_FORMAT (&convert->out_info))); /* Handle all views on input and output one at a time */ for (v = 0; res && v < views; v++) res = _do_convert_one_view (context, convert, v); diff --git a/gst-libs/gst/gl/gstglfilter.c b/gst-libs/gst/gl/gstglfilter.c index 78bcbc98e8..1a2ae96a0f 100644 --- a/gst-libs/gst/gl/gstglfilter.c +++ b/gst-libs/gst/gl/gstglfilter.c @@ -914,6 +914,8 @@ gst_gl_filter_transform (GstBaseTransform * bt, GstBuffer * inbuf, if (in_sync_meta) gst_gl_sync_meta_wait (in_sync_meta, context); + gst_gl_insert_debug_marker (context, + "processing in element %s", GST_OBJECT_NAME (filter)); if (filter_class->filter) ret = filter_class->filter (filter, inbuf, outbuf); else