[vlc-devel] commit: New dumpmeta lua interface module to dump a file' s meta data on stdout/stderr (I'll let you figure out which one it is). Use as: vlc -I lua --lua-intf dumpmeta filename.mp3 (Antoine Cellerier )

git version control git at videolan.org
Sat Feb 13 17:48:00 CET 2010


vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Sat Feb 13 17:48:57 2010 +0100| [1fac125aa2d25b8a1323eb070e0c7e43edfb30ad] | committer: Antoine Cellerier 

New dumpmeta lua interface module to dump a file's meta data on stdout/stderr (I'll let you figure out which one it is). Use as: vlc -I lua --lua-intf dumpmeta filename.mp3

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1fac125aa2d25b8a1323eb070e0c7e43edfb30ad
---

 share/Makefile.am           |    1 +
 share/lua/intf/dumpmeta.lua |   39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/share/Makefile.am b/share/Makefile.am
index c55124f..e7d70d3 100644
--- a/share/Makefile.am
+++ b/share/Makefile.am
@@ -220,6 +220,7 @@ DIST_lua= \
 	lua/intf/modules/host.lua \
 	lua/intf/telnet.lua \
 	lua/intf/dummy.lua \
+	lua/intf/dumpmeta.lua \
 	lua/modules/sandbox.lua \
 	lua/modules/simplexml.lua
 
diff --git a/share/lua/intf/dumpmeta.lua b/share/lua/intf/dumpmeta.lua
new file mode 100644
index 0000000..194d446
--- /dev/null
+++ b/share/lua/intf/dumpmeta.lua
@@ -0,0 +1,39 @@
+--[==========================================================================[
+ rc.lua: remote control module for VLC
+--[==========================================================================[
+ Copyright (C) 2007-2009 the VideoLAN team
+ $Id$
+
+ Authors: Antoine Cellerier <dionoea at videolan dot 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.
+--]==========================================================================]
+
+--[[ to dump meta data information in the debug output, run:
+       vlc -I lua --lua-intf dumpmeta coolmusic.mp3
+--]]
+
+local meta
+repeat
+    meta = vlc.input.metas()
+until meta
+
+vlc.msg.info("Dumping meta data")
+if meta then
+    for key, value in pairs(meta) do
+        vlc.msg.info(key..": "..value)
+    end
+end
+vlc.misc.quit()




More information about the vlc-devel mailing list