#include <vlc_plugin.h>
#include <vlc_input.h>
#include <vlc_demux.h>
-#include <vlc_interface.h>
+#include <vlc_dialog.h>
#include <vlc_network.h>
#include <vlc_url.h>
set_description( N_("RTSP/RTP access and demux") )
add_shortcut( "rtsp" )
add_shortcut( "sdp" )
+ add_shortcut( "live" )
+ add_shortcut( "livedotcom" )
set_capability( "access_demux", 0 )
set_callbacks( Open, Close )
add_bool( "rtsp-tcp", 0, NULL,
N_("Use RTP over RTSP (TCP)"),
N_("Use RTP over RTSP (TCP)"), true )
+ change_safe()
add_integer( "rtp-client-port", -1, NULL,
N_("Client port"),
N_("Port to use for the RTP source of the session"), true )
true )
add_integer("rtsp-caching", 4 * DEFAULT_PTS_DELAY / 1000, NULL,
CACHING_TEXT, CACHING_LONGTEXT, true )
+ change_safe()
add_bool( "rtsp-kasenna", false, NULL, KASENNA_TEXT,
KASENNA_LONGTEXT, true )
add_string( "rtsp-user", NULL, NULL, USER_TEXT,
char *p_sdp = NULL;
int i_http_port = 0;
int i_ret = VLC_SUCCESS;
- int timeout;
if( p_sys->url.i_port == 0 ) p_sys->url.i_port = 554;
if( p_sys->url.psz_username || p_sys->url.psz_password )
authenticator.setUsernameAndPassword( (const char*)psz_user,
(const char*)psz_pwd );
- timeout = var_CreateGetInteger(p_demux, "ipv4-timeout");
- timeout /= 1000;
+ /* */
+ const int i_timeout = var_CreateGetInteger(p_demux, "ipv4-timeout") / 1000;
#if LIVEMEDIA_LIBRARY_VERSION_INT >= 1223337600
psz_options = p_sys->rtsp->sendOptionsCmd( psz_url, psz_user, psz_pwd,
- &authenticator, timeout );
+ &authenticator, i_timeout );
#else
psz_options = p_sys->rtsp->sendOptionsCmd( psz_url, psz_user, psz_pwd,
&authenticator );
// try again, with the realm set this time
#if LIVEMEDIA_LIBRARY_VERSION_INT >= 1223337600
psz_options = p_sys->rtsp->sendOptionsCmd( psz_url, psz_user, psz_pwd,
- &authenticator, timeout );
+ &authenticator, i_timeout );
#else
psz_options = p_sys->rtsp->sendOptionsCmd( psz_url, psz_user, psz_pwd,
&authenticator );
#endif
}
if( psz_options )
- {
p_sys->b_get_param = strstr( psz_options, "GET_PARAMETER" ) ? true : false ;
+ delete [] psz_options;
+
#if LIVEMEDIA_LIBRARY_VERSION_INT >= 1223337600
- p_sdp = p_sys->rtsp->describeWithPassword( psz_url, (const char*)psz_user, (const char*)psz_pwd,
- var_GetBool( p_demux, "rtsp-kasenna" ), timeout );
+ p_sdp = p_sys->rtsp->describeWithPassword( psz_url, (const char*)psz_user, (const char*)psz_pwd,
+ var_GetBool( p_demux, "rtsp-kasenna" ), i_timeout );
#else
- p_sdp = p_sys->rtsp->describeWithPassword( psz_url, (const char*)psz_user, (const char*)psz_pwd,
+ p_sdp = p_sys->rtsp->describeWithPassword( psz_url, (const char*)psz_user, (const char*)psz_pwd,
var_GetBool( p_demux, "rtsp-kasenna" ) );
#endif
- }
- delete [] psz_options;
-
if( p_sdp == NULL )
{
/* failure occurred */
if( i_code == 401 )
{
- int i_result;
msg_Dbg( p_demux, "authentication failed" );
free( psz_user );
free( psz_pwd );
- psz_user = psz_pwd = NULL;
-
- i_result = intf_UserLoginPassword( p_demux, _("RTSP authentication"),
- _("Please enter a valid login name and a password."),
- &psz_user, &psz_pwd );
- if( i_result == DIALOG_OK_YES )
+ dialog_Login( p_demux, &psz_user, &psz_pwd,
+ _("RTSP authentication"),
+ _("Please enter a valid login name and a password.") );
+ if( psz_user != NULL && psz_pwd != NULL )
{
msg_Dbg( p_demux, "retrying with user=%s, pwd=%s",
psz_user, psz_pwd );
/* Retrieve the duration if possible */
p_sys->i_npt_length = p_sys->ms->playEndTime();
+ /* */
msg_Dbg( p_demux, "setup start: %f stop:%f", p_sys->i_npt_start, p_sys->i_npt_length );
+
+ /* */
+ p_sys->b_no_data = true;
+ p_sys->i_no_data_ti = 0;
+
return i_return;
}
}
/* Retrieve the starttime if possible */
- p_sys->i_npt = p_sys->i_npt_start = p_sys->ms->playStartTime();
+ p_sys->i_npt_start = p_sys->ms->playStartTime();
/* Retrieve the duration if possible */
p_sys->i_npt_length = p_sys->ms->playEndTime();
p_sys->rtsp = NULL;
p_sys->track = NULL;
p_sys->i_track = 0;
+ p_sys->b_no_data = true;
+ p_sys->i_no_data_ti = 0;
/* Reopen rtsp client */
if( ( i_return = Connect( p_demux ) ) != VLC_SUCCESS )