mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
gtk: Fix logging in base widget and fix desc of GL sink
Set a default category for gtkgstbasewidget lest the logging go to the 'default' category where it can't be found easily
This commit is contained in:
parent
9554e1c666
commit
21023800ca
3 changed files with 15 additions and 4 deletions
|
@ -54,7 +54,7 @@ static GstStaticPadTemplate gst_gtk_gl_sink_template =
|
|||
#define gst_gtk_gl_sink_parent_class parent_class
|
||||
G_DEFINE_TYPE_WITH_CODE (GstGtkGLSink, gst_gtk_gl_sink,
|
||||
GST_TYPE_GTK_BASE_SINK, GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_gl_sink,
|
||||
"gtkglsink", 0, "Gtk Video Sink"));
|
||||
"gtkglsink", 0, "Gtk GL Video Sink"));
|
||||
|
||||
static void
|
||||
gst_gtk_gl_sink_class_init (GstGtkGLSinkClass * klass)
|
||||
|
@ -76,8 +76,8 @@ gst_gtk_gl_sink_class_init (GstGtkGLSinkClass * klass)
|
|||
gstgtkbasesink_class->create_widget = gtk_gst_gl_widget_new;
|
||||
gstgtkbasesink_class->window_title = "Gtk+ GL renderer";
|
||||
|
||||
gst_element_class_set_metadata (gstelement_class, "Gtk Video Sink",
|
||||
"Sink/Video", "A video sink that renders to a GtkWidget",
|
||||
gst_element_class_set_metadata (gstelement_class, "Gtk GL Video Sink",
|
||||
"Sink/Video", "A video sink that renders to a GtkWidget using OpenGL",
|
||||
"Matthew Waters <matthew@centricular.com>");
|
||||
|
||||
gst_element_class_add_static_pad_template (gstelement_class,
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
#include "gtkgstwidget.h"
|
||||
#include "gstgtksink.h"
|
||||
|
||||
GST_DEBUG_CATEGORY (gst_debug_gtk_sink);
|
||||
#define GST_CAT_DEFAULT gst_debug_gtk_sink
|
||||
|
||||
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
||||
#define FORMATS "{ BGRx, BGRA }"
|
||||
#else
|
||||
|
@ -44,7 +47,9 @@ GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
);
|
||||
|
||||
#define gst_gtk_sink_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstGtkSink, gst_gtk_sink, GST_TYPE_GTK_BASE_SINK);
|
||||
G_DEFINE_TYPE_WITH_CODE (GstGtkSink, gst_gtk_sink, GST_TYPE_GTK_BASE_SINK,
|
||||
GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_sink, "gtksink", 0,
|
||||
"Gtk Video Sink"));
|
||||
|
||||
static void
|
||||
gst_gtk_sink_class_init (GstGtkSinkClass * klass)
|
||||
|
|
|
@ -26,6 +26,9 @@
|
|||
|
||||
#include "gtkgstbasewidget.h"
|
||||
|
||||
GST_DEBUG_CATEGORY (gst_debug_gtk_base_widget);
|
||||
#define GST_CAT_DEFAULT gst_debug_gtk_base_widget
|
||||
|
||||
#define DEFAULT_FORCE_ASPECT_RATIO TRUE
|
||||
#define DEFAULT_PAR_N 0
|
||||
#define DEFAULT_PAR_D 1
|
||||
|
@ -399,6 +402,9 @@ gtk_gst_base_widget_class_init (GtkGstBaseWidgetClass * klass)
|
|||
widget_klass->button_press_event = gtk_gst_base_widget_button_event;
|
||||
widget_klass->button_release_event = gtk_gst_base_widget_button_event;
|
||||
widget_klass->motion_notify_event = gtk_gst_base_widget_motion_event;
|
||||
|
||||
GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_base_widget, "gtkbasewidget", 0,
|
||||
"Gtk Video Base Widget");
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue