#include <vlc_charset.h>
#include <vlc_aout.h>
#include <vlc_interface.h>
+#include <vlc_keys.h>
#include <lua.h> /* Low level lua C API */
#include <lauxlib.h> /* Higher level C API */
intf_sys_t *p_sys = p_intf->p_sys;
vlc_mutex_lock( &p_sys->lock );
+ mutex_cleanup_push( &p_sys->lock );
while( !p_sys->exiting )
vlc_cond_wait( &p_sys->wait, &p_sys->lock );
- vlc_mutex_unlock( &p_sys->lock );
+ vlc_cleanup_pop();
lua_pushboolean( L, 1 );
return 1;
}
return 1;
}
+static int vlclua_action_id( lua_State *L )
+{
+ vlc_key_t i_key = vlc_GetActionId( luaL_checkstring( L, 1 ) );
+ if (i_key == 0)
+ return 0;
+ lua_pushnumber( L, i_key );
+ return 1;
+}
+
/*****************************************************************************
*
*****************************************************************************/
{ "cachedir", vlclua_cachedir },
{ "datadir_list", vlclua_datadir_list },
+ { "action_id", vlclua_action_id },
+
{ "mdate", vlclua_mdate },
{ "mwait", vlclua_mwait },