/*****************************************************************************
* lirc.c : lirc module for vlc
*****************************************************************************
- * Copyright (C) 2003-2005 VideoLAN
+ * Copyright (C) 2003-2005 the VideoLAN team
* $Id$
*
- * Author: Sigmund Augdal <sigmunau@idi.ntnu.no>
+ * Author: Sigmund Augdal Helberg <dnumgis@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
i_fd = lirc_init( "vlc", 1 );
if( i_fd == -1 )
{
- msg_Err( p_intf, "lirc_init failed" );
+ msg_Err( p_intf, "lirc initialisation failed" );
free( p_intf->p_sys );
return 1;
}
if( lirc_readconfig( NULL, &p_intf->p_sys->config, NULL ) != 0 )
{
- msg_Err( p_intf, "lirc_readconfig failed" );
+ msg_Err( p_intf, "failure while reading lirc config" );
lirc_deinit();
free( p_intf->p_sys );
return 1;
{
char *code, *c;
- while( !p_intf->b_die )
+ while( !intf_ShouldDie( p_intf ) )
{
/* Sleep a bit */
msleep( INTF_IDLE_SLEEP );
continue;
}
- while( !p_intf->b_die
+ while( !intf_ShouldDie( p_intf )
&& lirc_code2char( p_intf->p_sys->config, code, &c ) == 0
&& c != NULL )
{
vlc_value_t keyval;
- if( strncmp( "key-", c, 4 )
+ if( strncmp( "key-", c, 4 ) )
{
- msg_Err( p_intf, "This doesn't appear to be a valid keycombo lirc sent us. Please look at the doc/lirc/example.lirc file in VLC" );
+ msg_Err( p_intf, "this doesn't appear to be a valid keycombo lirc sent us. Please look at the doc/lirc/example.lirc file in VLC" );
break;
}
keyval.i_int = config_GetInt( p_intf, c );
- var_Set( p_intf->p_vlc, "key-pressed", keyval );
+ var_Set( p_intf->p_libvlc, "key-pressed", keyval );
}
free( code );
}