int i_es;
media_es_t **es;
char *psz_mux;
- int b_raw;
+ vlc_bool_t b_raw;
/* RTSP client */
int i_rtsp;
p_media->es = 0;
p_media->psz_mux = 0;
p_media->rtsp = 0;
+ p_media->b_raw = VLC_FALSE;
asprintf( &p_media->psz_rtsp_path, "%s%s", p_sys->psz_path, psz_name );
p_media->p_rtsp_url =
if( answer == NULL || query == NULL ) return VLC_SUCCESS;
- msg_Info( p_vod, "RtspCallback query: type=%d", query->i_type );
+ msg_Dbg( p_vod, "RtspCallback query: type=%d", query->i_type );
answer->i_proto = HTTPD_PROTO_RTSP;
answer->i_version = query->i_version;
answer->i_type = HTTPD_MSG_ANSWER;
+ answer->i_body = 0;
+ answer->p_body = NULL;
switch( query->i_type )
{
if( strstr( psz_transport, "MP2T/H2221/UDP" ) ||
strstr( psz_transport, "RAW/RAW/UDP" ) )
{
- p_media->b_raw = 1;
+ p_media->b_raw = VLC_TRUE;
}
+
if( httpd_ClientIP( cl, ip ) == NULL )
{
answer->i_status = 500;
}
msg_Dbg( p_vod, "HTTPD_MSG_SETUP: unicast ip=%s port=%d",
- ip, i_port );
+ ip, i_port );
psz_session = httpd_MsgGet( query, "Session" );
if( !psz_session || !*psz_session )
answer->i_body = 0;
answer->p_body = NULL;
- httpd_MsgAdd( answer, "Transport", "RTP/AVP/UDP;client_port=%d-%d",
- i_port, i_port + 1 );
+ if( p_media->b_raw )
+ {
+ if( strstr( psz_transport, "MP2T/H2221/UDP" ) )
+ {
+ httpd_MsgAdd( answer, "Transport", "MP2T/H2221/UDP;client_port=%d-%d",
+ i_port, i_port + 1 );
+ }
+ else if( strstr( psz_transport, "RAW/RAW/UDP" ) )
+ {
+ httpd_MsgAdd( answer, "Transport", "RAW/RAW/UDP;client_port=%d-%d",
+ i_port, i_port + 1 );
+ }
+ }
+ else
+ httpd_MsgAdd( answer, "Transport", "RTP/AVP/UDP;client_port=%d-%d",
+ i_port, i_port + 1 );
}
else /* TODO strstr( psz_transport, "interleaved" ) ) */
{
answer->i_body = 0;
answer->p_body = NULL;
}
+
if( !psz_playnow )
break;
}
int i, i_port_audio = 0, i_port_video = 0;
/* for now only multicast so easy */
- answer->i_status = 200;
- answer->psz_status = strdup( "OK" );
- answer->i_body = 0;
- answer->p_body = NULL;
+ if( !psz_playnow )
+ {
+ answer->i_status = 200;
+ answer->psz_status = strdup( "OK" );
+ answer->i_body = 0;
+ answer->p_body = NULL;
+ }
if( !psz_session )
psz_session = httpd_MsgGet( query, "Session" );
if( answer == NULL || query == NULL ) return VLC_SUCCESS;
- msg_Info( p_vod, "RtspCallback query: type=%d", query->i_type );
+ msg_Dbg( p_vod, "RtspCallback query: type=%d", query->i_type );
answer->i_proto = HTTPD_PROTO_RTSP;
answer->i_version = query->i_version;
answer->i_type = HTTPD_MSG_ANSWER;
+ answer->i_body = 0;
+ answer->p_body = NULL;
switch( query->i_type )
{
answer->i_body = 0;
answer->p_body = NULL;
- httpd_MsgAdd( answer, "Transport", "RTP/AVP/UDP;client_port=%d-%d",
- i_port, i_port + 1 );
+ if( p_media->b_raw )
+ {
+ if( strstr( psz_transport, "MP2T/H2221/UDP" ) )
+ {
+ httpd_MsgAdd( answer, "Transport", "MP2T/H2221/UDP;client_port=%d-%d",
+ i_port, i_port + 1 );
+ }
+ else if( strstr( psz_transport, "RAW/RAW/UDP" ) )
+ {
+ httpd_MsgAdd( answer, "Transport", "RAW/RAW/UDP;client_port=%d-%d",
+ i_port, i_port + 1 );
+ }
+ }
+ else
+ {
+ httpd_MsgAdd( answer, "Transport", "RTP/AVP/UDP;client_port=%d-%d",
+ i_port, i_port + 1 );
+ }
}
else /* TODO strstr( psz_transport, "interleaved" ) ) */
{
answer->i_body = 0;
answer->p_body = NULL;
}
+
if( !psz_playnow )
break;
}
}
- answer->i_status = 200;
- answer->psz_status = strdup( "OK" );
- answer->i_body = 0;
- answer->p_body = NULL;
+ if( !psz_playnow )
+ {
+ answer->i_status = 200;
+ answer->psz_status = strdup( "OK" );
+ answer->i_body = 0;
+ answer->p_body = NULL;
+ }
break;
case HTTPD_MSG_TEARDOWN: