Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

vlc.h

00001 /*****************************************************************************
00002  * vlc.h: global header for vlc
00003  *****************************************************************************
00004  * Copyright (C) 1998-2004 the VideoLAN team
00005  * $Id: vlc.h 12455 2005-09-03 09:16:11Z gbazin $
00006  *
00007  * Authors: Vincent Seguin <[email protected]>
00008  *          Samuel Hocevar <[email protected]>
00009  *          Gildas Bazin <[email protected]>
00010  *          Derk-Jan Hartman <hartman at videolan dot org>
00011  *
00012  * This program is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU General Public License as published by
00014  * the Free Software Foundation; either version 2 of the License, or
00015  * (at your option) any later version.
00016  *
00017  * This program is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  * GNU General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU General Public License
00023  * along with this program; if not, write to the Free Software
00024  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00025  *****************************************************************************/
00026 
00035 #ifndef _VLC_VLC_H
00036 #define _VLC_VLC_H 1
00037 
00038 # ifdef __cplusplus
00039 extern "C" {
00040 # endif
00041 
00042 /*****************************************************************************
00043  * Our custom types
00044  *****************************************************************************/
00045 typedef int vlc_bool_t;
00046 typedef struct vlc_list_t vlc_list_t;
00047 typedef struct vlc_object_t vlc_object_t;
00048 
00049 #if (defined( WIN32 ) || defined( UNDER_CE )) && !defined( __MINGW32__ )
00050 typedef signed __int64 vlc_int64_t;
00051 # else
00052 typedef signed long long vlc_int64_t;
00053 #endif
00054 
00060 #define VLC_VAR_VOID      0x0010
00061 #define VLC_VAR_BOOL      0x0020
00062 #define VLC_VAR_INTEGER   0x0030
00063 #define VLC_VAR_HOTKEY    0x0031
00064 #define VLC_VAR_STRING    0x0040
00065 #define VLC_VAR_MODULE    0x0041
00066 #define VLC_VAR_FILE      0x0042
00067 #define VLC_VAR_DIRECTORY 0x0043
00068 #define VLC_VAR_VARIABLE  0x0044
00069 #define VLC_VAR_FLOAT     0x0050
00070 #define VLC_VAR_TIME      0x0060
00071 #define VLC_VAR_ADDRESS   0x0070
00072 #define VLC_VAR_MUTEX     0x0080
00073 #define VLC_VAR_LIST      0x0090
00074 
00079 typedef union
00080 {
00081     int             i_int;
00082     vlc_bool_t      b_bool;
00083     float           f_float;
00084     char *          psz_string;
00085     void *          p_address;
00086     vlc_object_t *  p_object;
00087     vlc_list_t *    p_list;
00088     vlc_int64_t     i_time;
00089 
00090     struct { char *psz_name; int i_object_id; } var;
00091 
00092    /* Make sure the structure is at least 64bits */
00093     struct { char a, b, c, d, e, f, g, h; } padding;
00094 
00095 } vlc_value_t;
00096 
00100 struct vlc_list_t
00101 {
00102     int             i_count;
00103     vlc_value_t *   p_values;
00104     int *           pi_types;
00105 
00106 };
00107 
00108 /*****************************************************************************
00109  * Error values
00110  *****************************************************************************/
00111 #define VLC_SUCCESS         -0                                   /* No error */
00112 #define VLC_ENOMEM          -1                          /* Not enough memory */
00113 #define VLC_ETHREAD         -2                               /* Thread error */
00114 #define VLC_ETIMEOUT        -3                                    /* Timeout */
00115 
00116 #define VLC_ENOMOD         -10                           /* Module not found */
00117 
00118 #define VLC_ENOOBJ         -20                           /* Object not found */
00119 #define VLC_EBADOBJ        -21                            /* Bad object type */
00120 
00121 #define VLC_ENOVAR         -30                         /* Variable not found */
00122 #define VLC_EBADVAR        -31                         /* Bad variable value */
00123 
00124 #define VLC_EEXIT         -255                             /* Program exited */
00125 #define VLC_EGENERIC      -666                              /* Generic error */
00126 
00127 /*****************************************************************************
00128  * Booleans
00129  *****************************************************************************/
00130 #define VLC_FALSE 0
00131 #define VLC_TRUE  1
00132 
00133 /*****************************************************************************
00134  * Playlist
00135  *****************************************************************************/
00136 
00137 /* Used by VLC_AddTarget() */
00138 #define PLAYLIST_INSERT          0x0001
00139 #define PLAYLIST_REPLACE         0x0002
00140 #define PLAYLIST_APPEND          0x0004
00141 #define PLAYLIST_GO              0x0008
00142 #define PLAYLIST_CHECK_INSERT    0x0010
00143 
00144 #define PLAYLIST_END           -666
00145 
00146 /*****************************************************************************
00147  * Required internal headers
00148  *****************************************************************************/
00149 #if defined( __VLC__ )
00150 #   include "vlc_common.h"
00151 #endif
00152 
00153 /*****************************************************************************
00154  * Exported libvlc API
00155  *****************************************************************************/
00156 #if !defined( __VLC__ )
00157 /* Otherwise they are declared and exported in vlc_common.h */
00163 char const * VLC_Version ( void );
00164 
00170 char const * VLC_CompileTime ( void );
00171 
00177 char const * VLC_CompileBy ( void );
00178 
00184 char const * VLC_CompileHost ( void );
00185 
00191 char const * VLC_CompileDomain ( void );
00192 
00198 char const * VLC_Compiler ( void );
00199 
00205 char const * VLC_Changeset ( void );
00206 
00213 char const * VLC_Error ( int i_err );
00214 
00215 #endif /* __VLC__ */
00216 
00225 int     VLC_Create( void );
00226 
00241 int     VLC_Init( int, int, char *[] );
00242 
00257 int     VLC_AddIntf( int, char const *, vlc_bool_t, vlc_bool_t );
00258 
00268 int     VLC_Die( int );
00269 
00281 int     VLC_CleanUp( int );
00282 
00293 int     VLC_Destroy( int );
00294 
00307 int     VLC_VariableSet( int, char const *, vlc_value_t );
00308 
00322 int     VLC_VariableGet( int, char const *, vlc_value_t * );
00323 
00335 int     VLC_VariableType( int, char const *, int * );
00336 
00351 int     VLC_AddTarget( int, char const *, const char **, int, int, int );
00352 
00363 int     VLC_Play( int );
00364 
00374 int     VLC_Pause( int );
00375 
00387 int             VLC_Stop( int );
00388 
00398 vlc_bool_t      VLC_IsPlaying( int );
00399 
00410 float           VLC_PositionGet( int );
00411 
00423 float           VLC_PositionSet( int, float );
00424 
00434 int             VLC_TimeGet( int );
00435 
00449 int             VLC_TimeSet( int, int, vlc_bool_t );
00450 
00460 int             VLC_LengthGet( int );
00461 
00471 float           VLC_SpeedFaster( int );
00472 
00482 float           VLC_SpeedSlower( int );
00483 
00490 int             VLC_PlaylistIndex( int );
00491 
00498 int             VLC_PlaylistNumberOfItems( int );
00499 
00508 int             VLC_PlaylistNext( int );
00509 
00518 int             VLC_PlaylistPrev( int );
00519 
00530 int             VLC_PlaylistClear( int );
00531 
00539 int             VLC_VolumeSet( int, int );
00540 
00549 int             VLC_VolumeGet( int );
00550 
00557 int            VLC_VolumeMute( int );
00558 
00567 int             VLC_FullScreen( int );
00568 
00569 
00570 # ifdef __cplusplus
00571 }
00572 # endif
00573 
00574 #endif /* <vlc/vlc.h> */

Generated on Tue Dec 20 10:14:19 2005 for vlc-0.8.4a by  doxygen 1.4.2