]> git.sesse.net Git - vlc/blobdiff - modules/misc/lua/vlc.c
Don't re-invent uint8_t - remove byte_t
[vlc] / modules / misc / lua / vlc.c
index 624a3e904f027294cd222e5b3a6974163992808a..d985340b4a4f42118cff57f643d5fc93a0315782 100644 (file)
 #define CONFIG_LONGTEXT N_("Lua interface configuration string. Format is: '[\"<interface module name>\"] = { <option> = <value>, ...}, ...'.")
 
 vlc_module_begin();
-    add_submodule();
-        add_shortcut( "luameta" );
-        set_shortname( N_( "Lua Meta" ) );
-        set_description( _("Fetch metadata using lua scripts") );
-        set_capability( "meta fetcher", 10 );
-        set_callbacks( E_(FindMeta), NULL );
     add_submodule();
         set_shortname( N_( "Lua Art" ) );
         set_description( _("Fetch artwork using lua scripts") );
@@ -72,7 +66,7 @@ vlc_module_begin();
         set_subcategory( SUBCAT_INPUT_DEMUX );
         set_shortname( _("Lua Playlist") );
         set_description( _("Lua Playlist Parser Interface") );
-        set_capability( "demux2", 2 );
+        set_capability( "demux", 2 );
         set_callbacks( E_(Import_LuaPlaylist), E_(Close_LuaPlaylist) );
     add_submodule();
         add_shortcut( "luaintf" );
@@ -87,9 +81,9 @@ vlc_module_begin();
         set_description( _("Lua Interface Module") );
         set_capability( "interface", 0 );
         add_string( "lua-intf", "dummy", NULL,
-                    INTF_TEXT, INTF_LONGTEXT, VLC_FALSE );
+                    INTF_TEXT, INTF_LONGTEXT, false );
         add_string( "lua-config", "", NULL,
-                    CONFIG_TEXT, CONFIG_LONGTEXT, VLC_FALSE );
+                    CONFIG_TEXT, CONFIG_LONGTEXT, false );
         set_callbacks( E_(Open_LuaIntf), E_(Close_LuaIntf) );
 vlc_module_end();
 
@@ -260,7 +254,7 @@ int vlclua_stream_read( lua_State *L )
 {
     stream_t * p_stream;
     int n;
-    byte_t *p_read;
+    uint8_t *p_read;
     int i_read;
     p_stream = (stream_t *)luaL_checklightuserdata( L, 1 );
     n = luaL_checkint( L, 2 );
@@ -418,11 +412,18 @@ int vlclua_dir_list( vlc_object_t *p_this, const char *luadirname,
                       psz_vlcpath, luadirname )  < 0 )
             return VLC_ENOMEM;
         i++;
-
-        if( asprintf( &ppsz_dir_list[i], "%s" DIR_SEP "share" DIR_SEP "lua" DIR_SEP "%s",
+#       ifdef WIN32
+        if( asprintf( &ppsz_dir_list[i], "%s" DIR_SEP "scripts" DIR_SEP "%s",
+                      psz_vlcpath, luadirname )  < 0 )
+            return VLC_ENOMEM;
+        i++;
+#       else
+         if( asprintf( &ppsz_dir_list[i], "%s" DIR_SEP "share" DIR_SEP "lua" DIR_SEP "%s",
                       psz_vlcpath, luadirname )  < 0 )
             return VLC_ENOMEM;
         i++;
+#       endif
+
     }
 #   else
     if( asprintf( &ppsz_dir_list[i],
@@ -673,7 +674,7 @@ void __vlclua_read_options( vlc_object_t *p_this, lua_State *L,
 
 int __vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
                                     playlist_t *p_playlist,
-                                    input_item_t *p_parent, vlc_bool_t b_play )
+                                    input_item_t *p_parent, bool b_play )
 {
     int i_count = 0;
 
@@ -758,7 +759,7 @@ int __vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
                         playlist_AddInput( p_playlist, p_input,
                                PLAYLIST_APPEND | 
                                ( b_play ? PLAYLIST_GO : PLAYLIST_PREPARSE ),
-                               PLAYLIST_END, VLC_TRUE, VLC_FALSE );
+                               PLAYLIST_END, true, false );
                     i_count ++; /* increment counter */
                     vlc_gc_decref( p_input );
                     while( i_options > 0 )