summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ce127fd)
Otherwise, the seek command would unpause the stream and that's not
what vlc is expecting.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
bool b_get_param; /* Does the server support GET_PARAMETER */
bool b_paused; /* Are we paused? */
bool b_get_param; /* Does the server support GET_PARAMETER */
bool b_paused; /* Are we paused? */
+
+ float f_seek_request;/* In case we receive a seek request while paused*/
};
static int Demux ( demux_t * );
};
static int Demux ( demux_t * );
p_sys->b_force_mcast = var_CreateGetBool( p_demux, "rtsp-mcast" );
p_sys->b_get_param = false;
p_sys->b_paused = false;
p_sys->b_force_mcast = var_CreateGetBool( p_demux, "rtsp-mcast" );
p_sys->b_get_param = false;
p_sys->b_paused = false;
+ p_sys->f_seek_request = -1;
/* parse URL for rtsp://[user:[passwd]@]serverip:port/options */
vlc_UrlParse( &p_sys->url, p_sys->psz_path, 0 );
/* parse URL for rtsp://[user:[passwd]@]serverip:port/options */
vlc_UrlParse( &p_sys->url, p_sys->psz_path, 0 );
time = f * (double)p_sys->i_npt_length; /* in second */
}
time = f * (double)p_sys->i_npt_length; /* in second */
}
- if( !p_sys->b_paused && !p_sys->rtsp->pauseMediaSession( *p_sys->ms ))
+ if( p_sys->b_paused )
+ {
+ p_sys->f_seek_request = time;
+ return VLC_SUCCESS;
+ }
+
+ if( !p_sys->rtsp->pauseMediaSession( *p_sys->ms ) )
- msg_Err( p_demux, "PAUSE before seek failed failed %s",
+ msg_Err( p_demux, "PAUSE before seek failed %s",
p_sys->env->getResultMsg() );
return VLC_EGENERIC;
}
p_sys->env->getResultMsg() );
return VLC_EGENERIC;
}
return VLC_SUCCESS;
if( ( b_pause && !p_sys->rtsp->pauseMediaSession( *p_sys->ms ) ) ||
( !b_pause && !p_sys->rtsp->playMediaSession( *p_sys->ms,
return VLC_SUCCESS;
if( ( b_pause && !p_sys->rtsp->pauseMediaSession( *p_sys->ms ) ) ||
( !b_pause && !p_sys->rtsp->playMediaSession( *p_sys->ms,
+ p_sys->f_seek_request ) ) )
{
msg_Err( p_demux, "PLAY or PAUSE failed %s", p_sys->env->getResultMsg() );
return VLC_EGENERIC;
}
{
msg_Err( p_demux, "PLAY or PAUSE failed %s", p_sys->env->getResultMsg() );
return VLC_EGENERIC;
}
+ p_sys->f_seek_request = -1;
p_sys->b_paused = b_pause;
/* When we Pause, we'll need the TimeoutPrevention thread to
p_sys->b_paused = b_pause;
/* When we Pause, we'll need the TimeoutPrevention thread to