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

vlc_vlm.h

00001 /*****************************************************************************
00002  * vlc_vlm.h: VLM interface plugin
00003  *****************************************************************************
00004  * Copyright (C) 2000, 2001 the VideoLAN team
00005  * $Id: vlc_vlm.h 11664 2005-07-09 06:17:09Z courmisch $
00006  *
00007  * Authors: Simon Latapie <[email protected]>
00008  *          Laurent Aimar <[email protected]>
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00023  *****************************************************************************/
00024 
00025 #ifndef _VLC_VLM_H
00026 #define _VLC_VLM_H 1
00027 
00028 /* VLM specific - structures and functions */
00029 enum
00030 {
00031     VOD_TYPE = 0,
00032     BROADCAST_TYPE,
00033     SCHEDULE_TYPE,
00034 };
00035 
00036 typedef struct
00037 {
00038     /* instance name */
00039     char *psz_name;
00040 
00041     /* "playlist" index */
00042     int i_index;
00043 
00044     input_item_t   item;
00045     input_thread_t *p_input;
00046 
00047 } vlm_media_instance_t;
00048 
00049 struct vlm_media_t
00050 {
00051     vlc_bool_t b_enabled;
00052     int      i_type;
00053 
00054     /* name "media" is reserved */
00055     char    *psz_name;
00056     input_item_t item;
00057 
00058     /* "playlist" */
00059     int     i_input;
00060     char    **input;
00061 
00062     int     i_option;
00063     char    **option;
00064 
00065     char    *psz_output;
00066 
00067     /* only for broadcast */
00068     vlc_bool_t b_loop;
00069 
00070     /* only for vod */
00071     vod_media_t *vod_media;
00072     char *psz_vod_output;
00073     char *psz_mux;
00074 
00075     /* actual input instances */
00076     int                  i_instance;
00077     vlm_media_instance_t **instance;
00078 
00079 };
00080 
00081 
00082 struct vlm_schedule_t
00083 {
00084     /* names "schedule" is reserved */
00085     char    *psz_name;
00086     vlc_bool_t b_enabled;
00087     /* list of commands to execute on date */
00088     int i_command;
00089     char **command;
00090 
00091     /* the date of 1st execution */
00092     mtime_t i_date;
00093 
00094     /* if != 0 repeat schedule every (period) */
00095     mtime_t i_period;
00096     /* number of times you have to repeat
00097        i_repeat < 0 : endless repeat     */
00098     int i_repeat;
00099 
00100 };
00101 
00102 /* ok, here is the structure of a vlm_message:
00103    The parent node is ( name_of_the_command , NULL ), or
00104    ( name_of_the_command , message_error ) on error.
00105    If a node has children, it should not have a value (=NULL).*/
00106 struct vlm_message_t
00107 {
00108     char *psz_name;
00109     char *psz_value;
00110 
00111     int           i_child;
00112     vlm_message_t **child;
00113 };
00114 
00115 
00116 struct vlm_t
00117 {
00118     VLC_COMMON_MEMBERS
00119 
00120     vlc_mutex_t lock;
00121 
00122     int            i_media;
00123     vlm_media_t    **media;
00124 
00125     int            i_vod;
00126     vod_t          *vod;
00127 
00128     int            i_schedule;
00129     vlm_schedule_t **schedule;
00130 };
00131 
00132 
00133 #define vlm_New( a ) __vlm_New( VLC_OBJECT(a) )
00134 VLC_EXPORT( vlm_t *, __vlm_New, ( vlc_object_t * ) );
00135 VLC_EXPORT( void, vlm_Delete, ( vlm_t * ) );
00136 VLC_EXPORT( int, vlm_ExecuteCommand, ( vlm_t *, char *, vlm_message_t ** ) );
00137 VLC_EXPORT( void, vlm_MessageDelete, ( vlm_message_t * ) );
00138 VLC_EXPORT( vlm_media_t *, vlm_MediaNew, ( vlm_t *, char *, int ) );
00139 VLC_EXPORT( void, vlm_MediaDelete, ( vlm_t *, vlm_media_t *, char * ) );
00140 VLC_EXPORT( int, vlm_MediaSetup, ( vlm_t *, vlm_media_t *, char *, char * ) );
00141 VLC_EXPORT( int, vlm_MediaControl, ( vlm_t *, vlm_media_t *, char *, char *, char * ) );
00142 VLC_EXPORT( vlm_schedule_t *, vlm_ScheduleNew, ( vlm_t *, char * ) );
00143 VLC_EXPORT( void, vlm_ScheduleDelete, ( vlm_t *, vlm_schedule_t *, char * ) );
00144 VLC_EXPORT( int, vlm_ScheduleSetup, ( vlm_schedule_t *, char *, char * ) );
00145 VLC_EXPORT( int, vlm_MediaVodControl, ( void *, vod_media_t *, char *, int, va_list ) );
00146 VLC_EXPORT( int, vlm_Save, ( vlm_t *, char * ) );
00147 VLC_EXPORT( int, vlm_Load, ( vlm_t *, char * ) );
00148 
00149 #endif

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