Commit 2f6eb75c authored by KO Myung-Hun's avatar KO Myung-Hun Committed by Rémi Denis-Courmont

Add vout window support for OS/2

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 2aea85fb
...@@ -46,7 +46,7 @@ enum { ...@@ -46,7 +46,7 @@ enum {
VOUT_WINDOW_TYPE_NSOBJECT, VOUT_WINDOW_TYPE_NSOBJECT,
}; };
#if defined (WIN32) #if defined (WIN32) || defined (__OS2__)
# define VOUT_WINDOW_TYPE_NATIVE VOUT_WINDOW_TYPE_HWND # define VOUT_WINDOW_TYPE_NATIVE VOUT_WINDOW_TYPE_HWND
#elif defined (__unix__) #elif defined (__unix__)
# define VOUT_WINDOW_TYPE_NATIVE VOUT_WINDOW_TYPE_XID # define VOUT_WINDOW_TYPE_NATIVE VOUT_WINDOW_TYPE_XID
...@@ -113,7 +113,7 @@ struct vout_window_t { ...@@ -113,7 +113,7 @@ struct vout_window_t {
vout_window_sys_t *sys; vout_window_sys_t *sys;
}; };
/** /**
* Creates a new window. * Creates a new window.
* *
* @param module plugin name (usually "$window") * @param module plugin name (usually "$window")
......
...@@ -413,7 +413,7 @@ libvlc_media_player_new( libvlc_instance_t *instance ) ...@@ -413,7 +413,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
var_Create (mp, "vmem-height", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT); var_Create (mp, "vmem-height", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
var_Create (mp, "vmem-pitch", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT); var_Create (mp, "vmem-pitch", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
var_Create (mp, "drawable-xid", VLC_VAR_INTEGER); var_Create (mp, "drawable-xid", VLC_VAR_INTEGER);
#ifdef WIN32 #if defined (WIN32) || defined (__OS2__)
var_Create (mp, "drawable-hwnd", VLC_VAR_INTEGER); var_Create (mp, "drawable-hwnd", VLC_VAR_INTEGER);
#endif #endif
#ifdef __APPLE__ #ifdef __APPLE__
...@@ -935,7 +935,7 @@ void libvlc_media_player_set_hwnd( libvlc_media_player_t *p_mi, ...@@ -935,7 +935,7 @@ void libvlc_media_player_set_hwnd( libvlc_media_player_t *p_mi,
void *drawable ) void *drawable )
{ {
assert (p_mi != NULL); assert (p_mi != NULL);
#ifdef WIN32 #if defined (WIN32) || defined (__OS2__)
var_SetString (p_mi, "window", var_SetString (p_mi, "window",
(drawable != NULL) ? "embed-hwnd,any" : ""); (drawable != NULL) ? "embed-hwnd,any" : "");
var_SetInteger (p_mi, "drawable-hwnd", (uintptr_t)drawable); var_SetInteger (p_mi, "drawable-hwnd", (uintptr_t)drawable);
...@@ -950,7 +950,7 @@ void libvlc_media_player_set_hwnd( libvlc_media_player_t *p_mi, ...@@ -950,7 +950,7 @@ void libvlc_media_player_set_hwnd( libvlc_media_player_t *p_mi,
void *libvlc_media_player_get_hwnd( libvlc_media_player_t *p_mi ) void *libvlc_media_player_get_hwnd( libvlc_media_player_t *p_mi )
{ {
assert (p_mi != NULL); assert (p_mi != NULL);
#ifdef WIN32 #if defined (WIN32) || defined (__OS2__)
return (void *)(uintptr_t)var_GetInteger (p_mi, "drawable-hwnd"); return (void *)(uintptr_t)var_GetInteger (p_mi, "drawable-hwnd");
#else #else
return NULL; return NULL;
......
...@@ -705,7 +705,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, ...@@ -705,7 +705,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
var_Create( p_libvlc, "drawable-clip-right", VLC_VAR_INTEGER ); var_Create( p_libvlc, "drawable-clip-right", VLC_VAR_INTEGER );
var_Create( p_libvlc, "drawable-nsobject", VLC_VAR_ADDRESS ); var_Create( p_libvlc, "drawable-nsobject", VLC_VAR_ADDRESS );
#endif #endif
#ifdef WIN32 #if defined (WIN32) || defined (__OS2__)
var_Create( p_libvlc, "drawable-hwnd", VLC_VAR_INTEGER ); var_Create( p_libvlc, "drawable-hwnd", VLC_VAR_INTEGER );
#endif #endif
......
...@@ -64,7 +64,7 @@ vout_window_t *vout_window_New(vlc_object_t *obj, ...@@ -64,7 +64,7 @@ vout_window_t *vout_window_New(vlc_object_t *obj,
const char *type; const char *type;
switch (cfg->type) { switch (cfg->type) {
#ifdef WIN32 #if defined(WIN32) || defined(__OS2__)
case VOUT_WINDOW_TYPE_HWND: case VOUT_WINDOW_TYPE_HWND:
type = "vout window hwnd"; type = "vout window hwnd";
window->handle.hwnd = NULL; window->handle.hwnd = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment