- case INPUT_GET_SUBDELAY:
- pi = (int*)va_arg( args, int *);
- /* We work on the first subtitle */
- if( p_input->p_sys != NULL )
+ case INPUT_ADD_OPTION:
+ {
+ const char *psz_option = va_arg( args, const char * );
+ const char *psz_value = va_arg( args, const char * );
+ char *str;
+ int i;
+
+ if( asprintf( &str, "%s=%s", psz_option, psz_value ) == -1 )
+ return VLC_ENOMEM;
+
+ i = input_ItemAddOpt( p_input->p->input.p_item, str,
+ VLC_INPUT_OPTION_UNIQUE );
+ free( str );
+ return i;
+ }
+
+ case INPUT_GET_BYTE_POSITION:
+ pi_64 = (int64_t*)va_arg( args, int64_t * );
+ *pi_64 = !p_input->p->input.p_stream ? 0 :
+ stream_Tell( p_input->p->input.p_stream );
+ return VLC_SUCCESS;
+
+ case INPUT_SET_BYTE_SIZE:
+ pi_64 = (int64_t*)va_arg( args, int64_t * );
+ *pi_64 = !p_input->p->input.p_stream ? 0 :
+ stream_Size( p_input->p->input.p_stream );
+ return VLC_SUCCESS;
+
+ case INPUT_GET_VIDEO_FPS:
+ {
+ int i;
+ pf = (double*)va_arg( args, double * );
+ vlc_mutex_lock( &p_input->p->input.p_item->lock );
+ *pf = p_input->p->input.f_fps;
+ for( i = 0; i < p_input->p->i_slave && *pf <= 0.001; i++ )
+ *pf = p_input->p->slave[i]->f_fps;
+ vlc_mutex_unlock( &p_input->p->input.p_item->lock );
+ return VLC_SUCCESS;
+ }
+
+ case INPUT_ADD_SLAVE:
+ psz = (char*)va_arg( args, char * );
+ if( psz && *psz )