[vlc-devel] commit: libvlc: Export _get/set_nsobject. (Pierre d'Herbemont )
git version control
git at videolan.org
Sat Apr 11 21:38:10 CEST 2009
vlc | branch: master | Pierre d'Herbemont <steg at nibudy.local> | Sat Apr 11 10:29:35 2009 -0700| [474d2d36e23a761c1044a2328cf41b6bdcee381b] | committer: Pierre d'Herbemont
libvlc: Export _get/set_nsobject.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=474d2d36e23a761c1044a2328cf41b6bdcee381b
---
include/vlc/libvlc.h | 16 ++++++++++++++++
src/control/libvlc_internal.h | 1 +
src/control/media_player.c | 26 ++++++++++++++++++++++++++
src/libvlc.sym | 2 ++
4 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/include/vlc/libvlc.h b/include/vlc/libvlc.h
index a3a40e7..67acf99 100644
--- a/include/vlc/libvlc.h
+++ b/include/vlc/libvlc.h
@@ -562,6 +562,22 @@ VLC_PUBLIC_API void libvlc_media_player_stop ( libvlc_media_player_t *, libvlc_e
* \param drawable the agl handler
* \param p_e an initialized exception pointer
*/
+VLC_PUBLIC_API void libvlc_media_player_set_nsobject ( libvlc_media_player_t *p_mi, void * drawable, libvlc_exception_t *p_e );
+
+/**
+ * Get the agl handler previously set with libvlc_media_player_set_agl().
+ *
+ * \return the agl handler or 0 if none where set
+ */
+VLC_PUBLIC_API uint32_t libvlc_media_player_get_nsobject ( libvlc_media_player_t *p_mi );
+
+/**
+ * Set the agl handler where the media player should render its video output.
+ *
+ * \param p_mi the Media Player
+ * \param drawable the agl handler
+ * \param p_e an initialized exception pointer
+ */
VLC_PUBLIC_API void libvlc_media_player_set_agl ( libvlc_media_player_t *p_mi, uint32_t drawable, libvlc_exception_t *p_e );
/**
diff --git a/src/control/libvlc_internal.h b/src/control/libvlc_internal.h
index f274478..67e8c28 100644
--- a/src/control/libvlc_internal.h
+++ b/src/control/libvlc_internal.h
@@ -157,6 +157,7 @@ struct libvlc_media_player_t
struct
{
void *hwnd;
+ void *nsobject;
uint32_t xid;
uint32_t agl;
} drawable;
diff --git a/src/control/media_player.c b/src/control/media_player.c
index 6dbb8c6..8639813 100644
--- a/src/control/media_player.c
+++ b/src/control/media_player.c
@@ -633,6 +633,13 @@ void libvlc_media_player_play( libvlc_media_player_t *p_mi,
var_Set( p_input_thread, "drawable-hwnd", val );
}
+ var_Create( p_input_thread, "drawable-nsobject", VLC_VAR_ADDRESS );
+ if( p_mi->drawable.nsobject != NULL )
+ {
+ vlc_value_t val = { .p_address = p_mi->drawable.nsobject };
+ var_Set( p_input_thread, "drawable-nsobject", val );
+ }
+
var_AddCallback( p_input_thread, "can-seek", input_seekable_changed, p_mi );
var_AddCallback( p_input_thread, "can-pause", input_pausable_changed, p_mi );
var_AddCallback( p_input_thread, "intf-event", input_event_changed, p_mi );
@@ -719,6 +726,25 @@ void libvlc_media_player_stop( libvlc_media_player_t *p_mi,
}
/**************************************************************************
+ * set_nsobject
+ **************************************************************************/
+void libvlc_media_player_set_nsobject( libvlc_media_player_t *p_mi,
+ void * drawable,
+ libvlc_exception_t *p_e )
+{
+ (void) p_e;
+ p_mi->drawable.nsobject = drawable;
+}
+
+/**************************************************************************
+ * get_agl
+ **************************************************************************/
+uint32_t libvlc_media_player_get_nsobject( libvlc_media_player_t *p_mi )
+{
+ return p_mi->drawable.nsobject;
+}
+
+/**************************************************************************
* set_agl
**************************************************************************/
void libvlc_media_player_set_agl( libvlc_media_player_t *p_mi,
diff --git a/src/libvlc.sym b/src/libvlc.sym
index 2f26333..2dbffcf 100644
--- a/src/libvlc.sym
+++ b/src/libvlc.sym
@@ -130,6 +130,7 @@ libvlc_media_player_get_fps
libvlc_media_player_get_hwnd
libvlc_media_player_get_length
libvlc_media_player_get_media
+libvlc_media_player_get_nsobject
libvlc_media_player_get_position
libvlc_media_player_get_rate
libvlc_media_player_get_state
@@ -154,6 +155,7 @@ 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
libvlc_media_player_set_position
libvlc_media_player_set_rate
libvlc_media_player_set_time
More information about the vlc-devel
mailing list