]> git.sesse.net Git - vlc/blob - src/input/vlm_internal.h
b9a2c93a7c136a8dc8c7eeec9d390af62a2a78f0
[vlc] / src / input / vlm_internal.h
1 /*****************************************************************************
2  * vlm_internal.h: Internal vlm structures
3  *****************************************************************************
4  * Copyright (C) 1998-2006 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #ifndef _VLM_INTERNAL_H
25 #define _VLM_INTERNAL_H 1
26
27 #include <vlc_vlm.h>
28
29 /* Private */
30 typedef struct
31 {
32     /* instance name */
33     char *psz_name;
34
35     /* "playlist" index */
36     int i_index;
37
38     vlc_bool_t      b_sout_keep;
39
40     input_item_t    item;
41     input_thread_t  *p_input;
42     sout_instance_t *p_sout;
43
44 } vlm_media_instance_sys_t;
45
46
47 typedef struct
48 {
49     vlm_media_t cfg;
50
51     struct
52     {
53         input_item_t item;
54         vod_media_t *p_media;
55     } vod;
56
57     /* actual input instances */
58     int                      i_instance;
59     vlm_media_instance_sys_t **instance;
60 } vlm_media_sys_t;
61
62 typedef struct 
63 {
64     /* names "schedule" is reserved */
65     char    *psz_name;
66     vlc_bool_t b_enabled;
67     /* list of commands to execute on date */
68     int i_command;
69     char **command;
70
71     /* the date of 1st execution */
72     mtime_t i_date;
73
74     /* if != 0 repeat schedule every (period) */
75     mtime_t i_period;
76     /* number of times you have to repeat
77        i_repeat < 0 : endless repeat     */
78     int i_repeat;
79 } vlm_schedule_sys_t;
80
81
82 struct vlm_t
83 {
84     VLC_COMMON_MEMBERS
85
86     vlc_mutex_t lock;
87
88     /* */
89     int64_t        i_id;
90
91     /* Vod server (used by media) */
92     int            i_vod;
93     vod_t          *p_vod;
94
95     /* Media list */
96     int                i_media;
97     vlm_media_sys_t    **media;
98
99     /* Schedule list */
100     int            i_schedule;
101     vlm_schedule_sys_t **schedule;
102 };
103
104 #endif