Add nsobject support to vout_window_t
authorJuho Vähä-Herttua <juhovh@iki.fi>
Wed, 21 Jul 2010 13:54:21 +0000 (16:54 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 21 Jul 2010 15:09:35 +0000 (18:09 +0300)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
include/vlc_vout_window.h
src/video_output/window.c

index 84d78ee..3d7e929 100644 (file)
@@ -43,6 +43,7 @@ typedef struct vout_window_sys_t vout_window_sys_t;
 enum {
     VOUT_WINDOW_TYPE_XID,
     VOUT_WINDOW_TYPE_HWND,
+    VOUT_WINDOW_TYPE_NSOBJECT,
 };
 
 /**
@@ -88,8 +89,9 @@ struct vout_window_t {
      * It must be filled in the open function.
      */
     union {
-        void     *hwnd;   /* Win32 window handle */
-        uint32_t xid;     /* X11 windows ID */
+        void     *hwnd;     /* Win32 window handle */
+        uint32_t xid;       /* X11 windows ID */
+        void     *nsobject; /* Mac OSX view object */
     } handle;
 
     /* display server (mandatory) */
index a8ef797..d79a4e2 100644 (file)
@@ -63,6 +63,12 @@ vout_window_t *vout_window_New(vlc_object_t *obj,
         type = "vout window hwnd";
         window->handle.hwnd = NULL;
         break;
+#endif
+#ifdef __APPLE__
+    case VOUT_WINDOW_TYPE_NSOBJECT:
+        type = "vout window nsobject";
+        window->handle.nsobject = NULL;
+        break;
 #endif
     case VOUT_WINDOW_TYPE_XID:
         type = "vout window xid";