#define _LIBVLC_H 1
#include <vlc/vlc.h>
+#include <vlc/libvlc_structures.h>
# ifdef __cplusplus
extern "C" {
* @{
*/
-typedef struct
-{
- int b_raised;
- int i_code;
- char *psz_message;
-} libvlc_exception_t;
-
/**
* Initialize an exception structure. This can be called several times to reuse
* an exception structure.
* @{
*/
-/** This structure is opaque. It represents a libvlc instance */
-typedef struct libvlc_instance_t libvlc_instance_t;
-
/**
* Create an initialized libvlc instance
* \param argc the number of arguments
* @{
*/
-typedef struct {
- int i_id;
- char * psz_uri;
- char * psz_name;
-
-} libvlc_playlist_item_t;
-
/**
* Set loop variable
*/
*/
VLC_PUBLIC_API int libvlc_playlist_items_count( libvlc_instance_t *, libvlc_exception_t * );
+/**
+ * Lock the playlist instance
+ * \param p_instance the instance
+ */
+VLC_PUBLIC_API void libvlc_playlist_lock( libvlc_instance_t * );
+
+/**
+ * Unlock the playlist instance
+ * \param p_instance the instance
+ */
+VLC_PUBLIC_API void libvlc_playlist_unlock( libvlc_instance_t * );
+
/**
* Stop playing
* \param p_instance the instance to stop
* @{
*/
-/**
-* 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
-{
- int top, left;
- int bottom, right;
-}
-libvlc_rectangle_t;
-
/**
* Does this input have a video output ?
* \param p_input the input
*/
VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_input_t *, char *, libvlc_exception_t * );
+/**
+ * Get current video subtitle
+ * \param p_input the input
+ * \param p_exception an initialized exception
+ * \return the video subtitle selected
+ */
+VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_input_t *, libvlc_exception_t * );
+
+/**
+ * Set new video subtitle
+ * \param p_input the input
+ * \param i_spu new video subtitle to select
+ * \param p_exception an initialized exception
+ */
+VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_input_t *, int , libvlc_exception_t * );
+
/**
* Get current crop filter geometry
* \param p_input the input
*/
VLC_PUBLIC_API int libvlc_video_reparent( libvlc_input_t *, libvlc_drawable_t, libvlc_exception_t * );
+/**
+ * Tell windowless video output to redraw rectangular area (MacOS X only)
+ * \param p_instance libvlc instance
+ * \param area coordinates within video drawable
+ * \param p_exception an initialized exception
+ */
+VLC_PUBLIC_API void libvlc_video_redraw_rectangle( libvlc_input_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
+
/**
* Set the default video output parent
* this settings will be used as default for all video outputs
*/
VLC_PUBLIC_API void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
+/**
+ * Set the default video output parent
+ * this settings will be used as default for all video outputs
+ * \param p_instance libvlc instance
+ * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
+ * \param p_exception an initialized exception
+ */
+VLC_PUBLIC_API libvlc_drawable_t libvlc_video_get_parent( libvlc_instance_t *, libvlc_exception_t * );
+
/**
* Set the default video output size
* this settings will be used as default for all video outputs
*/
VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
-
/** @} */
/**
VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
libvlc_exception_t *);
+/**
+ * Add a media's input MRL. This will add the specified one.
+ * \param p_instance the instance
+ * \param psz_name the media to work on
+ * \param psz_input the input MRL
+ * \param p_exception an initialized exception
+ */
+VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
+ libvlc_exception_t *p_exception );
/**
* Set output for a media
* \param p_instance the instance
* @{
*/
-/** This structure is opaque. It represents a libvlc log instance */
-typedef struct libvlc_log_t libvlc_log_t;
-
-/** This structure is opaque. It represents a libvlc log iterator */
-typedef struct libvlc_log_iterator_t libvlc_log_iterator_t;
-
-typedef struct libvlc_log_message_t
-{
- unsigned sizeof_msg; /* sizeof() of message structure, must be filled in by user */
- int i_severity; /* 0=INFO, 1=ERR, 2=WARN, 3=DBG */
- const char *psz_type; /* module type */
- const char *psz_name; /* module name */
- const char *psz_header; /* optional header */
- const char *psz_message; /* message */
-} libvlc_log_message_t;
-
/**
* Returns the VLC messaging verbosity level
* \param p_instance libvlc instance
/** @} */
+/*****************************************************************************
+ * Callbacks handling
+ *****************************************************************************/
+
+/** defgroup libvlc_callbacks Callbacks
+ * \ingroup libvlc
+ * LibVLC Event Callbacks
+ * @{
+ */
+
+/**
+ * Register for a callback notification
+ * \param p_instance the libvlc instance
+ * \param i_event_type the desired event mask to which we want to listen
+ * \param f_callback the function to call when i_event_type occurs
+ * \param user_data user provided data to carry with the event
+ * \param p_e an initialized exception pointer
+ */
+VLC_PUBLIC_API void libvlc_callback_register_for_event( libvlc_instance_t *p_instance,
+ libvlc_event_type_t i_event_type,
+ libvlc_callback_t f_callback,
+ void *user_data,
+ libvlc_exception_t *p_e );
+
+/**
+ * Unregister a callback notification
+ * \param p_instance the libvlc instance
+ * \param i_event_type the desired event mask to which we want to unregister
+ * \param f_callback the function to call when i_event_type occurs
+ * \param p_e an initialized exception pointer
+ */
+VLC_PUBLIC_API void libvlc_callback_unregister_for_event( libvlc_instance_t *p_instance,
+ libvlc_event_type_t i_event_type,
+ libvlc_callback_t f_callback,
+ libvlc_exception_t *p_e );
+
+/** @} */
+
+
# ifdef __cplusplus
}
# endif