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 $
7 * Authors: Clément Stenac <zorglub@videolan.org>
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.
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.
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 *****************************************************************************/
24 #ifndef _VLC_STREAMING_H_
25 #define _VLC_STREAMING_H_
29 /***********************************************************************
30 * Predefined lists of streaming data
31 ***********************************************************************/
34 #define VCODECS_NUMBER 13
36 #define VCODECS_NUMBER 12
39 #define ACODECS_NUMBER 9
41 /// Keep this up to date !
42 #define MUXERS_NUMBER 10
45 MUX_PS, MUX_TS, MUX_MPEG, MUX_OGG, MUX_RAW,
46 MUX_ASF, MUX_AVI, MUX_MP4, MUX_MOV, MUX_WAV,
49 enum { ACCESS_HTTP, ACCESS_UDP, ACCESS_MMS, ACCESS_RTP, ACCESS_FILE };
55 int muxers[MUXERS_NUMBER];
57 //extern const struct codec vcodecs_array[];
58 //extern const struct codec acodecs_array[];
60 struct method_desc_t {
65 int muxers[MUXERS_NUMBER];
67 //xtern const struct method methods_array[];
75 //extern const struct mux_desc_t muxers_array[];
78 /* Standard bitrates arrays */
79 //static const char * vbitrates_array[] =
80 //{ "3072", "2048", "1024", "768", "512", "384", "256", "192", "128", "96",
83 //static const char *abitrates_array[] =
84 //{ "512", "256", "192", "128", "96", "64", "32", "16" } ;
88 /***********************************************************************
90 ***********************************************************************/
92 /****************** Parameters handling *********************/
106 sout_param_t **pp_params;
109 void streaming_ParameterApply( sout_param_t *p_param, char **ppsz_dest,
110 int *pi_dest, float *pf_dest, vlc_bool_t *pb_dest );
113 /******** Module types definitions and parametrable elements ***************/
116 enum { I_VB, I_AB, I_CHANNELS, F_SCALE, B_SOVERLAY, PSZ_VC, PSZ_AC, PSZ_SC,
118 struct sout_transcode_t
120 int i_vb, i_ab, i_channels;
122 vlc_bool_t b_soverlay;
123 char *psz_vcodec, *psz_acodec, *psz_scodec, *psz_venc, *psz_aenc;
124 char *psz_additional;
126 int i_params; sout_param_t **pp_params;
128 void streaming_TranscodeParametersApply( sout_transcode_t *p_module );
131 enum { PSZ_MUX, PSZ_ACCESS, PSZ_URL, PSZ_NAME, PSZ_GROUP };
134 char *psz_mux, *psz_access;
135 char *psz_url, *psz_name, *psz_group;
136 int i_params; sout_param_t **pp_params;
138 void streaming_StdParametersApply( sout_std_t *p_module );
141 struct sout_display_t
146 struct sout_duplicate_t
148 int i_children, i_conditions;
149 sout_chain_t **pp_children;
150 char **ppsz_conditions;
153 /******* Generic profile structures and manipulation functions ********/
156 sout_transcode_t *p_transcode;
158 sout_duplicate_t *p_duplicate;
159 sout_display_t *p_display;
160 } sout_module_type_t;
165 sout_module_type_t typed;
166 sout_module_t *p_parent;
169 enum { SOUT_MOD_TRANSCODE, SOUT_MOD_STD, SOUT_MOD_RTP, SOUT_MOD_DUPLICATE,
175 sout_module_t **pp_modules;
181 sout_pcat_t **pp_pcats;
184 static inline sout_chain_t *streaming_ChainNew(void)
186 DECMALLOC_NULL( p_chain, sout_chain_t );
187 memset( p_chain, 0, sizeof( sout_chain_t ) );
188 p_chain->i_options = 0;
192 struct streaming_profile_t
195 char *psz_description;
196 sout_chain_t *p_chain;
199 /**************** GUI interaction *****************/
200 struct sout_gui_descr_t
203 vlc_bool_t b_local, b_file, b_http, b_mms, b_rtp, b_udp, b_dump;
204 char *psz_file, *psz_http, *psz_mms, *psz_rtp, *psz_udp;
205 int i_http, i_mms, i_rtp, i_udp;
211 vlc_bool_t b_soverlay;
212 char *psz_vcodec, *psz_acodec, *psz_scodec;
213 int i_vb, i_ab, i_channels;
217 vlc_bool_t b_sap, b_all_es;
218 char *psz_group, *psz_name;
222 /***************** Profile parsing ***********************/
224 struct profile_parser_t
227 streaming_profile_t *p_profile;