[vlc-devel] commit: xcb_window: implement VOUT_SET_SIZE ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu Apr 9 16:59:54 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Thu Apr  9 12:46:45 2009 +0300| [3d819f9c3d0071b01c6d0294d8ed063e8a320696] | committer: Rémi Denis-Courmont 

xcb_window: implement VOUT_SET_SIZE

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

 modules/video_output/xcb/window.c |   27 ++++++++++++++++++++++++---
 1 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/xcb/window.c b/modules/video_output/xcb/window.c
index 6271316..9b72f42 100644
--- a/modules/video_output/xcb/window.c
+++ b/modules/video_output/xcb/window.c
@@ -197,11 +197,32 @@ static void *Thread (void *data)
     return NULL;
 }
 
+#include <vlc_vout.h>
 
 static int Control (vout_window_t *wnd, int cmd, va_list ap)
 {
-    msg_Err (wnd, "request %d not implemented", cmd);
-    (void)ap;
-    return VLC_EGENERIC;
+    vout_window_sys_t *p_sys = wnd->p_sys;
+    xcb_connection_t *conn = p_sys->conn;
+
+    switch (cmd)
+    {
+        case VOUT_SET_SIZE:
+        {
+            unsigned width = va_arg (ap, unsigned);
+            unsigned height = va_arg (ap, unsigned);
+            const uint32_t values[] = { width, height, };
+
+            xcb_configure_window (conn, wnd->handle.xid,
+                                  XCB_CONFIG_WINDOW_WIDTH |
+                                  XCB_CONFIG_WINDOW_HEIGHT, values);
+            xcb_flush (conn);
+            break;
+        }
+
+        default:
+            msg_Err (wnd, "request %d not implemented", cmd);
+            return VLC_EGENERIC;
+    }
+    return VLC_SUCCESS;
 }
 




More information about the vlc-devel mailing list