Commit e0105d9b authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

include/vlc: Headers clean up.

Now "#include <vlc/vlc.h>" defines all the definitions needed to use libvlc_*.

* New layout is the following:
vlc/common.h: Global definitions
vlc/deprecated.h: Deprecated stuff
vlc/libvlc_structures.h: Contains all libvlc_* structures.
vlc/libvlc_events.h: Contains libvlc_event_t structure.
vlc/libvlc.h: Contains all libvlc_* functions
vlc/libvlc_media_list.h: Contains all libvlc_media_list_* functions
vlc/libvlc_vlm.h: Contains all libvlc_vlm_* functions.
vlc/vlc.h: Use this header to use libvlc-control.dylib.
parent 2a8e229e
/*****************************************************************************
* vlc.h: global header for libvlc (old-style)
*****************************************************************************
* Copyright (C) 1998-2004 the VideoLAN team
* $Id$
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@netcourrier.com>
* Derk-Jan Hartman <hartman at videolan dot org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/**
* \defgroup libvlc_old Libvlc Old
* This is libvlc, the base library of the VLC program.
* This is the legacy API. Please consider using the new libvlc API
*
* @{
*/
#ifndef _VLC_COMMON_H
#define _VLC_COMMON_H 1
#ifndef __cplusplus
# include <stdbool.h>
#endif
/*****************************************************************************
* Shared library Export macros
*****************************************************************************/
#ifndef VLC_PUBLIC_API
# define VLC_PUBLIC_API extern
#endif
/*****************************************************************************
* Compiler specific
*****************************************************************************/
#ifndef VLC_DEPRECATED_API
# ifdef __LIBVLC__
/* Avoid unuseful warnings from libvlc with our deprecated APIs */
# define VLC_DEPRECATED_API VLC_PUBLIC_API
# else /* __LIBVLC__ */
# if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
# define VLC_DEPRECATED_API VLC_PUBLIC_API __attribute__((deprecated))
# else
# define VLC_DEPRECATED_API VLC_PUBLIC_API
# endif
# endif /* __LIBVLC__ */
#endif
/*****************************************************************************
* Types
*****************************************************************************/
#if (defined( WIN32 ) || defined( UNDER_CE )) && !defined( __MINGW32__ )
typedef signed __int64 vlc_int64_t;
# else
typedef signed long long vlc_int64_t;
#endif
#endif /* _VLC_COMMON_H */
This diff is collapsed.
This diff is collapsed.
/*****************************************************************************
* libvlc_events.h: libvlc_events external API structure
*****************************************************************************
* Copyright (C) 1998-2007 the VideoLAN team
* $Id $
*
* Authors: Filippo Carone <littlejohn@videolan.org>
* Pierre d'Herbemont <pdherbemont@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef _LIBVLC_EVENTS_H
#define _LIBVLC_EVENTS_H 1
# ifdef __cplusplus
extern "C" {
# endif
/*****************************************************************************
* Events handling
*****************************************************************************/
/** \defgroup libvlc_events Events
* \ingroup libvlc
* LibVLC Available Events
* @{
*/
typedef enum libvlc_event_type_t {
libvlc_MediaDescriptorMetaChanged,
libvlc_MediaDescriptorSubItemAdded,
libvlc_MediaDescriptorDurationChanged,
libvlc_MediaDescriptorPreparsedChanged,
libvlc_MediaDescriptorFreed,
libvlc_MediaDescriptorStateChanged,
libvlc_MediaInstancePlayed,
libvlc_MediaInstancePaused,
libvlc_MediaInstanceReachedEnd,
libvlc_MediaInstanceEncounteredError,
libvlc_MediaInstanceTimeChanged,
libvlc_MediaInstancePositionChanged,
libvlc_MediaInstanceSeekableChanged,
libvlc_MediaInstancePausableChanged,
libvlc_MediaListItemAdded,
libvlc_MediaListWillAddItem,
libvlc_MediaListItemDeleted,
libvlc_MediaListWillDeleteItem,
libvlc_MediaListViewItemAdded,
libvlc_MediaListViewWillAddItem,
libvlc_MediaListViewItemDeleted,
libvlc_MediaListViewWillDeleteItem,
libvlc_MediaListPlayerPlayed,
libvlc_MediaListPlayerNextItemSet,
libvlc_MediaListPlayerStopped,
libvlc_MediaDiscovererStarted,
libvlc_MediaDiscovererEnded
} libvlc_event_type_t;
/**
* An Event
* \param type the even type
* \param p_obj the sender object
* \param u Event dependent content
*/
typedef struct libvlc_event_t
{
libvlc_event_type_t type;
void * p_obj;
union event_type_specific
{
/* media descriptor */
struct
{
libvlc_meta_t meta_type;
} media_descriptor_meta_changed;
struct
{
libvlc_media_descriptor_t * new_child;
} media_descriptor_subitem_added;
struct
{
vlc_int64_t new_duration;
} media_descriptor_duration_changed;
struct
{
int new_status;
} media_descriptor_preparsed_changed;
struct
{
libvlc_media_descriptor_t * md;
} media_descriptor_freed;
struct
{
libvlc_state_t new_state;
} media_descriptor_state_changed;
/* media instance */
struct
{
float new_position;
} media_instance_position_changed;
struct
{
libvlc_time_t new_time;
} media_instance_time_changed;
struct
{
libvlc_time_t new_seekable;
} media_instance_seekable_changed;
struct
{
libvlc_time_t new_pausable;
} media_instance_pausable_changed;
/* media list */
struct
{
libvlc_media_descriptor_t * item;
int index;
} media_list_item_added;
struct
{
libvlc_media_descriptor_t * item;
int index;
} media_list_will_add_item;
struct
{
libvlc_media_descriptor_t * item;
int index;
} media_list_item_deleted;
struct
{
libvlc_media_descriptor_t * item;
int index;
} media_list_will_delete_item;
/* media list view */
struct
{
libvlc_media_descriptor_t * item;
int index;
} media_list_view_item_added;
struct
{
libvlc_media_descriptor_t * item;
int index;
} media_list_view_will_add_item;
struct
{
libvlc_media_descriptor_t * item;
int index;
} media_list_view_item_deleted;
struct
{
libvlc_media_descriptor_t * item;
int index;
} media_list_view_will_delete_item;
/* media discoverer */
struct
{
void * unused;
} media_media_discoverer_started;
struct
{
void * unused;
} media_media_discoverer_ended;
} u;
} libvlc_event_t;
/**
* Event manager that belongs to a libvlc object, and from whom events can
* be received.
*/
typedef struct libvlc_event_manager_t libvlc_event_manager_t;
/**
* Callback function notification
* \param p_event the event triggering the callback
*/
typedef void ( *libvlc_callback_t )( const libvlc_event_t *, void * );
/**@} */
# ifdef __cplusplus
}
# endif
#endif /* _LIBVLC_EVENTS_H */
This diff is collapsed.
...@@ -24,8 +24,6 @@ ...@@ -24,8 +24,6 @@
#ifndef _LIBVLC_STRUCTURES_H #ifndef _LIBVLC_STRUCTURES_H
#define _LIBVLC_STRUCTURES_H 1 #define _LIBVLC_STRUCTURES_H 1
#include <vlc/vlc.h>
# ifdef __cplusplus # ifdef __cplusplus
extern "C" { extern "C" {
# endif # endif
...@@ -52,20 +50,6 @@ typedef struct libvlc_exception_t ...@@ -52,20 +50,6 @@ typedef struct libvlc_exception_t
/**@} */ /**@} */
/*****************************************************************************
* Tag
*****************************************************************************/
/** defgroup libvlc_tag Tag
* \ingroup libvlc
* LibVLC Tag support in media descriptor
* @{
*/
typedef struct libvlc_tag_query_t libvlc_tag_query_t;
typedef char * libvlc_tag_t;
/**@} */
/***************************************************************************** /*****************************************************************************
* Time * Time
*****************************************************************************/ *****************************************************************************/
...@@ -161,20 +145,6 @@ typedef struct libvlc_media_list_view_t libvlc_media_list_view_t; ...@@ -161,20 +145,6 @@ typedef struct libvlc_media_list_view_t libvlc_media_list_view_t;
/**@} */ /**@} */
/*****************************************************************************
* Dynamic Media List
*****************************************************************************/
/** defgroup libvlc_media_list MediaList
* \ingroup libvlc
* LibVLC Dynamic Media list: Media list with content synchronized with
* an other playlist
* @{
*/
typedef struct libvlc_dynamic_media_list_t libvlc_dynamic_media_list_t;
/**@} */
/***************************************************************************** /*****************************************************************************
* Media List Player * Media List Player
*****************************************************************************/ *****************************************************************************/
...@@ -292,187 +262,6 @@ typedef struct libvlc_log_message_t ...@@ -292,187 +262,6 @@ typedef struct libvlc_log_message_t
/**@} */ /**@} */
/*****************************************************************************
* Callbacks handling
*****************************************************************************/
/** defgroup libvlc_callbacks Callbacks
* \ingroup libvlc
* LibVLC Event Callbacks
* @{
*/
/**
* Available events: (XXX: being reworked)
* - libvlc_MediaInstanceReachedEnd
*/
typedef enum libvlc_event_type_t {
libvlc_MediaDescriptorMetaChanged,
libvlc_MediaDescriptorSubItemAdded,
libvlc_MediaDescriptorDurationChanged,
libvlc_MediaDescriptorPreparsedChanged,
libvlc_MediaDescriptorFreed,
libvlc_MediaDescriptorStateChanged,
libvlc_MediaInstancePlayed,
libvlc_MediaInstancePaused,
libvlc_MediaInstanceReachedEnd,
libvlc_MediaInstanceEncounteredError,
libvlc_MediaInstanceTimeChanged,
libvlc_MediaInstancePositionChanged,
libvlc_MediaInstanceSeekableChanged,
libvlc_MediaInstancePausableChanged,
libvlc_MediaListItemAdded,
libvlc_MediaListWillAddItem,
libvlc_MediaListItemDeleted,
libvlc_MediaListWillDeleteItem,
libvlc_MediaListViewItemAdded,
libvlc_MediaListViewWillAddItem,
libvlc_MediaListViewItemDeleted,
libvlc_MediaListViewWillDeleteItem,
libvlc_MediaListPlayerPlayed,
libvlc_MediaListPlayerNextItemSet,
libvlc_MediaListPlayerStopped,
libvlc_MediaDiscovererStarted,
libvlc_MediaDiscovererEnded
} libvlc_event_type_t;
/**
* An Event
* \param type the even type
* \param p_obj the sender object
* \param u Event dependent content
*/
typedef struct libvlc_event_t
{
libvlc_event_type_t type;
void * p_obj;
union event_type_specific
{
/* media descriptor */
struct
{
libvlc_meta_t meta_type;
} media_descriptor_meta_changed;
struct
{
libvlc_media_descriptor_t * new_child;
} media_descriptor_subitem_added;
struct
{
vlc_int64_t new_duration;
} media_descriptor_duration_changed;
struct
{
int new_status;
} media_descriptor_preparsed_changed;
struct
{
libvlc_media_descriptor_t * md;
} media_descriptor_freed;
struct
{
libvlc_state_t new_state;
} media_descriptor_state_changed;
/* media instance */
struct
{
float new_position;
} media_instance_position_changed;
struct
{
libvlc_time_t new_time;
} media_instance_time_changed;
struct
{
libvlc_time_t new_seekable;
} media_instance_seekable_changed;
struct
{
libvlc_time_t new_pausable;
} media_instance_pausable_changed;
/* media list */
struct
{
libvlc_media_descriptor_t * item;
int index;
} media_list_item_added;
struct
{
libvlc_media_descriptor_t * item;
int index;
} media_list_will_add_item;
struct
{
libvlc_media_descriptor_t * item;
int index;
} media_list_item_deleted;
struct
{
libvlc_media_descriptor_t * item;
int index;
} media_list_will_delete_item;
/* media list view */
struct
{
libvlc_media_descriptor_t * item;
int index;
} media_list_view_item_added;
struct
{
libvlc_media_descriptor_t * item;
int index;
} media_list_view_will_add_item;
struct
{
libvlc_media_descriptor_t * item;
int index;
} media_list_view_item_deleted;
struct
{
libvlc_media_descriptor_t * item;
int index;
} media_list_view_will_delete_item;
/* media discoverer */
struct
{
void * unused;
} media_media_discoverer_started;
struct
{
void * unused;
} media_media_discoverer_ended;
} u;
} libvlc_event_t;
/**
* Event manager that belongs to a libvlc object, and from whom events can
* be received.
*/
typedef struct libvlc_event_manager_t libvlc_event_manager_t;
/**
* Callback function notification
* \param p_event the event triggering the callback
*/
typedef void ( *libvlc_callback_t )( const libvlc_event_t *, void * );
/**@} */
# ifdef __cplusplus # ifdef __cplusplus
} }
# endif # endif
......
/*****************************************************************************
* libvlc_vlm.h: libvlc_* new external API
*****************************************************************************
* Copyright (C) 1998-2005 the VideoLAN team
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef _LIBVLC_VLM_H
#define _LIBVLC_VLM_H 1
# ifdef __cplusplus
extern "C" {
# endif
/*****************************************************************************
* VLM
*****************************************************************************/
/** \defgroup libvlc_vlm VLM
* \ingroup libvlc
* LibVLC VLM
* @{
*/
/**
* Add a broadcast, with one input.
*
* \param p_instance the instance
* \param psz_name the name of the new broadcast
* \param psz_input the input MRL
* \param psz_output the output MRL (the parameter to the "sout" variable)
* \param i_options number of additional options
* \param ppsz_options additional options
* \param b_enabled boolean for enabling the new broadcast
* \param b_loop Should this broadcast be played in loop ?
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
int, char **, int, int, libvlc_exception_t * );
/**
* Delete a media (VOD or broadcast).
*
* \param p_instance the instance
* \param psz_name the media to delete
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
/**
* Enable or disable a media (VOD or broadcast).
*
* \param p_instance the instance
* \param psz_name the media to work on
* \param b_enabled the new status
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
libvlc_exception_t *);
/**
* Set the output for a media.
*
* \param p_instance the instance
* \param psz_name the media to work on
* \param psz_output the output MRL (the parameter to the "sout" variable)
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
libvlc_exception_t *);
/**
* Set a media's input MRL. This will delete all existing inputs and
* 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_e an initialized exception pointer
*/
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_e an initialized exception pointer
*/
VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
libvlc_exception_t *p_exception );
/**
* Set a media's loop status.
*
* \param p_instance the instance
* \param psz_name the media to work on
* \param b_loop the new status
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
libvlc_exception_t *);
/**
* Edit the parameters of a media. This will delete all existing inputs and
* add the specified one.
*
* \param p_instance the instance
* \param psz_name the name of the new broadcast
* \param psz_input the input MRL
* \param psz_output the output MRL (the parameter to the "sout" variable)
* \param i_options number of additional options
* \param ppsz_options additional options
* \param b_enabled boolean for enabling the new broadcast
* \param b_loop Should this broadcast be played in loop ?
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
int, char **, int, int, libvlc_exception_t * );
/**
* Play the named broadcast.
*
* \param p_instance the instance
* \param psz_name the name of the broadcast
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
/**
* Stop the named broadcast.
*
* \param p_instance the instance
* \param psz_name the name of the broadcast
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
/**
* Pause the named broadcast.
*
* \param p_instance the instance
* \param psz_name the name of the broadcast
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
/**
* Seek in the named broadcast.
*
* \param p_instance the instance
* \param psz_name the name of the broadcast
* \param f_percentage the percentage to seek to
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
float, libvlc_exception_t * );
/**
* Return information about the named broadcast.
*
* \param p_instance the instance
* \param psz_name the name of the broadcast
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
#define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\
returnType libvlc_vlm_get_media_## attr( libvlc_instance_t *, \
char *, int , libvlc_exception_t * );
VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1);
VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1);
VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1);
VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1);
VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0);
VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0);
VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0);
#undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
/** @} */
# ifdef __cplusplus
}
# endif
#endif /* <vlc/libvlc.h> */
This diff is collapsed.
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