mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
Sink: remove ignore_alpha property
GTK4 no longer supports ignoring alpha
This commit is contained in:
@@ -38,7 +38,6 @@ GST_DEBUG_CATEGORY (gst_debug_gtk_base_sink);
|
|||||||
#define DEFAULT_FORCE_ASPECT_RATIO TRUE
|
#define DEFAULT_FORCE_ASPECT_RATIO TRUE
|
||||||
#define DEFAULT_PAR_N 0
|
#define DEFAULT_PAR_N 0
|
||||||
#define DEFAULT_PAR_D 1
|
#define DEFAULT_PAR_D 1
|
||||||
#define DEFAULT_IGNORE_ALPHA TRUE
|
|
||||||
#define DEFAULT_IGNORE_TEXTURES FALSE
|
#define DEFAULT_IGNORE_TEXTURES FALSE
|
||||||
|
|
||||||
static void gst_gtk_base_sink_finalize (GObject * object);
|
static void gst_gtk_base_sink_finalize (GObject * object);
|
||||||
@@ -70,7 +69,6 @@ enum
|
|||||||
PROP_WIDGET,
|
PROP_WIDGET,
|
||||||
PROP_FORCE_ASPECT_RATIO,
|
PROP_FORCE_ASPECT_RATIO,
|
||||||
PROP_PIXEL_ASPECT_RATIO,
|
PROP_PIXEL_ASPECT_RATIO,
|
||||||
PROP_IGNORE_ALPHA,
|
|
||||||
PROP_IGNORE_TEXTURES,
|
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->force_aspect_ratio = DEFAULT_FORCE_ASPECT_RATIO;
|
||||||
gtk_sink->par_n = DEFAULT_PAR_N;
|
gtk_sink->par_n = DEFAULT_PAR_N;
|
||||||
gtk_sink->par_d = DEFAULT_PAR_D;
|
gtk_sink->par_d = DEFAULT_PAR_D;
|
||||||
gtk_sink->ignore_alpha = DEFAULT_IGNORE_ALPHA;
|
|
||||||
gtk_sink->ignore_textures = DEFAULT_IGNORE_TEXTURES;
|
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:
|
case PROP_PIXEL_ASPECT_RATIO:
|
||||||
gst_value_set_fraction (value, gtk_sink->par_n, gtk_sink->par_d);
|
gst_value_set_fraction (value, gtk_sink->par_n, gtk_sink->par_d);
|
||||||
break;
|
break;
|
||||||
case PROP_IGNORE_ALPHA:
|
|
||||||
g_value_set_boolean (value, gtk_sink->ignore_alpha);
|
|
||||||
break;
|
|
||||||
case PROP_IGNORE_TEXTURES:
|
case PROP_IGNORE_TEXTURES:
|
||||||
g_value_set_boolean (value, gtk_sink->ignore_textures);
|
g_value_set_boolean (value, gtk_sink->ignore_textures);
|
||||||
break;
|
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_n = gst_value_get_fraction_numerator (value);
|
||||||
gtk_sink->par_d = gst_value_get_fraction_denominator (value);
|
gtk_sink->par_d = gst_value_get_fraction_denominator (value);
|
||||||
break;
|
break;
|
||||||
case PROP_IGNORE_ALPHA:
|
|
||||||
gtk_sink->ignore_alpha = g_value_get_boolean (value);
|
|
||||||
break;
|
|
||||||
case PROP_IGNORE_TEXTURES:
|
case PROP_IGNORE_TEXTURES:
|
||||||
gtk_sink->ignore_textures = g_value_get_boolean (value);
|
gtk_sink->ignore_textures = g_value_get_boolean (value);
|
||||||
break;
|
break;
|
||||||
|
@@ -65,9 +65,6 @@ struct _GstGtkBaseSink
|
|||||||
gint par_d;
|
gint par_d;
|
||||||
GBinding *bind_pixel_aspect_ratio;
|
GBinding *bind_pixel_aspect_ratio;
|
||||||
|
|
||||||
gboolean ignore_alpha;
|
|
||||||
GBinding *bind_ignore_alpha;
|
|
||||||
|
|
||||||
gboolean ignore_textures;
|
gboolean ignore_textures;
|
||||||
GBinding *bind_ignore_textures;
|
GBinding *bind_ignore_textures;
|
||||||
|
|
||||||
|
@@ -33,7 +33,6 @@ GST_DEBUG_CATEGORY (gst_debug_gtk_base_widget);
|
|||||||
#define DEFAULT_FORCE_ASPECT_RATIO TRUE
|
#define DEFAULT_FORCE_ASPECT_RATIO TRUE
|
||||||
#define DEFAULT_PAR_N 0
|
#define DEFAULT_PAR_N 0
|
||||||
#define DEFAULT_PAR_D 1
|
#define DEFAULT_PAR_D 1
|
||||||
#define DEFAULT_IGNORE_ALPHA TRUE
|
|
||||||
#define DEFAULT_IGNORE_TEXTURES FALSE
|
#define DEFAULT_IGNORE_TEXTURES FALSE
|
||||||
|
|
||||||
enum
|
enum
|
||||||
@@ -41,7 +40,6 @@ enum
|
|||||||
PROP_0,
|
PROP_0,
|
||||||
PROP_FORCE_ASPECT_RATIO,
|
PROP_FORCE_ASPECT_RATIO,
|
||||||
PROP_PIXEL_ASPECT_RATIO,
|
PROP_PIXEL_ASPECT_RATIO,
|
||||||
PROP_IGNORE_ALPHA,
|
|
||||||
PROP_IGNORE_TEXTURES,
|
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_n = gst_value_get_fraction_numerator (value);
|
||||||
gtk_widget->par_d = gst_value_get_fraction_denominator (value);
|
gtk_widget->par_d = gst_value_get_fraction_denominator (value);
|
||||||
break;
|
break;
|
||||||
case PROP_IGNORE_ALPHA:
|
|
||||||
gtk_widget->ignore_alpha = g_value_get_boolean (value);
|
|
||||||
break;
|
|
||||||
case PROP_IGNORE_TEXTURES:
|
case PROP_IGNORE_TEXTURES:
|
||||||
gtk_widget->ignore_textures = g_value_get_boolean (value);
|
gtk_widget->ignore_textures = g_value_get_boolean (value);
|
||||||
break;
|
break;
|
||||||
@@ -147,9 +142,6 @@ gtk_gst_base_widget_get_property (GObject * object, guint prop_id,
|
|||||||
case PROP_PIXEL_ASPECT_RATIO:
|
case PROP_PIXEL_ASPECT_RATIO:
|
||||||
gst_value_set_fraction (value, gtk_widget->par_n, gtk_widget->par_d);
|
gst_value_set_fraction (value, gtk_widget->par_n, gtk_widget->par_d);
|
||||||
break;
|
break;
|
||||||
case PROP_IGNORE_ALPHA:
|
|
||||||
g_value_set_boolean (value, gtk_widget->ignore_alpha);
|
|
||||||
break;
|
|
||||||
case PROP_IGNORE_TEXTURES:
|
case PROP_IGNORE_TEXTURES:
|
||||||
g_value_set_boolean (value, gtk_widget->ignore_textures);
|
g_value_set_boolean (value, gtk_widget->ignore_textures);
|
||||||
break;
|
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,
|
"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_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_object_class_install_property (gobject_klass, PROP_IGNORE_TEXTURES,
|
||||||
g_param_spec_boolean ("ignore-textures", "Ignore Textures",
|
g_param_spec_boolean ("ignore-textures", "Ignore Textures",
|
||||||
"When enabled, textures will be ignored and not drawn",
|
"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->force_aspect_ratio = DEFAULT_FORCE_ASPECT_RATIO;
|
||||||
widget->par_n = DEFAULT_PAR_N;
|
widget->par_n = DEFAULT_PAR_N;
|
||||||
widget->par_d = DEFAULT_PAR_D;
|
widget->par_d = DEFAULT_PAR_D;
|
||||||
widget->ignore_alpha = DEFAULT_IGNORE_ALPHA;
|
|
||||||
widget->ignore_textures = DEFAULT_IGNORE_TEXTURES;
|
widget->ignore_textures = DEFAULT_IGNORE_TEXTURES;
|
||||||
|
|
||||||
gst_video_info_init (&widget->v_info);
|
gst_video_info_init (&widget->v_info);
|
||||||
|
@@ -45,7 +45,6 @@ struct _GtkGstBaseWidget
|
|||||||
/* properties */
|
/* properties */
|
||||||
gboolean force_aspect_ratio;
|
gboolean force_aspect_ratio;
|
||||||
gint par_n, par_d;
|
gint par_n, par_d;
|
||||||
gboolean ignore_alpha;
|
|
||||||
gboolean ignore_textures;
|
gboolean ignore_textures;
|
||||||
|
|
||||||
gint display_width;
|
gint display_width;
|
||||||
|
Reference in New Issue
Block a user