i_result = VLC_EGENERIC;
}
}
- else if( !strcmp( psz_control, "rewind" ) )
- {
- if( psz_argument )
- {
- const double d_scale = us_atof( psz_argument );
- double d_position;
-
- vlm_ControlInternal( p_vlm, VLM_GET_MEDIA_INSTANCE_POSITION, p_media->cfg.id, psz_instance, &d_position );
- d_position -= (d_scale / 1000.0);
- if( d_position < 0.0 )
- d_position = 0.0;
- i_result = vlm_ControlInternal( p_vlm, VLM_SET_MEDIA_INSTANCE_POSITION, p_media->cfg.id, psz_instance, d_position );
- }
- else
- {
- i_result = VLC_EGENERIC;
- }
- }
- else if( !strcmp( psz_control, "forward" ) )
- {
- if( psz_argument )
- {
- const double d_scale = us_atof( psz_argument );
- double d_position;
-
- vlm_ControlInternal( p_vlm, VLM_GET_MEDIA_INSTANCE_POSITION, p_media->cfg.id, psz_instance, &d_position );
- d_position += (d_scale / 1000.0);
- if( d_position > 1.0 )
- d_position = 1.0;
- i_result = vlm_ControlInternal( p_vlm, VLM_SET_MEDIA_INSTANCE_POSITION, p_media->cfg.id, psz_instance, d_position );
-
- }
- else
- {
- i_result = VLC_EGENERIC;
- }
- }
else if( !strcmp( psz_control, "stop" ) )
{
i_result = vlm_ControlInternal( p_vlm, VLM_STOP_MEDIA_INSTANCE, p_media->cfg.id, psz_instance );
if( i_next_date > i_time )
{
time_t i_date = (time_t) (i_next_date / 1000000) ;
+ struct tm tm;
+ char psz_date[32];
-#if !defined( UNDER_CE )
-#ifdef HAVE_CTIME_R
- char psz_date[500];
- ctime_r( &i_date, psz_date );
-#else
- char *psz_date = ctime( &i_date );
-#endif
-
+ strftime( psz_date, sizeof(psz_date), "%F %H:%M:%S (%a)",
+ localtime_r( &i_date, &tm ) );
vlm_MessageAdd( msg_schedule,
vlm_MessageNew( "next launch", "%s", psz_date ) );
-#endif
}
}