From 93549a67af02410b241c1a2ae7d0d7eeff7b2d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Fri, 5 Mar 2021 19:26:29 +0100 Subject: [PATCH] Sink: remove ignore_alpha property GTK4 no longer supports ignoring alpha --- lib/gst/clapper/gtk4/gstgtkbasesink.c | 9 --------- lib/gst/clapper/gtk4/gstgtkbasesink.h | 3 --- lib/gst/clapper/gtk4/gtkgstbasewidget.c | 14 -------------- lib/gst/clapper/gtk4/gtkgstbasewidget.h | 1 - 4 files changed, 27 deletions(-) diff --git a/lib/gst/clapper/gtk4/gstgtkbasesink.c b/lib/gst/clapper/gtk4/gstgtkbasesink.c index 95e1871f..6775dccc 100644 --- a/lib/gst/clapper/gtk4/gstgtkbasesink.c +++ b/lib/gst/clapper/gtk4/gstgtkbasesink.c @@ -38,7 +38,6 @@ GST_DEBUG_CATEGORY (gst_debug_gtk_base_sink); #define DEFAULT_FORCE_ASPECT_RATIO TRUE #define DEFAULT_PAR_N 0 #define DEFAULT_PAR_D 1 -#define DEFAULT_IGNORE_ALPHA TRUE #define DEFAULT_IGNORE_TEXTURES FALSE static void gst_gtk_base_sink_finalize (GObject * object); @@ -70,7 +69,6 @@ enum PROP_WIDGET, PROP_FORCE_ASPECT_RATIO, PROP_PIXEL_ASPECT_RATIO, - PROP_IGNORE_ALPHA, PROP_IGNORE_TEXTURES, }; @@ -141,7 +139,6 @@ gst_gtk_base_sink_init (GstGtkBaseSink * gtk_sink) gtk_sink->force_aspect_ratio = DEFAULT_FORCE_ASPECT_RATIO; gtk_sink->par_n = DEFAULT_PAR_N; gtk_sink->par_d = DEFAULT_PAR_D; - gtk_sink->ignore_alpha = DEFAULT_IGNORE_ALPHA; gtk_sink->ignore_textures = DEFAULT_IGNORE_TEXTURES; } @@ -259,9 +256,6 @@ gst_gtk_base_sink_get_property (GObject * object, guint prop_id, case PROP_PIXEL_ASPECT_RATIO: gst_value_set_fraction (value, gtk_sink->par_n, gtk_sink->par_d); break; - case PROP_IGNORE_ALPHA: - g_value_set_boolean (value, gtk_sink->ignore_alpha); - break; case PROP_IGNORE_TEXTURES: g_value_set_boolean (value, gtk_sink->ignore_textures); break; @@ -285,9 +279,6 @@ gst_gtk_base_sink_set_property (GObject * object, guint prop_id, gtk_sink->par_n = gst_value_get_fraction_numerator (value); gtk_sink->par_d = gst_value_get_fraction_denominator (value); break; - case PROP_IGNORE_ALPHA: - gtk_sink->ignore_alpha = g_value_get_boolean (value); - break; case PROP_IGNORE_TEXTURES: gtk_sink->ignore_textures = g_value_get_boolean (value); break; diff --git a/lib/gst/clapper/gtk4/gstgtkbasesink.h b/lib/gst/clapper/gtk4/gstgtkbasesink.h index 2a8b4b15..f12ab636 100644 --- a/lib/gst/clapper/gtk4/gstgtkbasesink.h +++ b/lib/gst/clapper/gtk4/gstgtkbasesink.h @@ -65,9 +65,6 @@ struct _GstGtkBaseSink gint par_d; GBinding *bind_pixel_aspect_ratio; - gboolean ignore_alpha; - GBinding *bind_ignore_alpha; - gboolean ignore_textures; GBinding *bind_ignore_textures; diff --git a/lib/gst/clapper/gtk4/gtkgstbasewidget.c b/lib/gst/clapper/gtk4/gtkgstbasewidget.c index 6a1079b6..f1795546 100644 --- a/lib/gst/clapper/gtk4/gtkgstbasewidget.c +++ b/lib/gst/clapper/gtk4/gtkgstbasewidget.c @@ -33,7 +33,6 @@ GST_DEBUG_CATEGORY (gst_debug_gtk_base_widget); #define DEFAULT_FORCE_ASPECT_RATIO TRUE #define DEFAULT_PAR_N 0 #define DEFAULT_PAR_D 1 -#define DEFAULT_IGNORE_ALPHA TRUE #define DEFAULT_IGNORE_TEXTURES FALSE enum @@ -41,7 +40,6 @@ enum PROP_0, PROP_FORCE_ASPECT_RATIO, PROP_PIXEL_ASPECT_RATIO, - PROP_IGNORE_ALPHA, PROP_IGNORE_TEXTURES, }; @@ -122,9 +120,6 @@ gtk_gst_base_widget_set_property (GObject * object, guint prop_id, gtk_widget->par_n = gst_value_get_fraction_numerator (value); gtk_widget->par_d = gst_value_get_fraction_denominator (value); break; - case PROP_IGNORE_ALPHA: - gtk_widget->ignore_alpha = g_value_get_boolean (value); - break; case PROP_IGNORE_TEXTURES: gtk_widget->ignore_textures = g_value_get_boolean (value); break; @@ -147,9 +142,6 @@ gtk_gst_base_widget_get_property (GObject * object, guint prop_id, case PROP_PIXEL_ASPECT_RATIO: gst_value_set_fraction (value, gtk_widget->par_n, gtk_widget->par_d); break; - case PROP_IGNORE_ALPHA: - g_value_set_boolean (value, gtk_widget->ignore_alpha); - break; case PROP_IGNORE_TEXTURES: g_value_set_boolean (value, gtk_widget->ignore_textures); break; @@ -439,11 +431,6 @@ gtk_gst_base_widget_class_init (GtkGstBaseWidgetClass * klass) "The pixel aspect ratio of the device", DEFAULT_PAR_N, DEFAULT_PAR_D, G_MAXINT, 1, 1, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_klass, PROP_IGNORE_ALPHA, - g_param_spec_boolean ("ignore-alpha", "Ignore Alpha", - "When enabled, alpha will be ignored and converted to black", - DEFAULT_IGNORE_ALPHA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_klass, PROP_IGNORE_TEXTURES, g_param_spec_boolean ("ignore-textures", "Ignore Textures", "When enabled, textures will be ignored and not drawn", @@ -462,7 +449,6 @@ gtk_gst_base_widget_init (GtkGstBaseWidget * widget) widget->force_aspect_ratio = DEFAULT_FORCE_ASPECT_RATIO; widget->par_n = DEFAULT_PAR_N; widget->par_d = DEFAULT_PAR_D; - widget->ignore_alpha = DEFAULT_IGNORE_ALPHA; widget->ignore_textures = DEFAULT_IGNORE_TEXTURES; gst_video_info_init (&widget->v_info); diff --git a/lib/gst/clapper/gtk4/gtkgstbasewidget.h b/lib/gst/clapper/gtk4/gtkgstbasewidget.h index 4532b821..8721c441 100644 --- a/lib/gst/clapper/gtk4/gtkgstbasewidget.h +++ b/lib/gst/clapper/gtk4/gtkgstbasewidget.h @@ -45,7 +45,6 @@ struct _GtkGstBaseWidget /* properties */ gboolean force_aspect_ratio; gint par_n, par_d; - gboolean ignore_alpha; gboolean ignore_textures; gint display_width;