]> git.sesse.net Git - vlc/blob - bindings/python/README
libvlcpp: fix the compilation and throw an exception if the constructor fail.
[vlc] / bindings / python / README
1 ********************************************
2              IMPORTANT NOTE
3 ********************************************
4
5 This native version of VLC bindings is now deprecated. Please use the
6 new ctypes-based bindings, which can be found in the
7 bindings/python-ctypes directory of the VLC source tree.
8
9
10
11
12
13
14
15
16
17 * Testing
18
19 If you try to compile the bindings from a development tree, you will
20 have to specify the path for VLC modules, which cannot be guessed by
21 the extension module (and are hardcoded for a standard installation,
22 i.e. /usr/lib/vlc on *NIX)
23
24 For vlc.MediaControl:
25 mc=vlc.MediaControl('--plugin-path /path/to/vlc/directory'.split())
26
27 For vlc.Instance:
28 i=vlc.Instance('--plugin-path /path/to/vlc/directory'.split())
29
30 * Skeleton generation (for developers of the module):
31
32 ** For method bindings:
33
34 perl -n -e 'print "static PyObject *\nvlcInput_$2( PyObject *self, PyObject *args )\n{\n    libvlc_exception_t ex;\n    LIBVLC_TRY;\n    $1_$2( self->p_input, &ex);    LIBVLC_EXCEPT;\n    Py_INCREF( Py_None );\n    return Py_None;\n}\n\n" if /(libvlc_input)_(\w+)/ and ($2 ne "t")' ../../include/vlc/libvlc.h 
35
36 ** For method table:
37 perl -n -e 'print "    { \"$2\", $1_$2, METH_VARARGS,\n      \"$2()\" },\n" if /^(vlcInstance)_(\w+)/' vlc_instance.c