}
DBUS_METHOD( PositionGet )
-{ /* returns position as an int in the range [0;1000] */
+{ /* returns position in milliseconds */
REPLY_INIT;
OUT_ARGUMENTS;
vlc_value_t position;
i_pos = 0;
else
{
- var_Get( p_input, "position", &position );
- i_pos = position.f_float * 1000 ;
+ var_Get( p_input, "time", &position );
+ i_pos = position.i_time / 1000;
}
pl_Release( ((vlc_object_t*) p_this) );
ADD_INT32( &i_pos );
}
DBUS_METHOD( PositionSet )
-{ /* set position from an int in the range [0;1000] */
+{ /* set position in milliseconds */
REPLY_INIT;
vlc_value_t position;
if( p_input )
{
- position.f_float = ((float)i_pos) / 1000;
- var_Set( p_input, "position", position );
+ position.i_time = i_pos * 1000;
+ var_Set( p_input, "time", position );
}
pl_Release( ((vlc_object_t*) p_this) );
REPLY_SEND;
static void Run ( intf_thread_t *p_intf )
{
- while( !p_intf->b_die )
+ while( !intf_ShouldDie( p_intf ) )
{
msleep( INTF_IDLE_SLEEP );
dbus_connection_read_write_dispatch( p_intf->p_sys->p_conn, 0 );