[vlc-commits] dbus: fix the CanSetFullscreen property getter

Mirsal Ennaime git at videolan.org
Sun Mar 18 18:03:42 CET 2012


vlc | branch: master | Mirsal Ennaime <mirsal at videolan.org> | Sun Mar 18 17:55:45 2012 +0100| [5de19c378287e83f4a592fb9cc02818ff9df8c51] | committer: Mirsal Ennaime

dbus: fix the CanSetFullscreen property getter

Make org.mpris.MediaPlayer2.CanSetFullscreen true only when
a vout thread is running.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5de19c378287e83f4a592fb9cc02818ff9df8c51
---

 modules/control/dbus/dbus_root.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/modules/control/dbus/dbus_root.c b/modules/control/dbus/dbus_root.c
index 27d7685..76e4c7b 100644
--- a/modules/control/dbus/dbus_root.c
+++ b/modules/control/dbus/dbus_root.c
@@ -101,7 +101,18 @@ DBUS_METHOD( Identity )
 static int
 MarshalCanSetFullscreen( intf_thread_t *p_intf, DBusMessageIter *container )
 {
-    const dbus_bool_t b_ret = (p_intf->p_sys->p_playlist) ? TRUE : FALSE;
+    input_thread_t *p_input = NULL;
+    dbus_bool_t     b_ret   = FALSE;
+
+    if (p_intf->p_sys->p_input)
+    {
+        p_input = (input_thread_t*) vlc_object_hold( p_intf->p_sys->p_input );
+        vout_thread_t* p_vout = input_GetVout( p_input );
+        vlc_object_release( p_input );
+
+        if ( p_vout )
+            b_ret = TRUE;
+    }
 
     dbus_message_iter_append_basic( container, DBUS_TYPE_BOOLEAN, &b_ret );
     return VLC_SUCCESS;



More information about the vlc-commits mailing list