Commit 87a2d700 authored by Jean-Paul Saman's avatar Jean-Paul Saman

stream_filter core: add procotol information to stream_t

In addition to p_access->psz_location also add p_access->psz_access to the contructed
stream_t *. It will allow a stream_filter to determine the protocol used in case it was
constructed with an access input.
parent bda0ca39
...@@ -57,6 +57,7 @@ struct stream_t ...@@ -57,6 +57,7 @@ struct stream_t
/* Module properties for stream filter */ /* Module properties for stream filter */
module_t *p_module; module_t *p_module;
char *psz_access;
/* Real or virtual path (it can only be changed during stream_t opening) */ /* Real or virtual path (it can only be changed during stream_t opening) */
char *psz_path; char *psz_path;
......
...@@ -237,6 +237,7 @@ void stream_CommonDelete( stream_t *s ) ...@@ -237,6 +237,7 @@ void stream_CommonDelete( stream_t *s )
vlc_iconv_close( s->p_text->conv ); vlc_iconv_close( s->p_text->conv );
free( s->p_text ); free( s->p_text );
} }
free( s->psz_access );
free( s->psz_path ); free( s->psz_path );
vlc_object_release( s ); vlc_object_release( s );
} }
...@@ -294,9 +295,10 @@ stream_t *stream_AccessNew( access_t *p_access, char **ppsz_list ) ...@@ -294,9 +295,10 @@ stream_t *stream_AccessNew( access_t *p_access, char **ppsz_list )
return NULL; return NULL;
s->p_input = p_access->p_input; s->p_input = p_access->p_input;
s->psz_access = strdup( p_access->psz_access );
s->psz_path = strdup( p_access->psz_location ); s->psz_path = strdup( p_access->psz_location );
s->p_sys = p_sys = malloc( sizeof( *p_sys ) ); s->p_sys = p_sys = malloc( sizeof( *p_sys ) );
if( !s->psz_path || !s->p_sys ) if( !s->psz_access || !s->psz_path || !s->p_sys )
{ {
stream_CommonDelete( s ); stream_CommonDelete( s );
return NULL; return NULL;
......
...@@ -49,6 +49,7 @@ stream_t *stream_FilterNew( stream_t *p_source, ...@@ -49,6 +49,7 @@ stream_t *stream_FilterNew( stream_t *p_source,
s->p_input = p_source->p_input; s->p_input = p_source->p_input;
/* */ /* */
s->psz_access = strdup( p_source->psz_access );
s->psz_path = strdup( p_source->psz_path ); s->psz_path = strdup( p_source->psz_path );
if( !s->psz_path ) if( !s->psz_path )
{ {
...@@ -129,4 +130,3 @@ static void StreamDelete( stream_t *s ) ...@@ -129,4 +130,3 @@ static void StreamDelete( stream_t *s )
stream_CommonDelete( s ); stream_CommonDelete( s );
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment