]> git.sesse.net Git - vlc/blobdiff - share/lua/README.txt
Remove use of select/poll timeouts in lua rc and telnet interfaces.
[vlc] / share / lua / README.txt
index 3dd3fc87cf4b6f52b20e79d016455147ad9dbae9..e8e279b2f913820c13c47ae2645478a42319620c 100644 (file)
@@ -95,7 +95,8 @@ misc.homedir(): Get the user's home directory.
 misc.configdir(): Get the user's VLC config directory.
 misc.cachedir(): Get the user's VLC cache directory.
 
-misc.datadir_list( name ): FIXME: write description ... or ditch function if it isn't usefull anymore, we have datadir and userdatadir :)
+misc.datadir_list( name ): FIXME: write description ... or ditch function
+  if it isn't usefull anymore, we have datadir and userdatadir :)
 
 misc.mdate(): Get the current date (in milliseconds).
 misc.mwait(): Wait for the given date (in milliseconds).
@@ -111,8 +112,9 @@ net.url_parse( url, [option delimiter] ): Parse URL. Returns a table with
   fields "protocol", "username", "password", "host", "port", path" and
   "option".
 net.listen_tcp( host, port ): Listen to TCP connections. This returns an
-  object with an accept method. This method takes an optional timeout
-  argument (in milliseconds). For example:
+  object with an accept and an fds method. The accept takes an optional timeout
+  argument (in milliseconds). The fds method returns a list of fds you can call
+  select on before using the accept method. For example:
 local l = vlc.net.listen_tcp( "localhost", 1234 )
 while true do
   local fd = l:accept( 500 )
@@ -124,7 +126,9 @@ end
 net.close( fd ): Close file descriptor.
 net.send( fd, string, [length] ): Send data on fd.
 net.recv( fd, [max length] ): Receive data from fd.
-net.select( nfds, fds_read, fds_write, timeout ): Monitor a bunch of file descriptors. Returns number of fds to handle and the amount of time not slept. See "man select".
+net.select( nfds, fds_read, fds_write, timeout ): Monitor a bunch of file
+  descriptors. Returns number of fds to handle and the amount of time not
+  slept. See "man select".
 net.fd_set_new(): Create a new fd_set.
 local fds = vlc.net.fd_set_new()
 fds:clr( fd ) -- remove fd from set
@@ -172,6 +176,13 @@ osd.slider( position, type, [id] ): Display slider. Position is an integer
   from 0 to 100. Type can be "horizontal" or "vertical".
 osd.channel_register(): Register a new OSD channel. Returns the channel id.
 osd.channel_clear( id ): Clear OSD channel.
+osd.menu.show(): Show the OSD menu.
+osd.menu.hide(): Hide the OSD menu.
+osd.menu.prev(): Select previous/left item.
+osd.menu.next(): Select next/right item.
+osd.menu.up(): Move selection up.
+osd.menu.down(): Move selection down.
+osd.menu.activate(): Activate/validate current selection.
 
 Playlist
 --------
@@ -182,7 +193,7 @@ playlist.play(): Play.
 playlist.pause(): Pause.
 playlist.stop(): Stop.
 playlist.clear(): Clear the playlist.
-playlist.repeat( [status] ): Toggle item repeat or set to specified value.
+playlist.repeat_( [status] ): Toggle item repeat or set to specified value.
 playlist.loop( [status] ): Toggle playlist loop or set to specified value.
 playlist.random( [status] ): Toggle playlsit random or set to specified value.
 playlist.goto( id ): Go to specified track.
@@ -261,6 +272,7 @@ stream( url ): Instantiate a stream object for specific url.
 s = vlc.stream( "http://www.videolan.org/" )
 s:read( 128 ) -- read up to 128 characters. Return 0 if no more data is available (FIXME?).
 s:readline() -- read a line. Return nil if EOF was reached.
+s:addfilter() -- add a stream filter. If no argument was specified, try to add all automatic stream filters.
 
 Strings
 -------
@@ -289,6 +301,8 @@ var.add_callback( object, name, function, data ): Add a callback to the
 var.del_callback( object, name, function, data ): Delete a callback to
   the object's "name" variable. "function" and "data" must be the same as
   when add_callback() was called.
+var.trigger_callback( object, name ): Trigger the callbacks associated with the
+  object's "name" variable.
 
 var.command( object name, name, argument ): Issue "object name"'s "name"
   command with argument "argument".
@@ -315,6 +329,7 @@ a reference to it, all VLM items will be deleted.
 Volume
 ------
 volume.set( level ): Set volume to an absolute level between 0 and 1024.
+  256 is 100%.
 volume.get(): Get volume.
 volume.up( [n] ): Increment volume by n steps of 32. n defaults to 1.
 volume.down( [n] ): Decrement volume by n steps of 32. n defaults to 1.