Commit 625f41c6 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

modules/misc/lua: Share some code between the modules that uses lua and put...

modules/misc/lua: Share some code between the modules that uses lua and put them in a single module.
parent f8d12bd9
SOURCES_lua = luaplaylist.c luameta.c vlclua.c
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*****************************************************************************
* luameta.c: Get meta/artwork using lua scripts
*****************************************************************************
* Copyright (C) 2006 the VideoLAN team
* $Id: luameta.c 21327 2007-08-20 19:23:10Z courmisch $
*
* Authors: Antoine Cellerier <dionoea at videolan tod org>
* Pierre d'Herbemont <pdherbemont # 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef VLCLUA_H
#define VLC_LUA_H
/*****************************************************************************
* Preamble
*****************************************************************************/
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
#include <vlc/vlc.h>
#include <vlc_input.h>
#include <vlc_playlist.h>
#include <vlc_meta.h>
#include <vlc_url.h>
#include <vlc_strings.h>
#include <vlc_stream.h>
#include <vlc_charset.h>
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#include <lua.h> /* Low level lua C API */
#include <lauxlib.h> /* Higher level C API */
#include <lualib.h> /* Lua libs */
/*****************************************************************************
* Module entry points
*****************************************************************************/
int E_(FindArt)( vlc_object_t * );
int E_(FindMeta)( vlc_object_t * );
int E_(Import_LuaPlaylist)( vlc_object_t * );
void E_(Close_LuaPlaylist)( vlc_object_t * );
/*****************************************************************************
* Lua function bridge
*****************************************************************************/
vlc_object_t * vlclua_get_this( lua_State *p_state );
int vlclua_stream_new( lua_State *p_state );
int vlclua_stream_read( lua_State *p_state );
int vlclua_stream_readline( lua_State *p_state );
int vlclua_stream_delete( lua_State *p_state );
int vlclua_decode_uri( lua_State *p_state );
int vlclua_resolve_xml_special_chars( lua_State *p_state );
int vlclua_msg_dbg( lua_State *p_state );
int vlclua_msg_warn( lua_State *p_state );
int vlclua_msg_err( lua_State *p_state );
int vlclua_msg_info( lua_State *p_state );
/*****************************************************************************
* Will execute func on all scripts in luadirname, and stop if func returns
* success.
*****************************************************************************/
int vlclua_scripts_batch_execute( vlc_object_t *p_this, const char * luadirname,
int (*func)(vlc_object_t *, const char *, lua_State *, void *),
lua_State * p_state, void * user_data);
/*****************************************************************************
* Meta data setters utility.
*****************************************************************************/
void vlclua_read_meta_data( vlc_object_t *p_this,
lua_State *p_state, int o, int t, input_item_t *p_input );
void vlclua_read_custom_meta_data( vlc_object_t *p_this,
lua_State *p_state, int o, int t, input_item_t *p_input );
#endif /* VLC_LUA_H */
\ No newline at end of file
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