[vlc-devel] commit: Deprecate libvlc_media_player_(g|s)et_drawable ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Feb 7 18:32:20 CET 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Feb  7 19:27:44 2009 +0200| [14602bebf0d564660a739f40a8936b03fb5940eb] | committer: Rémi Denis-Courmont 

Deprecate libvlc_media_player_(g|s)et_drawable

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

 include/vlc/deprecated.h        |   37 +++++++++++++++++++++++++++++++++++++
 include/vlc/libvlc.h            |   32 --------------------------------
 include/vlc/libvlc_structures.h |    8 --------
 3 files changed, 37 insertions(+), 40 deletions(-)

diff --git a/include/vlc/deprecated.h b/include/vlc/deprecated.h
index f7711ca..bb966d0 100644
--- a/include/vlc/deprecated.h
+++ b/include/vlc/deprecated.h
@@ -30,11 +30,48 @@
  * This file defines libvlc depreceated API
  */
 
+/**
+ * This is the legacy representation of a platform-specific drawable. Because
+ * it cannot accomodate a pointer on most 64-bits platforms, it should not be
+ * used anymore.
+ */
+typedef int libvlc_drawable_t;
+
 # ifdef __cplusplus
 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_xid() 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_PUBLIC_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_PUBLIC_API libvlc_drawable_t
+                    libvlc_media_player_get_drawable ( libvlc_media_player_t *, libvlc_exception_t * );
+
+/**
  * Set the default video output's parent.
  *
  * This setting will be used as default for any video output.
diff --git a/include/vlc/libvlc.h b/include/vlc/libvlc.h
index a720c76..290da21 100644
--- a/include/vlc/libvlc.h
+++ b/include/vlc/libvlc.h
@@ -580,38 +580,6 @@ VLC_PUBLIC_API void libvlc_media_player_set_xid ( libvlc_media_player_t *p_mi, u
  */
 VLC_PUBLIC_API void libvlc_media_player_set_hwnd ( libvlc_media_player_t *p_mi, void *drawable, libvlc_exception_t *p_e );
 
-/**
- * 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, a CGrafPort is expected.
- *
- * Otherwise, this shall be the identifier of an existing X11 drawable (window
- * or pixmap). It is assumed that the X11 server is the same as the one in
- * x11-display if configured. If XVideo is <b>not</b> supported, it is assumed
- * that the drawable has the same pixmap format as the default X11 screen
- * (especially depth, scan line pad, black pixel); this is a bug.
- *
- * \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_PUBLIC_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_PUBLIC_API libvlc_drawable_t
-                    libvlc_media_player_get_drawable ( libvlc_media_player_t *, libvlc_exception_t * );
-
 /** \bug This might go away ... to be replaced by a broader system */
 
 /**
diff --git a/include/vlc/libvlc_structures.h b/include/vlc/libvlc_structures.h
index e5e1be3..bede67c 100644
--- a/include/vlc/libvlc_structures.h
+++ b/include/vlc/libvlc_structures.h
@@ -266,14 +266,6 @@ typedef struct libvlc_audio_output_t
  */
 
 /**
-* Downcast to this general type as placeholder for a platform specific one, such as:
-*  Drawable on X11,
-*  CGrafPort on MacOSX,
-*  HWND on win32
-*/
-typedef int libvlc_drawable_t;
-
-/**
 * Rectangle type for video geometry
 */
 typedef struct libvlc_rectangle_t




More information about the vlc-devel mailing list