]> git.sesse.net Git - vlc/blob - src/input/vlm_internal.h
Implemented sout-keep per media support.
[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
30 enum
31 {
32         VOD_TYPE = 0,
33         BROADCAST_TYPE,
34         SCHEDULE_TYPE,
35 };
36
37 typedef struct
38 {
39     /* instance name */
40     char *psz_name;
41
42     /* "playlist" index */
43     int i_index;
44
45     vlc_bool_t      b_sout_keep;
46
47     input_item_t    item;
48     input_thread_t  *p_input;
49     sout_instance_t *p_sout;
50
51 } vlm_media_instance_t;
52
53 struct vlm_media_t
54 {
55     vlc_bool_t b_enabled;
56     int      i_type;
57
58     /* name "media" is reserved */
59     char    *psz_name;
60     input_item_t item;
61
62     /* "playlist" */
63     int     i_input;
64     char    **input;
65
66     int     i_option;
67     char    **option;
68
69     char    *psz_output;
70
71     /* only for broadcast */
72     vlc_bool_t b_loop;
73
74     /* only for vod */
75     vod_media_t *vod_media;
76     char *psz_vod_output;
77     char *psz_mux;
78
79     /* actual input instances */
80     int                  i_instance;
81     vlm_media_instance_t **instance;
82 };
83
84 struct vlm_schedule_t
85 {
86     /* names "schedule" is reserved */
87     char    *psz_name;
88     vlc_bool_t b_enabled;
89     /* list of commands to execute on date */
90     int i_command;
91     char **command;
92
93     /* the date of 1st execution */
94     mtime_t i_date;
95
96     /* if != 0 repeat schedule every (period) */
97     mtime_t i_period;
98     /* number of times you have to repeat
99        i_repeat < 0 : endless repeat     */
100     int i_repeat;
101 };
102
103
104 struct vlm_t
105 {
106     VLC_COMMON_MEMBERS
107
108     vlc_mutex_t lock;
109
110     int            i_media;
111     vlm_media_t    **media;
112
113     int            i_vod;
114     vod_t          *vod;
115
116     int            i_schedule;
117     vlm_schedule_t **schedule;
118 };
119
120 #endif