vulkanswapper: correctly handle force-aspect-ratio=false
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-bad / ext / gtk / gtkgstwaylandwidget.c
1 /*
2  * GStreamer
3  * Copyright (C) 2015 Matthew Waters <matthew@centricular.com>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20
21 #ifdef HAVE_CONFIG_H
22 #include "config.h"
23 #endif
24
25 #include "gtkgstwaylandwidget.h"
26
27 /**
28  * SECTION:gtkgstwidget
29  * @title: GtkGstWaylandWidget
30  * @short_description: a #GtkWidget that renders GStreamer video #GstBuffers
31  * @see_also: #GtkDrawingArea, #GstBuffer
32  *
33  * #GtkGstWaylandWidget is an #GtkWidget that renders GStreamer video buffers.
34  */
35
36 G_DEFINE_TYPE (GtkGstWaylandWidget, gtk_gst_wayland_widget,
37     GTK_TYPE_DRAWING_AREA);
38
39 static void
40 gtk_gst_wayland_widget_finalize (GObject * object)
41 {
42   gtk_gst_base_widget_finalize (object);
43
44   G_OBJECT_CLASS (gtk_gst_wayland_widget_parent_class)->finalize (object);
45 }
46
47 static void
48 gtk_gst_wayland_widget_class_init (GtkGstWaylandWidgetClass * klass)
49 {
50   GObjectClass *gobject_klass = (GObjectClass *) klass;
51
52   gtk_gst_base_widget_class_init (GTK_GST_BASE_WIDGET_CLASS (klass));
53   gobject_klass->finalize = gtk_gst_wayland_widget_finalize;
54 }
55
56 static void
57 gtk_gst_wayland_widget_init (GtkGstWaylandWidget * widget)
58 {
59   gtk_gst_base_widget_init (GTK_GST_BASE_WIDGET (widget));
60 }
61
62 GtkWidget *
63 gtk_gst_wayland_widget_new (void)
64 {
65   return (GtkWidget *) g_object_new (GTK_TYPE_GST_WAYLAND_WIDGET, NULL);
66 }