]> git.sesse.net Git - vlc/blobdiff - share/lua/README.txt
lua: typo in the documentation
[vlc] / share / lua / README.txt
index d14efa0a172a8da64e7bf4cd6092eb3ba5ef6e0b..ae0e492a468d7eb9faabc33a1855fa09edf72c5d 100644 (file)
@@ -199,7 +199,7 @@ net.connect_tcp( host, port ): open a connection to the given host:port (TCP).
 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.poll( { fd = events }, [timeout in seconds] ): Implement poll function.
+net.poll( { fd = events } ): Implement poll function.
   Returns the numbers of file descriptors with a non 0 revent. The function
   modifies the input table to { fd = revents }. See "man poll".
 net.POLLIN/POLLPRI/POLLOUT/POLLRDHUP/POLLERR/POLLHUP/POLLNVAL: poll event flags
@@ -222,24 +222,14 @@ object.input(): Get the current input object.
 object.playlist(): Get the playlist object.
 object.libvlc(): Get the libvlc object.
 
-object.find( object, type, mode ): Find an object of given type. mode can
-  be any of "parent", "child" and "anywhere". If set to "parent", it will
-  look in "object"'s parent objects. If set to "child" it will look in
-  "object"'s children. If set to "anywhere", it will look in all the
-  objects. If object is unset, the current module's object will be used.
-  Type can be: "libvlc", "playlist", "input", "decoder",
-  "vout", "aout", "packetizer", "generic".
-  This function is deprecated and slow and should be avoided.
-object.find_name( object, name, mode ): Same as above except that it matches
-  on the object's name and not type. This function is also slow and should
-  be avoided if possible.
+object.find( object, type, mode ): Return nil. DO NOT USE.
 
 OSD
 ---
 osd.icon( type, [id] ): Display an icon on the given OSD channel. Uses the
   default channel is none is given. Icon types are: "pause", "play",
   "speaker" and "mute".
-osd.message( string, [id], [position], [duration]: Display the text message on
+osd.message( string, [id], [position], [duration] ): Display the text message on
   the given OSD channel. Position types are: "center", "left", "right", "top",
   "bottom", "top-left", "top-right", "bottom-left" or "bottom-right". The
   duration is set in microseconds.
@@ -294,9 +284,8 @@ playlist.add( ... ): Add a bunch of items to the playlist.
                 example: .options = { "fullscreen" }
       .duration: stream duration in seconds (OPTIONAL)
       .meta: custom meta data (OPTIONAL, meta data)
-             A .meta field is a table of custom meta categories which
-             each have custom meta properties.
-             example: .meta = { ["Google video"] = { ["docid"] = "-5784010886294950089"; ["GVP version"] = "1.1" }; ["misc"] = { "Hello" = "World!" } }
+             A .meta field is a table of custom meta key value pairs.
+             example: .meta = { ["GVP docid"] = "-5784010886294950089", ["GVP version] = "1.1", Hello = "World!" }
   Invalid playlist items will be discarded by VLC.
 playlist.enqueue( ... ): like playlist.add() except that track isn't played.
 playlist.get( [what, [tree]] ): Get the playlist.
@@ -373,6 +362,7 @@ strings.decode_uri( [uri1, [uri2, [...]]] ): Decode a list of URIs. This
   function returns as many variables as it had arguments.
 strings.encode_uri_component( [uri1, [uri2, [...]]] ): Encode a list of URI
   components. This function returns as many variables as it had arguments.
+strings.make_uri( path, [scheme] ): Convert a file path to a URI.
 strings.resolve_xml_special_chars( [str1, [str2, [...]]] ): Resolve XML
   special characters in a list of strings. This function returns as many
   variables as it had arguments.
@@ -388,7 +378,8 @@ var.get_list( object, name ): Get the object's variable "name"'s value list.
   1st return value is the value list, 2nd return value is the text list.
 var.set( object, name, value ): Set the object's variable "name" to "value".
 var.create( object, name, value ): Create and set the object's variable "name"
-  to "value". Created vars can be of type float, string or bool.
+  to "value". Created vars can be of type float, string, bool or void.
+  For a void variable the value has to be 'nil'.
 
 var.add_callback( object, name, function, data ): Add a callback to the
   object's "name" variable. Callback functions take 4 arguments: the
@@ -438,8 +429,8 @@ XML
 ---
 xml = vlc.xml(): Create an xml object.
 reader = xml:create_reader( stream ): create an xml reader that use the given stream.
-reader:read(): read some data
-reader:node_type(): return the type of the curret node: 'none', 'startelem', 'endelem' or 'text'.
+reader:read(): read some data, return -1 on error, 0 on EOF, 1 on start of XML
+  element, 2 on end of XML element, 3 on text
 reader:name(): name of the element
 reader:value(): value of the element
 reader:next_attr(): next attribute of the element