[vlc-devel] commit: std-output, add aliases for access (Ilkka Ollakka )
git version control
git at videolan.org
Wed Aug 26 17:26:46 CEST 2009
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Wed Aug 26 18:23:35 2009 +0300| [74bd916a43f61a413acc24f94230f12dbf0c190b] | committer: Ilkka Ollakka
std-output, add aliases for access
Alias file/http/udp output, eg now you can do
--sout="#file{mux=ts,dst=mylittlepony.ts}"
hopefully helps people to figure-out sout-stuff.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=74bd916a43f61a413acc24f94230f12dbf0c190b
---
modules/stream_out/standard.c | 29 ++++++++++++++++++++++++++---
1 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/modules/stream_out/standard.c b/modules/stream_out/standard.c
index 203c82b..34e86bd 100644
--- a/modules/stream_out/standard.c
+++ b/modules/stream_out/standard.c
@@ -102,6 +102,9 @@ vlc_module_begin ()
set_capability( "sout stream", 50 )
add_shortcut( "standard" )
add_shortcut( "std" )
+ add_shortcut( "file" )
+ add_shortcut( "http" )
+ add_shortcut( "udp" )
set_category( CAT_SOUT )
set_subcategory( SUBCAT_SOUT_STREAM )
@@ -167,7 +170,7 @@ static int Open( vlc_object_t *p_this )
sout_stream_sys_t *p_sys;
char *psz_mux;
- char *psz_access;
+ char *psz_access=NULL;
char *psz_url=NULL;
char *psz_bind;
char *psz_path;
@@ -182,9 +185,29 @@ static int Open( vlc_object_t *p_this )
config_ChainParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options,
p_stream->p_cfg );
+ if( !strcmp( p_stream->psz_name, "http" ) )
+ {
+ psz_access = strdup("http");
+ }
+ else if (!strcmp (p_stream->psz_name, "udp"))
+ {
+ psz_access = strdup("udp");
+ }
+ else if (!strcmp (p_stream->psz_name, "file"))
+ {
+ psz_access = strdup("file");
+ }
+
var_Get( p_stream, SOUT_CFG_PREFIX "access", &val );
- psz_access = *val.psz_string ? val.psz_string : NULL;
- if( !*val.psz_string ) free( val.psz_string );
+ if( *val.psz_string )
+ {
+ free( psz_access );
+ psz_access = val.psz_string;
+ }
+ else
+ {
+ free( val.psz_string );
+ }
var_Get( p_stream, SOUT_CFG_PREFIX "mux", &val );
psz_mux = *val.psz_string ? val.psz_string : NULL;
More information about the vlc-devel
mailing list