Commit 619c56ec authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Detect if kasenna VoD or unicast stream is MPEG4 or not. Set Kasenna flag...

* Detect if kasenna VoD or unicast stream is MPEG4 or not. Set Kasenna flag for live if it is not MPEG-4
parent 8118dd07
...@@ -238,7 +238,7 @@ static int Open ( vlc_object_t *p_this ) ...@@ -238,7 +238,7 @@ static int Open ( vlc_object_t *p_this )
sprintf( psz_url, "rtsp://%s", p_demux->psz_path ); sprintf( psz_url, "rtsp://%s", p_demux->psz_path );
/* Add kasenna option */ /* Add kasenna option */
var_CreateGetBool( p_demux, "rtsp-kasenna" ); if( var_CreateGetBool( p_demux, "rtsp-kasenna" )) msg_Dbg(p_demux, "add kasenna option");
psz_options = p_sys->rtsp->sendOptionsCmd( psz_url ); psz_options = p_sys->rtsp->sendOptionsCmd( psz_url );
if( psz_options ) if( psz_options )
delete [] psz_options; delete [] psz_options;
......
...@@ -92,6 +92,7 @@ struct demux_sys_t ...@@ -92,6 +92,7 @@ struct demux_sys_t
mtime_t i_duration; /* sgiDuration= */ mtime_t i_duration; /* sgiDuration= */
int i_port; /* sgiRtspPort= */ int i_port; /* sgiRtspPort= */
int i_sid; /* sgiSid= */ int i_sid; /* sgiSid= */
vlc_bool_t b_rtsp_kasenna; /* kasenna style RTSP */
}; };
static int Demux ( demux_t *p_demux ); static int Demux ( demux_t *p_demux );
...@@ -136,6 +137,7 @@ static int Activate( vlc_object_t * p_this ) ...@@ -136,6 +137,7 @@ static int Activate( vlc_object_t * p_this )
p_sys->i_packet_size = 0; p_sys->i_packet_size = 0;
p_sys->i_duration = 0; p_sys->i_duration = 0;
p_sys->i_port = 0; p_sys->i_port = 0;
p_sys->b_rtsp_kasenna = VLC_FALSE;
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -228,6 +230,12 @@ static int ParseLine ( demux_t *p_demux, char *psz_line ) ...@@ -228,6 +230,12 @@ static int ParseLine ( demux_t *p_demux, char *psz_line )
psz_bol += sizeof("sgiShowingName=") - 1; psz_bol += sizeof("sgiShowingName=") - 1;
p_sys->psz_name = strdup( psz_bol ); p_sys->psz_name = strdup( psz_bol );
} }
else if( !strncasecmp( psz_bol, "sgiFormatName=", sizeof("sgiFormatName=") - 1 ) )
{
psz_bol += sizeof("sgiFormatName=") - 1;
if( !strcasestr( psz_bol, "MPEG-4") )
p_sys->b_rtsp_kasenna = VLC_TRUE;
}
else if( !strncasecmp( psz_bol, "sgiMulticastAddress=", sizeof("sgiMulticastAddress=") - 1 ) ) else if( !strncasecmp( psz_bol, "sgiMulticastAddress=", sizeof("sgiMulticastAddress=") - 1 ) )
{ {
psz_bol += sizeof("sgiMulticastAddress=") - 1; psz_bol += sizeof("sgiMulticastAddress=") - 1;
...@@ -334,6 +342,13 @@ static int Demux ( demux_t *p_demux ) ...@@ -334,6 +342,13 @@ static int Demux ( demux_t *p_demux )
playlist_ItemAddOption( p_item, psz_option ); playlist_ItemAddOption( p_item, psz_option );
free( psz_option ); free( psz_option );
} }
if( p_sys->b_rtsp_kasenna )
{
char *psz_option;
asprintf( &psz_option, "rtsp-kasenna" );
playlist_ItemAddOption( p_item, psz_option );
free( psz_option );
}
playlist_ItemSetDuration( p_item, p_sys->i_duration ); playlist_ItemSetDuration( p_item, p_sys->i_duration );
playlist_AddItem( p_playlist, p_item, PLAYLIST_INSERT, i_position ); playlist_AddItem( p_playlist, p_item, PLAYLIST_INSERT, i_position );
......
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