1 * Python ctypes-based bindings
3 The bindings use ctypes to directly call the libvlc dynamic lib, and
4 the code is generated from the include files defining the public API.
8 To generate the vlc.py module and its documentation, use
11 Documentation building needs epydoc.
15 The module offers two ways of accessing the API - a raw access to all
16 exported methods, and more convenient wrapper classes :
18 - Raw access: methods are available as attributes of the vlc
19 module. Use their docstring (introspective shells like ipython are
20 your friends) to explore them.
22 - Wrapper classes: most major structures of the libvlc API (Instance,
23 Media, MediaPlayer, etc) are wrapped as classes, with shorter method
28 On win32, the simplest way is to put the vlc.py file in the same
29 directory as the libvlc.dll file (standard location:
30 c:\Program Files\VideoLAN\VLC ).
36 >>> vlc.libvlc_get_version()
38 >>> e=vlc.VLCException()
39 >>> i=vlc.libvlc_new(0, [], e)
41 <vlc.Instance object at 0x8384a4c>
42 >>> vlc.libvlc_audio_get_volume(i,e)
45 - Using wrapper classes:
48 >>> i=vlc.Instance('--no-audio', '--fullscreen')
49 >>> i.audio_get_volume()
51 >>> m=i.media_new('/tmp/foo.avi')
54 >>> p=i.media_player_new(m)
59 >>> p=vlc.MediaPlayer('/tmp/foo.avi')