]> git.sesse.net Git - vlc/blobdiff - modules/misc/lua/demux.c
Implement Lua objects in the C code directly. Fix most type checks. Move every thing...
[vlc] / modules / misc / lua / demux.c
similarity index 96%
rename from modules/misc/lua/playlist.c
rename to modules/misc/lua/demux.c
index 60602fd6efb28cef84a6348e4a648a6de5b0b053..890b643c7b59523a9c61b899dd597c5755d9635c 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
- * playlist.c :  Lua playlist demux module
+ * demux.c :  Lua playlist demux module
  *****************************************************************************
- * Copyright (C) 2007 the VideoLAN team
+ * Copyright (C) 2007-2008 the VideoLAN team
  * $Id$
  *
  * Authors: Antoine Cellerier <dionoea at videolan tod org>
@@ -40,6 +40,7 @@
 #endif
 
 #include "vlc.h"
+#include "libs.h"
 
 
 /*****************************************************************************
@@ -49,7 +50,7 @@ static int Demux( demux_t *p_demux );
 static int Control( demux_t *p_demux, int i_query, va_list args );
 
 /*****************************************************************************
- *
+ * Demux specific functions
  *****************************************************************************/
 struct demux_sys_t
 {
@@ -57,10 +58,6 @@ struct demux_sys_t
     char *psz_filename;
 };
 
-/*****************************************************************************
- *
- *****************************************************************************/
-
 static int vlclua_demux_peek( lua_State *L )
 {
     demux_t *p_demux = (demux_t *)vlclua_get_this( L );
@@ -97,17 +94,13 @@ static int vlclua_demux_readline( lua_State *L )
     return 1;
 }
 
-
+/*****************************************************************************
+ *
+ *****************************************************************************/
 /* Functions to register */
 static luaL_Reg p_reg[] =
 {
     { "peek", vlclua_demux_peek },
-    { "decode_uri", vlclua_decode_uri },
-    { "resolve_xml_special_chars", vlclua_resolve_xml_special_chars },
-    { "msg_dbg", vlclua_msg_dbg },
-    { "msg_warn", vlclua_msg_warn },
-    { "msg_err", vlclua_msg_err },
-    { "msg_info", vlclua_msg_info },
     { NULL, NULL }
 };
 
@@ -215,6 +208,8 @@ int Import_LuaPlaylist( vlc_object_t *p_this )
     luaL_openlibs( L ); /* FIXME: Don't open all the libs? */
 
     luaL_register( L, "vlc", p_reg );
+    luaopen_msg( L );
+    luaopen_strings( L );
     lua_pushlightuserdata( L, p_demux );
     lua_setfield( L, -2, "private" );
     lua_pushstring( L, p_demux->psz_path );