mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 23:32:04 +02:00
Compare commits
3 Commits
696b9a2d2e
...
post-relea
Author | SHA1 | Date | |
---|---|---|---|
|
eb2e760de2 | ||
|
d3a169fccd | ||
|
0cee4e90a5 |
@@ -909,7 +909,7 @@ _set_inhibit_session (ClapperGtkVideo *self, gboolean inhibit)
|
|||||||
|
|
||||||
root = gtk_widget_get_root (GTK_WIDGET (self));
|
root = gtk_widget_get_root (GTK_WIDGET (self));
|
||||||
|
|
||||||
if (!root && !GTK_IS_WINDOW (root)) {
|
if (!root || !GTK_IS_WINDOW (root)) {
|
||||||
GST_WARNING_OBJECT (self, "Cannot %sinhibit session "
|
GST_WARNING_OBJECT (self, "Cannot %sinhibit session "
|
||||||
"without root window", (inhibit) ? "" : "un");
|
"without root window", (inhibit) ? "" : "un");
|
||||||
return;
|
return;
|
||||||
@@ -919,7 +919,7 @@ _set_inhibit_session (ClapperGtkVideo *self, gboolean inhibit)
|
|||||||
* as it goes away early when unrooting */
|
* as it goes away early when unrooting */
|
||||||
app = g_application_get_default ();
|
app = g_application_get_default ();
|
||||||
|
|
||||||
if (!app && !GTK_IS_APPLICATION (app)) {
|
if (!app || !GTK_IS_APPLICATION (app)) {
|
||||||
GST_WARNING_OBJECT (self, "Cannot %sinhibit session "
|
GST_WARNING_OBJECT (self, "Cannot %sinhibit session "
|
||||||
"without window application set", (inhibit) ? "" : "un");
|
"without window application set", (inhibit) ? "" : "un");
|
||||||
return;
|
return;
|
||||||
@@ -977,21 +977,25 @@ _get_widget_from_video_sink (GstElement *vsink)
|
|||||||
GParamSpec *pspec;
|
GParamSpec *pspec;
|
||||||
|
|
||||||
if ((pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (vsink), "widget"))
|
if ((pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (vsink), "widget"))
|
||||||
&& pspec->value_type == GTK_TYPE_WIDGET) {
|
&& g_type_is_a (pspec->value_type, GTK_TYPE_WIDGET)) {
|
||||||
GST_DEBUG ("Video sink provides a widget");
|
GST_DEBUG ("Video sink provides a widget");
|
||||||
g_object_get (vsink, "widget", &widget, NULL);
|
g_object_get (vsink, "widget", &widget, NULL);
|
||||||
} else if ((pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (vsink), "paintable"))
|
} else if ((pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (vsink), "paintable"))
|
||||||
&& pspec->value_type == GDK_TYPE_PAINTABLE) {
|
&& g_type_is_a (pspec->value_type, G_TYPE_OBJECT)) {
|
||||||
GdkPaintable *paintable = NULL;
|
GObject *paintable = NULL;
|
||||||
|
|
||||||
GST_DEBUG ("Video sink provides a paintable");
|
GST_DEBUG ("Video sink provides a paintable");
|
||||||
g_object_get (vsink, "paintable", &paintable, NULL);
|
g_object_get (vsink, "paintable", &paintable, NULL);
|
||||||
|
|
||||||
|
if (G_LIKELY (paintable != NULL)) {
|
||||||
|
if (GDK_IS_PAINTABLE (paintable)) {
|
||||||
widget = g_object_ref_sink (gtk_picture_new ());
|
widget = g_object_ref_sink (gtk_picture_new ());
|
||||||
gtk_picture_set_paintable (GTK_PICTURE (widget), paintable);
|
gtk_picture_set_paintable (GTK_PICTURE (widget), GDK_PAINTABLE (paintable));
|
||||||
|
}
|
||||||
|
|
||||||
g_object_unref (paintable);
|
g_object_unref (paintable);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return widget;
|
return widget;
|
||||||
}
|
}
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
|
||||||
#include "clapper-server-mdns-private.h"
|
#include "clapper-server-mdns-private.h"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user