Commit 8914d39a authored by Filippo Carone's avatar Filippo Carone

New input_set_(time|position) in libvlc.

parent d77533f0
......@@ -273,7 +273,9 @@ void libvlc_input_free( libvlc_input_t * );
/// \bug This might go away ... to be replaced by a broader system
vlc_int64_t libvlc_input_get_length ( libvlc_input_t *, libvlc_exception_t *);
vlc_int64_t libvlc_input_get_time ( libvlc_input_t *, libvlc_exception_t *);
void libvlc_input_set_time ( libvlc_input_t *, vlc_int64_t, libvlc_exception_t *);
float libvlc_input_get_position ( libvlc_input_t *, libvlc_exception_t *);
void libvlc_input_set_position ( libvlc_input_t *, float, libvlc_exception_t *);
vlc_bool_t libvlc_input_will_play ( libvlc_input_t *, libvlc_exception_t *);
vlc_bool_t libvlc_input_has_vout ( libvlc_input_t *, libvlc_exception_t *);
float libvlc_input_get_fps ( libvlc_input_t *, libvlc_exception_t *);
......
......@@ -100,6 +100,45 @@ vlc_int64_t libvlc_input_get_time( libvlc_input_t *p_input,
return val.i_time / 1000;
}
void libvlc_input_set_time( libvlc_input_t *p_input, vlc_int64_t time, libvlc_exception_t *p_exception )
{
input_thread_t *p_input_thread;
vlc_value_t value;
p_input_thread = libvlc_get_input_thread ( p_input, p_exception);
if ( libvlc_exception_raised( p_exception ) )
return;
value.i_time = time;
var_Set( p_input_thread, "time", value );
vlc_object_release( p_input_thread );
return;
}
void libvlc_input_set_position( libvlc_input_t *p_input, float position, libvlc_exception_t *p_exception )
{
input_thread_t *p_input_thread;
vlc_value_t val;
val.f_float = position;
p_input_thread = libvlc_get_input_thread ( p_input, p_exception);
if ( libvlc_exception_raised( p_exception ) )
return;
var_Set( p_input_thread, "position", val );
vlc_object_release( p_input_thread );
return;
}
float libvlc_input_get_position( libvlc_input_t *p_input,
libvlc_exception_t *p_exception )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment