Gtk4Plugin: remove subtitles scaling

Causes jitter (even crashes on i965) when resizing video and honestly I think that subtitles rendered at video size look better.
This commit is contained in:
Rafał Dzięgiel
2021-01-29 17:52:27 +01:00
parent 2ce44d4e63
commit b487d1f2c1
2 changed files with 0 additions and 52 deletions

View File

@@ -128,41 +128,9 @@ gst_gtk_gl_sink_query (GstBaseSink * bsink, GstQuery * query)
return res; return res;
} }
static void
_size_changed_cb (GtkWidget * widget, gint width,
gint height, GstGtkGLSink * gtk_sink)
{
gboolean reconfigure;
GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget);
/* Ignore size changes before widget is negotiated
* we are going to queue a resize after negotiation */
if (!base_widget->negotiated)
return;
GST_OBJECT_LOCK (gtk_sink);
reconfigure =
(width != gtk_sink->display_width || height != gtk_sink->display_height);
gtk_sink->display_width = width;
gtk_sink->display_height = height;
GST_OBJECT_UNLOCK (gtk_sink);
if (reconfigure) {
GST_DEBUG_OBJECT (gtk_sink, "Sending reconfigure event on sinkpad");
gst_pad_push_event (GST_BASE_SINK (gtk_sink)->sinkpad,
gst_event_new_reconfigure ());
}
}
static void static void
destroy_cb (GtkWidget * widget, GstGtkGLSink * gtk_sink) destroy_cb (GtkWidget * widget, GstGtkGLSink * gtk_sink)
{ {
if (gtk_sink->widget_resize_sig_handler) {
g_signal_handler_disconnect (widget, gtk_sink->widget_resize_sig_handler);
gtk_sink->widget_resize_sig_handler = 0;
}
if (gtk_sink->widget_destroy_sig_handler) { if (gtk_sink->widget_destroy_sig_handler) {
g_signal_handler_disconnect (widget, gtk_sink->widget_destroy_sig_handler); g_signal_handler_disconnect (widget, gtk_sink->widget_destroy_sig_handler);
gtk_sink->widget_destroy_sig_handler = 0; gtk_sink->widget_destroy_sig_handler = 0;
@@ -182,13 +150,6 @@ gst_gtk_gl_sink_start (GstBaseSink * bsink)
/* After this point, gtk_sink->widget will always be set */ /* After this point, gtk_sink->widget will always be set */
gst_widget = GTK_GST_GL_WIDGET (base_sink->widget); gst_widget = GTK_GST_GL_WIDGET (base_sink->widget);
/* Track the allocation size */
if (!gtk_sink->widget_resize_sig_handler) {
gtk_sink->widget_resize_sig_handler =
g_signal_connect (gst_widget, "resize",
G_CALLBACK (_size_changed_cb), gtk_sink);
}
if (!gtk_sink->widget_destroy_sig_handler) { if (!gtk_sink->widget_destroy_sig_handler) {
gtk_sink->widget_destroy_sig_handler = gtk_sink->widget_destroy_sig_handler =
g_signal_connect (gst_widget, "destroy", G_CALLBACK (destroy_cb), g_signal_connect (gst_widget, "destroy", G_CALLBACK (destroy_cb),
@@ -226,12 +187,6 @@ gst_gtk_gl_sink_stop (GstBaseSink * bsink)
GstGtkGLSink *gtk_sink = GST_GTK_GL_SINK (bsink); GstGtkGLSink *gtk_sink = GST_GTK_GL_SINK (bsink);
GstGtkBaseSink *base_sink = GST_GTK_BASE_SINK (bsink); GstGtkBaseSink *base_sink = GST_GTK_BASE_SINK (bsink);
if (gtk_sink->widget_resize_sig_handler) {
g_signal_handler_disconnect (base_sink->widget,
gtk_sink->widget_resize_sig_handler);
gtk_sink->widget_resize_sig_handler = 0;
}
if (gtk_sink->display) { if (gtk_sink->display) {
gst_object_unref (gtk_sink->display); gst_object_unref (gtk_sink->display);
gtk_sink->display = NULL; gtk_sink->display = NULL;
@@ -371,12 +326,6 @@ gst_gtk_gl_sink_finalize (GObject * object)
GstGtkGLSink *gtk_sink = GST_GTK_GL_SINK (object); GstGtkGLSink *gtk_sink = GST_GTK_GL_SINK (object);
GstGtkBaseSink *base_sink = GST_GTK_BASE_SINK (object); GstGtkBaseSink *base_sink = GST_GTK_BASE_SINK (object);
if (gtk_sink->widget_resize_sig_handler) {
g_signal_handler_disconnect (base_sink->widget,
gtk_sink->widget_resize_sig_handler);
gtk_sink->widget_resize_sig_handler = 0;
}
if (gtk_sink->widget_destroy_sig_handler) { if (gtk_sink->widget_destroy_sig_handler) {
g_signal_handler_disconnect (base_sink->widget, g_signal_handler_disconnect (base_sink->widget,
gtk_sink->widget_destroy_sig_handler); gtk_sink->widget_destroy_sig_handler);

View File

@@ -56,7 +56,6 @@ struct _GstGtkGLSink
gint display_width; gint display_width;
gint display_height; gint display_height;
gulong widget_resize_sig_handler;
gulong widget_destroy_sig_handler; gulong widget_destroy_sig_handler;
}; };