o= - should be local username (no spaces allowed)
o= time should be hashed with some other value to garantee uniqueness
o= don't use the localhost address. use fully qualified domain name or IP4 address
- a= source-filter: we need our source address
+ a= source-filter: we need our source address
a= x-plgroup: (missing)
RTP packets need to get the correct src IP address */
if( ipv == '4'
char url[NI_MAXHOST + 8];
/* first try to create the access out */
- if( p_sys->i_ttl )
+ if( p_sys->i_ttl > 0 )
{
snprintf( access, sizeof( access ), "udp{raw,rtcp,ttl=%d}",
p_sys->i_ttl );
}
}
+int rtp_add_sink( sout_stream_id_t *id, sout_access_out_t *access )
+{
+ vlc_mutex_lock( &id->lock_rtsp );
+ TAB_APPEND( id->i_rtsp_access, id->rtsp_access, access );
+ vlc_mutex_unlock( &id->lock_rtsp );
+}
+
+void rtp_del_sink( sout_stream_id_t *id, sout_access_out_t *access )
+{
+ vlc_mutex_lock( &id->lock_rtsp );
+ TAB_REMOVE( id->i_rtsp_access, id->rtsp_access, access );
+ vlc_mutex_unlock( &id->lock_rtsp );
+}
+
static int rtp_packetize_mpa( sout_stream_t *p_stream, sout_stream_id_t *id,
block_t *in )
{
char *SDPGenerate( const sout_stream_t *p_stream,
const char *psz_destination, vlc_bool_t b_rtsp );
+int rtp_add_sink( sout_stream_id_t *id, sout_access_out_t *access );
+void rtp_del_sink( sout_stream_id_t *id, sout_access_out_t *access );
+
typedef int (*pf_rtp_packetizer_t)( sout_stream_t *, sout_stream_id_t *,
block_t * );
}
if( i >= p_sys->i_es ) continue;
- vlc_mutex_lock( &id->lock_rtsp );
- TAB_APPEND( id->i_rtsp_access, id->rtsp_access, rtsp->access[i_id] );
- vlc_mutex_unlock( &id->lock_rtsp );
+ rtp_add_sink( id, rtsp->access[i_id] );
}
vlc_mutex_unlock( &p_sys->lock_es );
}
}
if( i >= p_sys->i_es ) continue;
- vlc_mutex_lock( &id->lock_rtsp );
- TAB_REMOVE( id->i_rtsp_access, id->rtsp_access, rtsp->access[i_id] );
- vlc_mutex_unlock( &id->lock_rtsp );
+ rtp_del_sink( id, rtsp->access[i_id] );
}
vlc_mutex_unlock( &p_sys->lock_es );
/** Non-aggregate RTSP callback */
/*static*/ int RtspCallbackId( httpd_callback_sys_t *p_args,
- httpd_client_t *cl,
- httpd_message_t *answer, httpd_message_t *query )
+ httpd_client_t *cl,
+ httpd_message_t *answer, httpd_message_t *query )
{
sout_stream_id_t *id = (sout_stream_id_t*)p_args;
- sout_stream_t *p_stream = id->p_stream;
+ sout_stream_t *p_stream = idd->p_stream;
sout_stream_sys_t *p_sys = p_stream->p_sys;
char psz_session_init[21];
const char *psz_session;
if( b_multicast )
{
- if( id->psz_destination == NULL )
+ if( p_sys->psz_destination == NULL )
continue;
answer->i_status = 200;
httpd_MsgAdd( answer, "Transport",
"RTP/AVP/UDP;destination=%s;port=%d-%d;"
"ttl=%d;mode=play",
- id->psz_destination, id->i_port, id->i_port+1,
+ p_sys->psz_destination, idd->i_port, idd->i_port+1,
( p_sys->i_ttl > 0 ) ? p_sys->i_ttl : 1 );
}
else
continue;
}
- if( p_sys->i_ttl )
+ if( p_sys->i_ttl > 0 )
snprintf( psz_access, sizeof( psz_access ),
"udp{raw,rtcp,ttl=%d}", p_sys->i_ttl );
else