]> git.sesse.net Git - vlc/blob - include/vlc_streaming.h
Implement basic panel change
[vlc] / include / vlc_streaming.h
1 /*****************************************************************************
2  * vlc_streaming.h: Methods and descriptions for Streaming profiles
3  *****************************************************************************
4  * Copyright (C) 2002-2005 the VideoLAN team
5  * $Id: stream_output.h 14151 2006-02-04 00:08:50Z zorglub $
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
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 _VLC_STREAMING_H_
25 #define _VLC_STREAMING_H_
26
27 #include <vlc/vlc.h>
28
29 #ifdef WIN32
30 #define VCODECS_NUMBER 13
31 #else
32 #define VCODECS_NUMBER 12
33 #endif
34
35 #define ACODECS_NUMBER 9
36
37 /// Keep this up to date !
38 #define MUXERS_NUMBER 10
39 enum
40 {
41     MUX_PS,
42     MUX_TS,
43     MUX_MPEG,
44     MUX_OGG,
45     MUX_RAW,
46     MUX_ASF,
47     MUX_AVI,
48     MUX_MP4,
49     MUX_MOV,
50     MUX_WAV,
51 };
52
53 enum
54 {
55     ACCESS_HTTP,
56     ACCESS_UDP,
57     ACCESS_MMS,
58     ACCESS_RTP,
59     ACCESS_FILE
60 };
61
62 struct codec_desc_t {
63     char *psz_display;
64     char *psz_codec;
65     char *psz_descr;
66     int muxers[MUXERS_NUMBER];
67 };
68 //extern const struct codec vcodecs_array[];
69 //extern const struct codec acodecs_array[];
70
71 struct method_desc_t {
72     char *psz_access;
73     char *psz_method;
74     char *psz_descr;
75     char *psz_address;
76     int   muxers[MUXERS_NUMBER];
77 };
78 //xtern const struct method methods_array[];
79
80 struct mux_desc_t {
81     int   id;
82     char *psz_mux;
83     char *psz_encap;
84     char *psz_descr;
85 };
86 //extern const struct mux_desc_t muxers_array[];
87
88
89 /* Standard bitrates arrays */
90 //static const char * vbitrates_array[] =
91 //{ "3072", "2048", "1024", "768", "512", "384", "256", "192", "128", "96",
92 //  "64" };
93
94 //static const char *abitrates_array[] =
95 //{ "512", "256", "192", "128", "96", "64", "32", "16" } ;
96
97 struct sout_transcode_t
98 {
99     int i_vb, i_ab, i_channels;
100     float f_scale;
101     vlc_bool_t b_soverlay;
102     char *psz_vcodec, *psz_acodec, *psz_scodec, *psz_venc, *psz_aenc;
103     char *psz_additional;
104 };
105
106 struct sout_std_t 
107 {
108     char *psz_mux, *psz_access;
109     char *psz_url, *psz_name, *psz_group;
110 };
111
112 struct sout_display_t 
113 {
114 };
115
116 struct sout_duplicate_t
117 {
118     int i_children, i_conditions;
119     sout_chain_t **pp_children;
120     char **ppsz_conditions;
121 };
122
123 typedef union
124 {
125     sout_transcode_t *p_transcode;
126     sout_std_t       *p_std;
127     sout_duplicate_t *p_duplicate;
128     sout_display_t   *p_display;
129 } sout_module_type_t;
130
131
132 struct sout_module_t
133 {
134     int i_type;
135     sout_module_type_t typed;
136     sout_module_t *p_parent;
137 };
138
139 enum
140 {
141     SOUT_MOD_TRANSCODE,
142     SOUT_MOD_STD,
143     SOUT_MOD_RTP,
144     SOUT_MOD_DUPLICATE,
145     SOUT_MOD_DISPLAY
146 };
147
148 struct sout_chain_t
149 {
150     int i_modules;
151     sout_module_t **pp_modules;
152
153     int i_options;
154     char **ppsz_options;
155 };
156
157 struct sout_gui_descr_t 
158 {
159     /* Access */
160     vlc_bool_t b_local, b_file, b_http, b_mms, b_rtp, b_udp, b_dump;
161     char *psz_file, *psz_http, *psz_mms, *psz_rtp, *psz_udp;
162     int i_http, i_mms, i_rtp, i_udp;
163
164     /* Mux */
165     char *psz_mux;
166
167     /* Transcode */
168     vlc_bool_t b_soverlay;
169     char *psz_vcodec, *psz_acodec, *psz_scodec;
170     int i_vb, i_ab, i_channels;
171     float f_scale;
172
173     /* Misc */
174     vlc_bool_t b_sap, b_all_es;
175     char *psz_group, *psz_name;
176     int i_ttl;
177 };
178
179 struct streaming_profile_t 
180 {
181     i18n_string_t *p_title;
182     i18n_string_t *p_description;
183     sout_chain_t *p_chain;
184 };
185
186 static inline sout_chain_t *streaming_ChainNew()
187 {
188     DECMALLOC_NULL( p_chain, sout_chain_t );
189     memset( p_chain, 0, sizeof( sout_chain_t ) );
190     p_chain->i_options = 0;
191     return p_chain;
192 }
193
194
195 struct profile_parser_t
196 {
197     char *psz_profile;
198     streaming_profile_t *p_profile;
199 };
200
201
202
203 //VLC_XEXPORT( char *, streaming_ChainToPsz, (sout_chain_t * ) );
204
205 #endif