Changeset a2dd91771917aa86d9e94aa2d6777f8805332e63
- Timestamp:
- 10/17/07 20:36:22 (11 months ago)
- git-parent:
- Files:
-
- include/vlc_streaming.h (modified) (4 diffs)
- src/stream_output/profiles.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
include/vlc_streaming.h
rfbf4c80 ra2dd917 122 122 struct sout_transcode_t 123 123 { 124 int i_vb, i_ab, i_channels; 124 int32_t i_vb; 125 int32_t i_ab; 126 int32_t i_channels; 125 127 float f_scale; 126 128 vlc_bool_t b_soverlay; 127 129 char *psz_vcodec; 128 char *psz_acodec, *psz_scodec, *psz_venc, *psz_aenc; 130 char *psz_acodec; 131 char *psz_scodec; 132 char *psz_venc; 133 char *psz_aenc; 129 134 char *psz_additional; 130 135 131 int i_params; sout_param_t **pp_params; 136 int32_t i_params; 137 sout_param_t **pp_params; 132 138 }; 133 139 void streaming_TranscodeParametersApply( sout_transcode_t *p_module ); … … 137 143 struct sout_std_t 138 144 { 139 char *psz_mux, *psz_access; 140 char *psz_url, *psz_name, *psz_group; 141 int i_params; sout_param_t **pp_params; 145 char *psz_mux; 146 char *psz_access; 147 char *psz_url; 148 char *psz_name; 149 char *psz_group; 150 int i_params; 151 sout_param_t **pp_params; 142 152 }; 143 153 void streaming_StdParametersApply( sout_std_t *p_module ); … … 151 161 struct sout_duplicate_t 152 162 { 153 int i_children, i_conditions; 163 int i_children; 164 int i_conditions; 154 165 sout_chain_t **pp_children; 155 166 char **ppsz_conditions; … … 202 213 }; 203 214 215 /** struct for holding account information needed to access the services */ 216 struct streaming_account_t 217 { 218 char *psz_username; /*< username of account */ 219 char *psz_password; /*< password of account */ 220 }; 221 204 222 /**************** GUI interaction *****************/ 223 /** struct to hold user interface information */ 205 224 struct sout_gui_descr_t 206 225 { 207 /* Access */ 208 vlc_bool_t b_local, b_file, b_http, b_mms, b_rtp, b_udp, b_dump; 209 char *psz_file, *psz_http, *psz_mms, *psz_rtp, *psz_udp; 210 int i_http, i_mms, i_rtp, i_udp; 226 /* Access types */ 227 vlc_bool_t b_local; /*< local access module */ 228 vlc_bool_t b_file; /*< file access module */ 229 vlc_bool_t b_http; /*< http access module */ 230 vlc_bool_t b_mms; /*< mms access module */ 231 vlc_bool_t b_rtp; /*< rtp access module */ 232 vlc_bool_t b_udp; /*< udp access module */ 233 vlc_bool_t b_dump; /*< dump access module */ 234 vlc_bool_t b_icecast; /*< icecast access module */ 235 236 char *psz_file; /*< filename */ 237 char *psz_http; /*< HTTP servername or ipaddress */ 238 char *psz_mms; /*< MMS servername or ipaddress */ 239 char *psz_rtp; /*< RTP servername or ipaddress */ 240 char *psz_udp; /*< UDP servername or ipaddress */ 241 char *psz_icecast; /*< Icecast servername or ipaddress*/ 242 243 int32_t i_http; /*< http port number */ 244 int32_t i_mms; /*< mms port number */ 245 int32_t i_rtp; /*< rtp port number */ 246 int32_t i_udp; /*< udp port number */ 247 int32_t i_icecast; /*< icecast port number */ 211 248 212 249 /* Mux */ 213 char *psz_mux; 250 char *psz_mux; /*< name of muxer to use in streaming */ 214 251 215 252 /* Transcode */ 216 vlc_bool_t b_soverlay; 217 char *psz_vcodec, *psz_acodec, *psz_scodec; 218 int i_vb, i_ab, i_channels; 219 float f_scale; 253 vlc_bool_t b_soverlay; /*< enable burning overlay in the video */ 254 char *psz_vcodec; /*< video codec to use in transcoding */ 255 char *psz_acodec; /*< audio codec to use in transcoding */ 256 char *psz_scodec; /*< subtitle codec to use in transcoding */ 257 int32_t i_vb; /*< video bitrate to use in transcoding */ 258 int32_t i_ab; /*< audio bitrate to use in transcoding */ 259 int32_t i_channels; /*< number of audio channels to use in transcoding */ 260 float f_scale; /*< scaling factor to use in transcoding */ 220 261 221 262 /* Misc */ 222 vlc_bool_t b_sap, b_all_es; 223 char *psz_group, *psz_name; 224 int i_ttl; 263 vlc_bool_t b_sap; /*< send SAP announcement */ 264 vlc_bool_t b_all_es;/*< send all elementary streams from source stream */ 265 char *psz_group; /*< SAP Group name */ 266 char *psz_name; /*< SAP name */ 267 int32_t i_ttl; /*< Time To Live (TTL) for network traversal */ 268 269 /* Icecast */ 270 char *psz_mountpoint;/*< path to Icecast mountpoint */ 271 struct streaming_account_t sa_icecast; /*< Icecast account information */ 225 272 }; 226 273 src/stream_output/profiles.c
r0e39834 ra2dd917 265 265 pd->b_file = VLC_TRUE; pd->psz_file = strdup( STDM->psz_url ); \ 266 266 } \ 267 else if( !strcmp( STDM->psz_access, "http" ) )\267 else if( !strcmp( STDM->psz_access, "http" ) )\ 268 268 { \ 269 269 pd->b_http = VLC_TRUE; pd->psz_http = strdup( STDM->psz_url ); \ 270 270 } \ 271 else if( !strcmp( STDM->psz_access, "mms" ) )\271 else if( !strcmp( STDM->psz_access, "mms" ) )\ 272 272 { \ 273 273 pd->b_mms = VLC_TRUE; pd->psz_mms = strdup( STDM->psz_url ); \ 274 274 } \ 275 else if( !strcmp( STDM->psz_access, "udp" ) )\275 else if( !strcmp( STDM->psz_access, "udp" ) )\ 276 276 { \ 277 277 pd->b_udp = VLC_TRUE; pd->psz_udp = strdup( STDM->psz_url ); \ … … 379 379 sout_duplicate_t *p_dup = NULL; 380 380 (void)p_obj; 381 381 382 /* Clean up the chain */ 382 383 streaming_ChainClean( p_chain ); … … 393 394 /* #std{} */ 394 395 if( pd->b_local + pd->b_file + pd->b_http + pd->b_mms + pd->b_rtp + 395 pd->b_udp > 1 )396 pd->b_udp + pd->b_icecast > 1 ) 396 397 { 397 398 p_dup = streaming_ChainAddDup( p_chain ); … … 425 426 pd->psz_mux, pd->psz_udp ); 426 427 } 427 if( pd->i_ttl ) ADD_OPT( "ttl=%i", pd->i_ttl ); 428 if( pd->i_ttl ) 429 ADD_OPT( "ttl=%i", pd->i_ttl ); 428 430 if( pd->b_sap ) 429 431 { … … 432 434 p_std->psz_group = pd->psz_group ? strdup( pd->psz_group ) : NULL; 433 435 } 436 } 437 if( pd->b_icecast ) 438 { 439 sout_std_t *p_std; 440 char *psz_username; 441 442 if( p_dup ) streaming_DupAddChild( p_dup ); 443 444 if( !strcmp( pd->sa_icecast.psz_username, "" ) ) 445 { 446 asprintf( &psz_username, "%s", "" ); 447 } 448 else 449 { 450 asprintf( &psz_username, "%s:%s@", pd->sa_icecast.psz_username, 451 pd->sa_icecast.psz_password ); 452 } 453 if( pd->i_icecast > 0 ) 454 { 455 char *psz_url; 456 asprintf( &psz_url, "%s%s:%i%s", psz_username, pd->psz_icecast, 457 pd->i_icecast, pd->psz_mountpoint ); 458 p_std = streaming_ChainAddStd( DUP_OR_CHAIN, "shout", 459 pd->psz_mux, psz_url ); 460 free( psz_url ); 461 } 462 else 463 { 464 char *psz_url; 465 asprintf( &psz_url, "%s:%s@%s%s", pd->sa_icecast.psz_username, 466 pd->sa_icecast.psz_password, pd->psz_icecast, 467 pd->psz_mountpoint ); 468 p_std = streaming_ChainAddStd( DUP_OR_CHAIN, "shout", 469 pd->psz_mux, psz_url ); 470 free( psz_url ); 471 } 472 free( psz_username ); 434 473 } 435 474 HANDLE_GUI_URL( http, "http" ) … … 491 530 492 531 case SOUT_MOD_DISPLAY: 493 CHAIN_APPEND( "display" ) 532 CHAIN_APPEND( "display" ); 494 533 break; 495 534 case SOUT_MOD_STD: 496 CHAIN_APPEND( "std{access=%s, url=%s,mux=%s}", STDM->psz_access,535 CHAIN_APPEND( "std{access=%s,dst=%s,mux=%s}", STDM->psz_access, 497 536 STDM->psz_url, STDM->psz_mux ); 537 break; 498 538 } 499 539 if( i != p_chain->i_modules - 1 ) CHAIN_APPEND( ":" );
