Commit 585f8158 authored by Sam Hocevar's avatar Sam Hocevar

* cleaned Octplane's crappy indentation.

  * fixed the --server option which didn't work if a ~/.vlcrc existed.
parent 27fdf30e
......@@ -8,6 +8,12 @@ O.1.99i :
* fixed the aliases install.
* renamed an inconsistent varaible in src/input/input_file.c.
* added support for I+ synchro (all Is and the first P).
* fixed a motion compensation bug which generated some distortion
on B images.
* fixed a motion compensation bug for skipped macroblocks.
* fixed a synchro bug for field images.
* cleaned Octplane's crappy indentation.
* fixed the --server option which didn't work if a ~/.vlcrc existed.
Tue, 22 Aug 2000 01:31:58 +0200
0.1.99h :
......
......@@ -89,7 +89,7 @@ typedef struct intf_thread_s
p_input_thread_t p_input;
/* Specific functions */
keyparm (*p_intf_getKey)(struct intf_thread_s *p_intf, int r_key) ;
keyparm (*p_intf_get_key)(struct intf_thread_s *p_intf, int r_key) ;
} intf_thread_t;
......@@ -104,10 +104,6 @@ int intf_SelectChannel ( intf_thread_t * p_intf, int i_channel
int intf_ProcessKey ( intf_thread_t * p_intf, int i_key );
void intf_AssignKey( intf_thread_t *p_intf, int r_key, int f_key, int param);
void intf_AssignSKey( intf_thread_t *p_intf, int r_key, int f_key);
keyparm intf_getKey( intf_thread_t *p_intf, int r_key);
keyparm intf_GetKey( intf_thread_t *p_intf, int r_key);
void intf_AssignNormalKeys( intf_thread_t *p_intf);
......@@ -160,7 +160,7 @@ void intf_SDLManage( intf_thread_t *p_intf )
void intf_SDL_Keymap(intf_thread_t * p_intf )
{
p_intf->p_intf_getKey = intf_getKey;
p_intf->p_intf_get_key = intf_GetKey;
intf_AssignKey(p_intf, SDLK_q, INTF_KEY_QUIT, NULL);
intf_AssignKey(p_intf, SDLK_ESCAPE, INTF_KEY_QUIT, NULL);
/* intf_AssignKey(p_intf,3,'Q'); */
......
......@@ -163,16 +163,26 @@ intf_thread_t* intf_Create( void )
intf_Msg("Interface initialized\n");
return( p_intf );
}
}
/*****************************************************************************
/*****************************************************************************
* intf_Run
*****************************************************************************
* Initialization script and main interface loop.
*****************************************************************************/
void intf_Run( intf_thread_t *p_intf )
void intf_Run( intf_thread_t *p_intf )
{
char * psz_server = main_GetPszVariable( INPUT_SERVER_VAR, NULL );
/* If a server was specified */
if( psz_server )
{
if( p_main->p_playlist->p_list )
p_intf->p_input = input_CreateThread( INPUT_METHOD_TS_UCAST,
psz_server, 0, 0,
p_intf->p_vout, p_main->p_aout, NULL );
}
/* Or if a file was specified */
else if( p_main->p_playlist->p_list )
{
p_intf->p_input = input_CreateThread( INPUT_METHOD_TS_FILE, NULL, 0, 0, p_main->p_intf->p_vout, p_main->p_aout, NULL );
}
......@@ -209,15 +219,15 @@ intf_thread_t* intf_Create( void )
* keyboard events, a 100ms delay is a good compromise */
msleep( INTF_IDLE_SLEEP );
}
}
}
/*****************************************************************************
/*****************************************************************************
* intf_Destroy: clean interface after main loop
*****************************************************************************
* This function destroys specific interfaces and close output devices.
*****************************************************************************/
void intf_Destroy( intf_thread_t *p_intf )
{
void intf_Destroy( intf_thread_t *p_intf )
{
p_intf_key p_cur;
p_intf_key p_next;
/* Destroy interfaces */
......@@ -228,7 +238,6 @@ intf_thread_t* intf_Create( void )
UnloadChannels( p_intf );
/* Destroy keymap */
p_cur = p_intf->p_keys;
while( p_cur != NULL)
{
......@@ -240,16 +249,16 @@ intf_thread_t* intf_Create( void )
/* Free structure */
free( p_intf );
}
}
/*****************************************************************************
/*****************************************************************************
* intf_SelectChannel: change channel
*****************************************************************************
* Kill existing input, if any, and try to open a new one, using an input
* configuration table.
*****************************************************************************/
int intf_SelectChannel( intf_thread_t * p_intf, int i_channel )
{
int intf_SelectChannel( intf_thread_t * p_intf, int i_channel )
{
intf_channel_t * p_channel; /* channel */
/* Look for channel in array */
......@@ -283,15 +292,14 @@ intf_thread_t* intf_Create( void )
/* Channel does not exist */
intf_Msg("Channel %d does not exist\n", i_channel );
return( 1 );
}
}
/*****************************************************************************
/*****************************************************************************
* intf_AssignKey: assign standartkeys *
*****************************************************************************
* This function fills in the associative array that links the key pressed *
* and the key we use internally. Support one extra parameter. *
****************************************************************************/
void intf_AssignKey( intf_thread_t *p_intf, int r_key, int f_key, int param)
{
p_intf_key p_cur = p_intf->p_keys;
......@@ -323,7 +331,7 @@ void intf_AssignKey( intf_thread_t *p_intf, int r_key, int f_key, int param)
}
/* Basic getKey function... */
keyparm intf_getKey( intf_thread_t *p_intf, int r_key)
keyparm intf_GetKey( intf_thread_t *p_intf, int r_key)
{
keyparm reply;
......@@ -334,8 +342,8 @@ keyparm intf_getKey( intf_thread_t *p_intf, int r_key)
}
if(current == NULL)
{ /* didn't find any key in the array */
reply.key=INTF_KEY_UNKNOWN;
reply.param=0;
reply.key = INTF_KEY_UNKNOWN;
reply.param = 0;
}
else
{
......@@ -353,7 +361,7 @@ keyparm intf_getKey( intf_thread_t *p_intf, int r_key)
void intf_AssignNormalKeys( intf_thread_t *p_intf)
{
p_intf->p_intf_getKey = intf_getKey;
p_intf->p_intf_get_key = intf_GetKey;
intf_AssignKey( p_intf , 'Q', INTF_KEY_QUIT, 0);
intf_AssignKey( p_intf , 'q', INTF_KEY_QUIT, 0);
......@@ -393,7 +401,7 @@ int intf_ProcessKey( intf_thread_t *p_intf, int g_key )
static int i_volbackup;
keyparm k_reply;
k_reply = intf_getKey( p_intf, g_key);
k_reply = intf_GetKey( p_intf, g_key);
switch( k_reply.key )
{
......
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