00001 /***************************************************************************** 00002 * vlm_internal.h: Internal vlm structures 00003 ***************************************************************************** 00004 * Copyright (C) 1998-2006 VLC authors and VideoLAN 00005 * $Id: 286912d083e69ccdf8ec1ba378fabca716d05988 $ 00006 * 00007 * Authors: Laurent Aimar <fenrir@via.ecp.fr> 00008 * 00009 * This program is free software; you can redistribute it and/or modify it 00010 * under the terms of the GNU Lesser General Public License as published by 00011 * the Free Software Foundation; either version 2.1 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU Lesser General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU Lesser General Public License 00020 * along with this program; if not, write to the Free Software Foundation, 00021 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 00022 *****************************************************************************/ 00023 00024 #ifndef LIBVLC_VLM_INTERNAL_H 00025 #define LIBVLC_VLM_INTERNAL_H 1 00026 00027 #include <vlc_vlm.h> 00028 #include "input_interface.h" 00029 00030 /* Private */ 00031 typedef struct 00032 { 00033 /* instance name */ 00034 char *psz_name; 00035 00036 /* "playlist" index */ 00037 int i_index; 00038 00039 bool b_sout_keep; 00040 00041 vlc_object_t *p_parent; 00042 input_item_t *p_item; 00043 input_thread_t *p_input; 00044 input_resource_t *p_input_resource; 00045 00046 } vlm_media_instance_sys_t; 00047 00048 00049 typedef struct 00050 { 00051 vlm_media_t cfg; 00052 00053 struct 00054 { 00055 input_item_t *p_item; 00056 vod_media_t *p_media; 00057 } vod; 00058 00059 /* actual input instances */ 00060 int i_instance; 00061 vlm_media_instance_sys_t **instance; 00062 } vlm_media_sys_t; 00063 00064 typedef struct 00065 { 00066 /* names "schedule" is reserved */ 00067 char *psz_name; 00068 bool b_enabled; 00069 /* list of commands to execute on date */ 00070 int i_command; 00071 char **command; 00072 00073 /* the date of 1st execution */ 00074 mtime_t i_date; 00075 00076 /* if != 0 repeat schedule every (period) */ 00077 mtime_t i_period; 00078 /* number of times you have to repeat 00079 i_repeat < 0 : endless repeat */ 00080 int i_repeat; 00081 } vlm_schedule_sys_t; 00082 00083 00084 struct vlm_t 00085 { 00086 VLC_COMMON_MEMBERS 00087 00088 vlc_mutex_t lock; 00089 vlc_thread_t thread; 00090 vlc_mutex_t lock_manage; 00091 vlc_cond_t wait_manage; 00092 unsigned users; 00093 00094 /* tell vlm thread there is work to do */ 00095 bool input_state_changed; 00096 /* */ 00097 int64_t i_id; 00098 00099 /* Vod server (used by media) */ 00100 vod_t *p_vod; 00101 00102 /* Media list */ 00103 int i_media; 00104 vlm_media_sys_t **media; 00105 00106 /* Schedule list */ 00107 int i_schedule; 00108 vlm_schedule_sys_t **schedule; 00109 }; 00110 00111 int64_t vlm_Date(void); 00112 int vlm_ControlInternal( vlm_t *p_vlm, int i_query, ... ); 00113 int ExecuteCommand( vlm_t *, const char *, vlm_message_t ** ); 00114 void vlm_ScheduleDelete( vlm_t *vlm, vlm_schedule_sys_t *sched ); 00115 00116 #endif
1.7.1