]> git.sesse.net Git - vlc/commitdiff
* all: rework of the input.
authorLaurent Aimar <fenrir@videolan.org>
Tue, 22 Jun 2004 19:34:01 +0000 (19:34 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Tue, 22 Jun 2004 19:34:01 +0000 (19:34 +0000)
modules/control/gestures.c
modules/control/hotkeys.c
modules/control/http.c
modules/control/joystick.c
modules/control/netsync.c
modules/control/rc.c

index bbe1029b6abec66c41ef8e1cf1dd060e294704f0..0fd5c1fdc7112ea096b09deeaa0e878be705638b 100644 (file)
@@ -2,7 +2,7 @@
  * gestures.c: control vlc with mouse gestures
  *****************************************************************************
  * Copyright (C) 2004 VideoLAN
- * $Id: gestures.c,v 1.7 2004/01/25 16:17:03 anil Exp $
+ * $Id$
  *
  * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
  *
@@ -32,9 +32,6 @@
 #include <vlc/intf.h>
 #include <vlc/vout.h>
 
-#include "stream_control.h"
-#include "input_ext-intf.h"
-
 /*****************************************************************************
  * intf_sys_t: description and status of interface
  *****************************************************************************/
index 5c73be7dc1c9a0f344a0d857de026711fd33c0df..afe09963c72bc78c6d956cd3b738584ee503c190 100755 (executable)
@@ -361,7 +361,11 @@ static void Run( intf_thread_t *p_intf )
         }
         else if( p_input )
         {
-            vlc_bool_t b_seekable = p_input->stream.b_seekable;
+            /* FIXME --fenrir
+             * How to get a valid value ?
+             * That's not that easy with some special stream
+             */
+            vlc_bool_t b_seekable = VLC_TRUE;
 
             if( i_action == ACTIONID_PAUSE )
             {
index b5bcb1fddb9eb3ea1ac520b5c1f452c00b815924..b4eb2d952c9efd38c05ab64586b671b0d7e54f56 100644 (file)
@@ -873,10 +873,10 @@ static mvar_t *mvar_InfoSetNew( char *name, input_thread_t *p_input )
         return s;
     }
 
-    vlc_mutex_lock( &p_input->p_item->lock );
-    for ( i = 0; i < p_input->p_item->i_categories; i++ )
+    vlc_mutex_lock( &p_input->input.p_item->lock );
+    for ( i = 0; i < p_input->input.p_item->i_categories; i++ )
     {
-        info_category_t *p_category = p_input->p_item->pp_categories[i];
+        info_category_t *p_category = p_input->input.p_item->pp_categories[i];
         mvar_t *cat  = mvar_New( name, "set" );
         mvar_t *iset = mvar_New( "info", "set" );
 
@@ -896,7 +896,7 @@ static mvar_t *mvar_InfoSetNew( char *name, input_thread_t *p_input )
         }
         mvar_AppendVar( s, cat );
     }
-    vlc_mutex_unlock( &p_input->p_item->lock );
+    vlc_mutex_unlock( &p_input->input.p_item->lock );
 
     return s;
 }
index 8f0b6db671cbee73eb2b4462b6d8aeceda81dae8..5212d8b2ac74b18d0c15f0354e7d248864cc569a 100644 (file)
@@ -43,8 +43,6 @@
 #include <linux/joystick.h>
 
 #include "audio_output.h"
-#include "stream_control.h"
-#include "input_ext-intf.h"
 
 /* Default values for parameters */
 #define DEFAULT_MAX_SEEK        10 /* seconds */
index 14bdda562d7d19a9a26013530cc9551fbc1d46c9..c5bc63acf0755faea39a2c3f2c1dfd81e111eb6b 100644 (file)
@@ -60,7 +60,6 @@
 #endif\r
 \r
 #include "network.h"\r
-#include "input_ext-plugins.h"\r
 \r
 #define NETSYNC_PORT_MASTER 9875\r
 #define NETSYNC_PORT_SLAVE  9876\r
index 0f6e605f5a0e7276b5e8aae732bc799b336df316..00e7bfd409c3c7b9cf48762503807b2f90525c3f 100644 (file)
@@ -132,10 +132,8 @@ static void Run( intf_thread_t *p_intf )
     vlc_bool_t b_showpos = config_GetInt( p_intf, "rc-show-pos" );
 
     int        i_dummy;
-    off_t      i_oldpos = 0;
-    off_t      i_newpos;
-
-    double     f_ratio = 1.0;
+    int        i_oldpos = 0;
+    int        i_newpos;
 
 #ifdef WIN32
     HANDLE hConsoleIn;
@@ -324,23 +322,12 @@ static void Run( intf_thread_t *p_intf )
 
         if( p_input && b_showpos )
         {
-            /* Get position */
-            vlc_mutex_lock( &p_input->stream.stream_lock );
-            if( !p_input->b_die && p_input->stream.i_mux_rate )
+            i_newpos = 100 * var_GetFloat( p_input, "position" );
+            if( i_oldpos != i_newpos )
             {
-#define A p_input->stream.p_selected_area
-                f_ratio = 1.0 / ( 50 * p_input->stream.i_mux_rate );
-                i_newpos = A->i_tell * f_ratio;
-
-                if( i_oldpos != i_newpos )
-                {
-                    i_oldpos = i_newpos;
-                    printf( "pos: %li s / %li s\n", (long int)i_newpos,
-                            (long int)(f_ratio * A->i_size) );
-                }
-#undef S
+                i_oldpos = i_newpos;
+                printf( "pos: %d%%\n", i_newpos );
             }
-            vlc_mutex_unlock( &p_input->stream.stream_lock );
         }
 
         /* Is there something to do? */
@@ -400,11 +387,11 @@ static void Run( intf_thread_t *p_intf )
                 if ( p_input )
                 {
                     int i, j;
-                    vlc_mutex_lock( &p_input->p_item->lock );
-                    for ( i = 0; i < p_input->p_item->i_categories; i++ )
+                    vlc_mutex_lock( &p_input->input.p_item->lock );
+                    for ( i = 0; i < p_input->input.p_item->i_categories; i++ )
                     {
                         info_category_t *p_category =
-                            p_input->p_item->pp_categories[i];
+                            p_input->input.p_item->pp_categories[i];
 
                         printf( "+----[ %s ]\n", p_category->psz_name );
                         printf( "| \n" );
@@ -417,7 +404,7 @@ static void Run( intf_thread_t *p_intf )
                         printf( "| \n" );
                     }
                     printf( _("+----[ end of stream info ]\n") );
-                    vlc_mutex_unlock( &p_input->p_item->lock );
+                    vlc_mutex_unlock( &p_input->input.p_item->lock );
                 }
                 else
                 {