Commit 1b834a36 authored by Laurent Aimar's avatar Laurent Aimar

* all: rework of the input.

parent eb1fc1f8
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gestures.c: control vlc with mouse gestures * gestures.c: control vlc with mouse gestures
***************************************************************************** *****************************************************************************
* Copyright (C) 2004 VideoLAN * 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> * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
* *
...@@ -32,9 +32,6 @@ ...@@ -32,9 +32,6 @@
#include <vlc/intf.h> #include <vlc/intf.h>
#include <vlc/vout.h> #include <vlc/vout.h>
#include "stream_control.h"
#include "input_ext-intf.h"
/***************************************************************************** /*****************************************************************************
* intf_sys_t: description and status of interface * intf_sys_t: description and status of interface
*****************************************************************************/ *****************************************************************************/
......
...@@ -361,7 +361,11 @@ static void Run( intf_thread_t *p_intf ) ...@@ -361,7 +361,11 @@ static void Run( intf_thread_t *p_intf )
} }
else if( p_input ) 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 ) if( i_action == ACTIONID_PAUSE )
{ {
......
...@@ -873,10 +873,10 @@ static mvar_t *mvar_InfoSetNew( char *name, input_thread_t *p_input ) ...@@ -873,10 +873,10 @@ static mvar_t *mvar_InfoSetNew( char *name, input_thread_t *p_input )
return s; return s;
} }
vlc_mutex_lock( &p_input->p_item->lock ); vlc_mutex_lock( &p_input->input.p_item->lock );
for ( i = 0; i < p_input->p_item->i_categories; i++ ) 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 *cat = mvar_New( name, "set" );
mvar_t *iset = mvar_New( "info", "set" ); mvar_t *iset = mvar_New( "info", "set" );
...@@ -896,7 +896,7 @@ static mvar_t *mvar_InfoSetNew( char *name, input_thread_t *p_input ) ...@@ -896,7 +896,7 @@ static mvar_t *mvar_InfoSetNew( char *name, input_thread_t *p_input )
} }
mvar_AppendVar( s, cat ); mvar_AppendVar( s, cat );
} }
vlc_mutex_unlock( &p_input->p_item->lock ); vlc_mutex_unlock( &p_input->input.p_item->lock );
return s; return s;
} }
......
...@@ -43,8 +43,6 @@ ...@@ -43,8 +43,6 @@
#include <linux/joystick.h> #include <linux/joystick.h>
#include "audio_output.h" #include "audio_output.h"
#include "stream_control.h"
#include "input_ext-intf.h"
/* Default values for parameters */ /* Default values for parameters */
#define DEFAULT_MAX_SEEK 10 /* seconds */ #define DEFAULT_MAX_SEEK 10 /* seconds */
......
...@@ -60,7 +60,6 @@ ...@@ -60,7 +60,6 @@
#endif #endif
#include "network.h" #include "network.h"
#include "input_ext-plugins.h"
#define NETSYNC_PORT_MASTER 9875 #define NETSYNC_PORT_MASTER 9875
#define NETSYNC_PORT_SLAVE 9876 #define NETSYNC_PORT_SLAVE 9876
......
...@@ -132,10 +132,8 @@ static void Run( intf_thread_t *p_intf ) ...@@ -132,10 +132,8 @@ static void Run( intf_thread_t *p_intf )
vlc_bool_t b_showpos = config_GetInt( p_intf, "rc-show-pos" ); vlc_bool_t b_showpos = config_GetInt( p_intf, "rc-show-pos" );
int i_dummy; int i_dummy;
off_t i_oldpos = 0; int i_oldpos = 0;
off_t i_newpos; int i_newpos;
double f_ratio = 1.0;
#ifdef WIN32 #ifdef WIN32
HANDLE hConsoleIn; HANDLE hConsoleIn;
...@@ -324,23 +322,12 @@ static void Run( intf_thread_t *p_intf ) ...@@ -324,23 +322,12 @@ static void Run( intf_thread_t *p_intf )
if( p_input && b_showpos ) if( p_input && b_showpos )
{ {
/* Get position */ i_newpos = 100 * var_GetFloat( p_input, "position" );
vlc_mutex_lock( &p_input->stream.stream_lock );
if( !p_input->b_die && p_input->stream.i_mux_rate )
{
#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 ) if( i_oldpos != i_newpos )
{ {
i_oldpos = i_newpos; i_oldpos = i_newpos;
printf( "pos: %li s / %li s\n", (long int)i_newpos, printf( "pos: %d%%\n", i_newpos );
(long int)(f_ratio * A->i_size) );
}
#undef S
} }
vlc_mutex_unlock( &p_input->stream.stream_lock );
} }
/* Is there something to do? */ /* Is there something to do? */
...@@ -400,11 +387,11 @@ static void Run( intf_thread_t *p_intf ) ...@@ -400,11 +387,11 @@ static void Run( intf_thread_t *p_intf )
if ( p_input ) if ( p_input )
{ {
int i, j; int i, j;
vlc_mutex_lock( &p_input->p_item->lock ); vlc_mutex_lock( &p_input->input.p_item->lock );
for ( i = 0; i < p_input->p_item->i_categories; i++ ) for ( i = 0; i < p_input->input.p_item->i_categories; i++ )
{ {
info_category_t *p_category = 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( "+----[ %s ]\n", p_category->psz_name );
printf( "| \n" ); printf( "| \n" );
...@@ -417,7 +404,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -417,7 +404,7 @@ static void Run( intf_thread_t *p_intf )
printf( "| \n" ); printf( "| \n" );
} }
printf( _("+----[ end of stream info ]\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 else
{ {
......
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