From 9deb8f566a1b110bee289b594a9e82becec67c8d Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Mon, 7 Sep 2009 22:02:04 +0300 Subject: [PATCH] Remove set/get drawable --- include/vlc/deprecated.h | 30 ------------------ src/control/media_player.c | 42 -------------------------- src/control/mediacontrol_audio_video.c | 7 +++-- src/libvlc.sym | 2 -- 4 files changed, 5 insertions(+), 76 deletions(-) diff --git a/include/vlc/deprecated.h b/include/vlc/deprecated.h index cbb382dce4..e946b77f6b 100644 --- a/include/vlc/deprecated.h +++ b/include/vlc/deprecated.h @@ -41,36 +41,6 @@ typedef int libvlc_drawable_t; extern "C" { # endif -/** - * Set the drawable where the media player should render its video output. - * - * On Windows 32-bits, a window handle (HWND) is expected. - * On Windows 64-bits, this function will always fail. - * - * On OSX 32-bits, a CGrafPort is expected. - * On OSX 64-bits, this function will always fail. - * - * On other platforms, an existing X11 window ID is expected. See - * libvlc_media_player_set_xwindow() for details. - * - * \param p_mi the Media Player - * \param drawable the libvlc_drawable_t where the media player - * should render its video - * \param p_e an initialized exception pointer - */ -VLC_DEPRECATED_API void libvlc_media_player_set_drawable ( libvlc_media_player_t *, libvlc_drawable_t, libvlc_exception_t * ); - -/** - * Get the drawable where the media player should render its video output - * - * \param p_mi the Media Player - * \param p_e an initialized exception pointer - * \return the libvlc_drawable_t where the media player - * should render its video - */ -VLC_DEPRECATED_API libvlc_drawable_t - libvlc_media_player_get_drawable ( libvlc_media_player_t *, libvlc_exception_t * ); - /***************************************************************************** * Playlist (Deprecated) *****************************************************************************/ diff --git a/src/control/media_player.c b/src/control/media_player.c index 5c5674c37d..bfc177c3a2 100644 --- a/src/control/media_player.c +++ b/src/control/media_player.c @@ -743,48 +743,6 @@ void *libvlc_media_player_get_hwnd( libvlc_media_player_t *p_mi ) return p_mi->drawable.hwnd; } -/************************************************************************** - * Set Drawable - **************************************************************************/ -void libvlc_media_player_set_drawable( libvlc_media_player_t *p_mi, - libvlc_drawable_t drawable, - libvlc_exception_t *p_e ) -{ -#ifdef WIN32 - if (sizeof (HWND) <= sizeof (libvlc_drawable_t)) - p_mi->drawable.hwnd = (HWND)drawable; - else - libvlc_exception_raise(p_e, "Operation not supported"); -#elif defined(__APPLE__) - p_mi->drawable.agl = drawable; - (void) p_e; -#else - p_mi->drawable.xid = drawable; - (void) p_e; -#endif -} - -/************************************************************************** - * Get Drawable - **************************************************************************/ -libvlc_drawable_t -libvlc_media_player_get_drawable ( libvlc_media_player_t *p_mi, - libvlc_exception_t *p_e ) -{ - VLC_UNUSED(p_e); - -#ifdef WIN32 - if (sizeof (HWND) <= sizeof (libvlc_drawable_t)) - return (libvlc_drawable_t)p_mi->drawable.hwnd; - else - return 0; -#elif defined(__APPLE__) - return p_mi->drawable.agl; -#else - return p_mi->drawable.xid; -#endif -} - /************************************************************************** * Getters for stream information **************************************************************************/ diff --git a/src/control/mediacontrol_audio_video.c b/src/control/mediacontrol_audio_video.c index 330e90c6bf..9afb08cf9f 100644 --- a/src/control/mediacontrol_audio_video.c +++ b/src/control/mediacontrol_audio_video.c @@ -241,8 +241,11 @@ int mediacontrol_set_visual( mediacontrol_Instance *self, mediacontrol_exception_init( exception ); libvlc_exception_init( &ex ); - - libvlc_media_player_set_drawable( self->p_media_player, (libvlc_drawable_t)visual_id, &ex ); +#ifdef WIN32 + libvlc_media_player_set_hwnd( self->p_media_player, visual_id, &ex ); +#else + libvlc_media_player_set_xwindow( self->p_media_player, visual_id, &ex ); +#endif HANDLE_LIBVLC_EXCEPTION_ZERO( &ex ); return true; } diff --git a/src/libvlc.sym b/src/libvlc.sym index 09107d42a5..d59a02ba7a 100644 --- a/src/libvlc.sym +++ b/src/libvlc.sym @@ -130,7 +130,6 @@ libvlc_media_player_get_agl libvlc_media_player_get_chapter libvlc_media_player_get_chapter_count libvlc_media_player_get_chapter_count_for_title -libvlc_media_player_get_drawable libvlc_media_player_get_fps libvlc_media_player_get_hwnd libvlc_media_player_get_length @@ -156,7 +155,6 @@ libvlc_media_player_release libvlc_media_player_retain libvlc_media_player_set_agl libvlc_media_player_set_chapter -libvlc_media_player_set_drawable libvlc_media_player_set_hwnd libvlc_media_player_set_media libvlc_media_player_set_nsobject -- 2.39.2