mtime_t i_duration; /* sgiDuration= */
int i_port; /* sgiRtspPort= */
int i_sid; /* sgiSid= */
+ vlc_bool_t b_concert; /* DeliveryService=cds */
vlc_bool_t b_rtsp_kasenna; /* kasenna style RTSP */
};
p_sys->i_packet_size = 0;
p_sys->i_duration = 0;
p_sys->i_port = 0;
+ p_sys->i_sid = 0;
p_sys->b_rtsp_kasenna = VLC_FALSE;
+ p_sys->b_concert = VLC_FALSE;
return VLC_SUCCESS;
}
{
psz_bol += sizeof("sgiRtspPort=") - 1;
p_sys->i_port = (int) strtol( psz_bol, NULL, 0 );
- }else
+ }
+ else if( !strncasecmp( psz_bol, "sgiSid=", sizeof("sgiSid=") - 1 ) )
+ {
+ psz_bol += sizeof("sgiSid=") - 1;
+ p_sys->i_sid = (int) strtol( psz_bol, NULL, 0 );
+ }
+ else if( !strncasecmp( psz_bol, "DeliveryService=cds", sizeof("DeliveryService=cds") - 1 ) )
+ {
+ p_sys->b_concert = VLC_TRUE;
+ }
+ else
{
/* This line isn't really important */
return 0;
if( p_sys->psz_mcast_ip )
{
+ /* Definetly schedules multicast session */
+ /* We don't care if it's live or not */
char *temp;
- temp = (char *)malloc( sizeof("udp://@000.000.000.000:123456789" ) );
- sprintf( temp, "udp://@" "%s:%i", p_sys->psz_mcast_ip, p_sys->i_mcast_port );
+ asprintf( &temp, "udp://@" "%s:%i", p_sys->psz_mcast_ip, p_sys->i_mcast_port );
if( p_sys->psz_uri ) free( p_sys->psz_uri );
p_sys->psz_uri = strdup( temp );
free( temp );
}
- else if( p_sys->psz_uri == NULL )
+
+ if( p_sys->psz_uri == NULL )
{
if( p_sys->psz_server && p_sys->psz_location )
{
char *temp;
- temp = (char *)malloc( sizeof("rtsp://" ":" "123456789") +
- strlen( p_sys->psz_server ) + strlen( p_sys->psz_location ) );
- sprintf( temp, "rtsp://" "%s:%i%s",
+ asprintf( &temp, "rtsp://" "%s:%i%s",
p_sys->psz_server, p_sys->i_port > 0 ? p_sys->i_port : 554, p_sys->psz_location );
p_sys->psz_uri = strdup( temp );
}
}
+ if( p_sys->b_concert )
+ {
+ /* It's definetly a simulcasted scheduled stream */
+ /* We don't care if it's live or not */
+ char *temp;
+
+ if( p_sys->psz_uri == NULL )
+ {
+ msg_Err( p_demux, "no URI was found" );
+ return -1;
+ }
+
+ asprintf( &temp, "%s%%3FMeDiAbAsEshowingId=%d%%26MeDiAbAsEconcert%%3FMeDiAbAsE",
+ p_sys->psz_uri, p_sys->i_sid );
+
+ free( p_sys->psz_uri );
+ p_sys->psz_uri = strdup( temp );
+ free( temp );
+ }
+
p_item = playlist_ItemNew( p_playlist, p_sys->psz_uri,
p_sys->psz_name ? p_sys->psz_name : p_sys->psz_uri );
if( !p_sys->psz_mcast_ip )
{
char *psz_option;
- asprintf( &psz_option, "rtsp-caching=10000" );
+ asprintf( &psz_option, "rtsp-caching=5000" );
playlist_ItemAddOption( p_item, psz_option );
free( psz_option );
}