*/
typedef enum {
PLAYLIST_PLAY, /**< No arg. res=can fail*/
+ PLAYLIST_AUTOPLAY, /**< No arg. res=cant fail*/
PLAYLIST_VIEWPLAY, /**< arg1= int, arg2= playlist_item_t*,*/
/** arg3 = playlist_item_t* , res=can fail */
PLAYLIST_ITEMPLAY, /** <arg1 = playlist_item_t * , res=can fail */
if( p_playlist )
{
p_playlist->status.i_view = -1;
- playlist_Play( p_playlist );
+ playlist_Control( p_playlist, PLAYLIST_AUTOPLAY );
vlc_object_release( p_playlist );
}
}
{
sdp_t *p_sdp;
vlc_bool_t b_invalid = VLC_FALSE;
+ vlc_bool_t b_end = VLC_FALSE;
if( psz_sdp == NULL )
{
if( psz_sdp[0] != 'v' || psz_sdp[1] != '=' )
{
- msg_Warn( p_obj, "bad SDP packet" );
+ msg_Warn( p_obj, "bad SDP packet, begins with 0x%x(%c) 0x%x(%c)",
+ psz_sdp[0],psz_sdp[0],psz_sdp[1],psz_sdp[1]);
return NULL;
}
p_sdp->i_attributes = 0;
p_sdp->pp_attributes = NULL;
- while( *psz_sdp != '\0' )
+ while( *psz_sdp != '\0' && b_end == VLC_FALSE )
{
char *psz_eol;
char *psz_eof;
if( ( psz_eol = strchr( psz_sdp, '\n' ) ) == NULL )
{
psz_eol = psz_sdp + strlen( psz_sdp );
+ b_end = VLC_TRUE;
}
if( psz_eol > psz_sdp && *( psz_eol - 1 ) == '\r' )
{
p_playlist->request.i_goto = -1;
break;
+ case PLAYLIST_AUTOPLAY:
+ p_playlist->status.i_status = PLAYLIST_RUNNING;
+
+ p_playlist->request.b_request = VLC_FALSE;
+ break;
+
case PLAYLIST_PAUSE:
val.i_int = 0;
if( p_playlist->p_input )
}
vlc_mutex_unlock( &p_playlist->object_lock );
+ fprintf(stderr,"control done, request is %i\n", p_playlist->request.b_request);
return VLC_SUCCESS;
}
{
p_playlist->i_index++;
p_new = p_playlist->pp_items[p_playlist->i_index];
+ if( !(p_new->i_flags & PLAYLIST_SKIP_FLAG) )
+ {
+ return NULL;
+ }
}
else
{