vlc/bindings/python.git
2 months agoGenerate an appropriate PyPI installer package for the generated module master
Olivier Aubert [Tue, 10 Oct 2017 16:56:23 +0000 (18:56 +0200)]
Generate an appropriate PyPI installer package for the generated module

Closes #15

2 months agopython bindings: refactor, move template files to their own directory
Olivier Aubert [Tue, 10 Oct 2017 10:57:32 +0000 (12:57 +0200)]
python bindings: refactor, move template files to their own directory

2 months agopython bindings: configure logging module when running standalone
Olivier Aubert [Thu, 28 Sep 2017 20:09:15 +0000 (22:09 +0200)]
python bindings: configure logging module when running standalone

2 months agoPython bindings: update generated bindings for 2.2 and dev. versions
Olivier Aubert [Thu, 28 Sep 2017 19:16:01 +0000 (21:16 +0200)]
Python bindings: update generated bindings for 2.2 and dev. versions

2 months agopython bindings: update generator version number
Olivier Aubert [Thu, 28 Sep 2017 19:15:19 +0000 (21:15 +0200)]
python bindings: update generator version number

2 months agopython-vlc: allow to specify lib and plugin path
Olivier Aubert [Mon, 25 Sep 2017 12:57:13 +0000 (14:57 +0200)]
python-vlc: allow to specify lib and plugin path

Using environment variables PYTHON_VLC_LIB_PATH and PYTHON_VLC_MODULE_PATH.
This will help experimenting with various setups.

Closes #31

2 months agopython bindings generator: handle bitshifted chars in enums
Olivier Aubert [Tue, 19 Sep 2017 09:57:09 +0000 (11:57 +0200)]
python bindings generator: handle bitshifted chars in enums

8 months agoGtk3 example
Olivier Aubert [Mon, 10 Apr 2017 10:18:58 +0000 (12:18 +0200)]
Gtk3 example

8 months agoRename gtkvlc.py to gtk2vlc.py (using old pygtk2 version)
Olivier Aubert [Mon, 10 Apr 2017 09:33:50 +0000 (11:33 +0200)]
Rename gtkvlc.py to gtk2vlc.py (using old pygtk2 version)

8 months agoPython bindings: fix regexp to handle deprecated APIs
Olivier Aubert [Mon, 20 Mar 2017 20:24:38 +0000 (21:24 +0100)]
Python bindings: fix regexp to handle deprecated APIs

Closes #29

9 months agopython: generate a new version of the bindings
Olivier Aubert [Wed, 1 Mar 2017 17:06:56 +0000 (18:06 +0100)]
python: generate a new version of the bindings

They are generated from a fixed version of the VLC dev tree (commit
cb1e307b4bac50aa650063fc39452ecae02ed867) that fixes parameter names in
include files.

Closes #27

9 months agopython: conditional compilation based on presence of include files
Olivier Aubert [Wed, 1 Mar 2017 17:05:25 +0000 (18:05 +0100)]
python: conditional compilation based on presence of include files

Add some explanation messages in the Makefile and the README file to
specify what is expected.

Closes #26

9 months agopython-vlc: Fix ctypes conversion for pointers
Olivier Aubert [Fri, 24 Feb 2017 22:40:13 +0000 (23:40 +0100)]
python-vlc: Fix ctypes conversion for pointers

This makes many callbacks work correctly. Thanks to Daniël van Adrichem
@daniel5gh for the fix and tests.

Closes #17

11 months agoMake wxvlc example cross-platform
Olivier Aubert [Tue, 3 Jan 2017 14:21:22 +0000 (15:21 +0100)]
Make wxvlc example cross-platform

Closes #23

12 months agoAdd support for libvlc_video_viewpoint API
Olivier Aubert [Tue, 29 Nov 2016 09:27:16 +0000 (10:27 +0100)]
Add support for libvlc_video_viewpoint API

14 months agoGenerate 2.2 specific bindings (in generated/2.2)
Olivier Aubert [Fri, 7 Oct 2016 10:11:27 +0000 (12:11 +0200)]
Generate 2.2 specific bindings (in generated/2.2)

14 months agoSupport new APIs (rd_descriptions and renderer)
Olivier Aubert [Fri, 7 Oct 2016 09:56:48 +0000 (11:56 +0200)]
Support new APIs (rd_descriptions and renderer)

Untested code, waiting for unit tests and user feedback

14 months agoFix typo in tracks_get override.
Olivier Aubert [Fri, 7 Oct 2016 09:48:15 +0000 (11:48 +0200)]
Fix typo in tracks_get override.

Fixes #16

15 months agoUpdate generated VLC
Olivier Aubert [Tue, 6 Sep 2016 10:17:03 +0000 (12:17 +0200)]
Update generated VLC

15 months agoFix struct type names
Olivier Aubert [Tue, 6 Sep 2016 10:15:55 +0000 (12:15 +0200)]
Fix struct type names

See b0984a632f285643013c709b51a72aa98a3e53c4 in VLC

15 months agoGet directory names from environment
vaksick [Sun, 4 Sep 2016 14:13:32 +0000 (16:13 +0200)]
Get directory names from environment

Signed-off-by: Olivier Aubert <contact@olivieraubert.net>
16 months agoUpdate python generator+bindings to match latest libvlc API changes
Olivier Aubert [Tue, 19 Jul 2016 10:45:52 +0000 (12:45 +0200)]
Update python generator+bindings to match latest libvlc API changes

19 months agoSpecify plugin path through the environment variable
Olivier Aubert [Fri, 15 Apr 2016 15:15:14 +0000 (17:15 +0200)]
Specify plugin path through the environment variable

The command line option has long been removed

19 months agoGenerate new vlc.py bindings
Olivier Aubert [Fri, 15 Apr 2016 14:51:44 +0000 (16:51 +0200)]
Generate new vlc.py bindings

19 months agoAllow to pass options to vlc.py invoked as script
Jean Brouwers [Fri, 15 Apr 2016 14:45:25 +0000 (16:45 +0200)]
Allow to pass options to vlc.py invoked as script

Signed-off-by: Olivier Aubert <contact@olivieraubert.net>
19 months agoParse LIBVLC_VERSION
Jean Brouwers [Fri, 15 Apr 2016 14:41:13 +0000 (16:41 +0200)]
Parse LIBVLC_VERSION

Signed-off-by: Olivier Aubert <contact@olivieraubert.net>
19 months agoImprove enum parsing
Jean Brouwers [Fri, 15 Apr 2016 14:36:51 +0000 (16:36 +0200)]
Improve enum parsing

Signed-off-by: Olivier Aubert <contact@olivieraubert.net>
20 months agoHandle expressions in enum values
Jean Brouwers [Thu, 7 Apr 2016 21:47:24 +0000 (23:47 +0200)]
Handle expressions in enum values

See libvlc_MediaPlayerCorked for instance

Signed-off-by: Olivier Aubert <contact@olivieraubert.net>
20 months agoOn MacOS X search for plugins in modules/ and plugins/ directories
Jean Brouwers [Thu, 7 Apr 2016 14:11:41 +0000 (16:11 +0200)]
On MacOS X search for plugins in modules/ and plugins/ directories

Signed-off-by: Olivier Aubert <contact@olivieraubert.net>
20 months agoUpdate generated VLC
Olivier Aubert [Thu, 7 Apr 2016 14:08:42 +0000 (16:08 +0200)]
Update generated VLC

20 months agoDefine conversion items and blacklist a function
Olivier Aubert [Thu, 7 Apr 2016 13:51:28 +0000 (15:51 +0200)]
Define conversion items and blacklist a function

20 months agoSpecify caught exception
Olivier Aubert [Thu, 7 Apr 2016 13:50:48 +0000 (15:50 +0200)]
Specify caught exception

20 months agoSpecify encoding
Olivier Aubert [Thu, 7 Apr 2016 13:50:36 +0000 (15:50 +0200)]
Specify encoding

Some docstrings contain UTF8 characters

22 months agoConvert callbacks doc to epydoc format
Olivier Aubert [Mon, 1 Feb 2016 15:21:20 +0000 (16:21 +0100)]
Convert callbacks doc to epydoc format

2 years agoTkinter example for VLC Python bindings
Patrick Fay [Tue, 24 Nov 2015 16:00:19 +0000 (17:00 +0100)]
Tkinter example for VLC Python bindings

Signed-off-by: Olivier Aubert <contact@olivieraubert.net>
2 years agoFix packaging
Olivier Aubert [Thu, 5 Nov 2015 23:16:24 +0000 (00:16 +0100)]
Fix packaging

2 years agoAdd git.videolan.org link
Olivier Aubert [Thu, 5 Nov 2015 23:00:00 +0000 (00:00 +0100)]
Add git.videolan.org link

2 years agoRewrite README as restructured text
Olivier Aubert [Thu, 5 Nov 2015 22:54:52 +0000 (23:54 +0100)]
Rewrite README as restructured text

2 years agoUpdate README
Olivier Aubert [Thu, 5 Nov 2015 22:46:15 +0000 (23:46 +0100)]
Update README

2 years agoMove generator code and test module to subdirs
Olivier Aubert [Thu, 5 Nov 2015 22:41:49 +0000 (23:41 +0100)]
Move generator code and test module to subdirs

2 years agoUpdate setup.py with trove classifiers
Olivier Aubert [Thu, 5 Nov 2015 22:24:28 +0000 (23:24 +0100)]
Update setup.py with trove classifiers

2 years agoUpdate version number
Olivier Aubert [Thu, 5 Nov 2015 22:14:19 +0000 (23:14 +0100)]
Update version number

2 years agoAdd test coverage for MRL encoding fix
Tomas Groth [Fri, 2 Oct 2015 08:49:48 +0000 (10:49 +0200)]
Add test coverage for MRL encoding fix

Signed-off-by: Olivier Aubert <contact@olivieraubert.net>
2 years agoUpdate generated python bindings
Olivier Aubert [Wed, 30 Sep 2015 13:52:48 +0000 (15:52 +0200)]
Update generated python bindings

2 years agoUse utf-8 encoding for all strings passed through the libvlc API
Olivier Aubert [Wed, 30 Sep 2015 13:51:41 +0000 (15:51 +0200)]
Use utf-8 encoding for all strings passed through the libvlc API

The libvlc API explicitly uses utf-8 for all strings. Using
sys.getfilesystemencoding() on the python side will not produce the
appropriate encoding especially on windows.

Reported by Tomas Groth <tomasgroth@yahoo.dk>

2 years agoFix email address
Olivier Aubert [Sat, 5 Sep 2015 21:09:08 +0000 (23:09 +0200)]
Fix email address

2 years agoFix setup.py to fall back to generated file
Odin Hørthe Omdal [Sat, 5 Sep 2015 17:50:56 +0000 (19:50 +0200)]
Fix setup.py to fall back to generated file

When you install python-vlc using pip or a similar package manager, you
won't have access to VLC files so you can't generate a fresh vlc.py.
However, the project itself ships a reasonably updated pre-generated
vlc.py that we can fall back to.

Signed-off-by: Olivier Aubert <contact@olivieraubert.net>
2 years agoUpgrade distribute_setup file to work with newer python
Odin Hørthe Omdal [Sat, 5 Sep 2015 17:49:42 +0000 (19:49 +0200)]
Upgrade distribute_setup file to work with newer python

Setuptools 0.7b and later is preferable to distribute.

Signed-off-by: Olivier Aubert <contact@olivieraubert.net>
2 years agoAdd some fields to Event union
Olivier Aubert [Sat, 5 Sep 2015 21:04:08 +0000 (23:04 +0200)]
Add some fields to Event union

2 years agoAdd support for MediaPlayer.get_full_(title|chapter)_descriptions
Olivier Aubert [Fri, 19 Jun 2015 11:46:24 +0000 (13:46 +0200)]
Add support for MediaPlayer.get_full_(title|chapter)_descriptions

(untested for the moment)

2 years agoFix ctypes.byref reference
Olivier Aubert [Fri, 19 Jun 2015 11:43:34 +0000 (13:43 +0200)]
Fix ctypes.byref reference

2 years agoImplement struct parsing.
Olivier Aubert [Fri, 19 Jun 2015 09:29:17 +0000 (11:29 +0200)]
Implement struct parsing.

Still imperfect (does not handle struct embedded in struct), and generation is not implemented

2 years agoUpdate generated bindings
Olivier Aubert [Fri, 5 Jun 2015 14:22:23 +0000 (16:22 +0200)]
Update generated bindings

2 years agoReplace NULL by None in python doc
Olivier Aubert [Fri, 5 Jun 2015 14:22:02 +0000 (16:22 +0200)]
Replace NULL by None in python doc

2 years agopython bindings: wrap new API functions libvlc_media_new_callbacks libvlc_media_get_t...
Olivier Aubert [Wed, 1 Apr 2015 19:29:39 +0000 (21:29 +0200)]
python bindings: wrap new API functions libvlc_media_new_callbacks libvlc_media_get_type libvlc_audio_output_device_get

2 years agoFix gtk example against py3k
xantares 09 [Sat, 7 Mar 2015 17:46:30 +0000 (18:46 +0100)]
Fix gtk example against py3k

Signed-off-by: Olivier Aubert <contact@olivieraubert.net>
2 years agoFix python-qt example against py3k
xantares 09 [Sat, 7 Mar 2015 17:45:48 +0000 (18:45 +0100)]
Fix python-qt example against py3k

Signed-off-by: Olivier Aubert <contact@olivieraubert.net>
2 years agoAdd warnings in the doc about options not available at the media level
Olivier Aubert [Sun, 15 Feb 2015 19:32:53 +0000 (20:32 +0100)]
Add warnings in the doc about options not available at the media level

Fixes #4

2 years agoCache python wrappers for EventManager instances
Olivier Aubert [Wed, 4 Feb 2015 15:44:41 +0000 (16:44 +0100)]
Cache python wrappers for EventManager instances

2 years agoScript intended to reproduce a GC related issue
Olivier Aubert [Wed, 4 Feb 2015 10:32:16 +0000 (11:32 +0100)]
Script intended to reproduce a GC related issue

2 years agoUpdate generated python bindings to include new API elements
Olivier Aubert [Tue, 20 Jan 2015 14:02:00 +0000 (15:02 +0100)]
Update generated python bindings to include new API elements

3 years agoUpdate TODO
Olivier Aubert [Mon, 22 Sep 2014 11:51:43 +0000 (13:51 +0200)]
Update TODO

3 years agoUpdate my email address
Olivier Aubert [Sun, 21 Sep 2014 21:10:25 +0000 (23:10 +0200)]
Update my email address

3 years agoUpdate generated vlc.py
Olivier Aubert [Sun, 21 Sep 2014 20:55:49 +0000 (22:55 +0200)]
Update generated vlc.py

It adds support for the new events MediaPlayerESAdded/Deleted/Selected

3 years agopython bindings: regenerate bindings
Olivier Aubert [Wed, 25 Jun 2014 11:49:20 +0000 (13:49 +0200)]
python bindings: regenerate bindings

3 years agopython bindings: wrap tracks_get to return the appropriate objects
Olivier Aubert [Wed, 25 Jun 2014 11:49:06 +0000 (13:49 +0200)]
python bindings: wrap tracks_get to return the appropriate objects

Code contributed by Frederic Turmel <me@fredt.org>

3 years agoBinding: fix winreg import for python3
Tomas Groth [Wed, 25 Jun 2014 11:47:28 +0000 (13:47 +0200)]
Binding: fix winreg import for python3

Signed-off-by: Olivier Aubert <contact@olivieraubert.net>
3 years agobindings: add translation for opaque libvlc_equalizer_t
Olivier Aubert [Wed, 25 Jun 2014 11:46:46 +0000 (13:46 +0200)]
bindings: add translation for opaque libvlc_equalizer_t

4 years agoFixed PyQt example for MacOS X platform.
Hendrik Buschmeier [Thu, 17 Oct 2013 07:48:31 +0000 (07:48 +0000)]
Fixed PyQt example for MacOS X platform.

* Draws the video onto the QWidget instead of only showing a
  a black box.
* Uses QMacCocoaViewContainer instead of QFrame as videoframe
  QWidget.
* Uses MediaPlayer's set_nsobject method instead of set_agl.
* Fixes spelling error in QWidget method being called.

Signed-off-by: Olivier Aubert <contact@olivieraubert.net>
4 years agoFix 3.x DeprecationWarning
Olivier Aubert [Tue, 2 Jul 2013 08:36:08 +0000 (10:36 +0200)]
Fix 3.x DeprecationWarning

Define a __hash__ method in addition to the __eq__ method, to match the data model.
See http://stackoverflow.com/questions/15471333/how-to-eliminate-a-python3-deprecation-warning-for-the-equality-operator for details.

4 years agoDistribute drop-in for easier installation in develop mode.
=?UTF-8?q?Dra=C5=BEen=20Lu=C4=8Danin?= [Thu, 16 May 2013 08:28:02 +0000 (10:28 +0200)]
Distribute drop-in for easier installation in develop mode.

Signed-off-by: Olivier Aubert <olivier.aubert@liris.cnrs.fr>
4 years agopython bindings: define translation for uintptr_t* and update module
Olivier Aubert [Mon, 29 Apr 2013 10:17:57 +0000 (12:17 +0200)]
python bindings: define translation for uintptr_t* and update module

This allows to wrap libvlc_log_get_object

4 years agoWrap string parameters with automatic str_to_bytes conversion.
Olivier Aubert [Mon, 1 Apr 2013 21:50:15 +0000 (23:50 +0200)]
Wrap string parameters with automatic str_to_bytes conversion.

4 years agoDefine wrapper for opaque Log struct (for libvlc >= 2.1)
Olivier Aubert [Mon, 1 Apr 2013 21:49:39 +0000 (23:49 +0200)]
Define wrapper for opaque Log struct (for libvlc >= 2.1)

4 years agoFix potential bug in bytes_to_str
Olivier Aubert [Thu, 21 Mar 2013 21:37:23 +0000 (22:37 +0100)]
Fix potential bug in bytes_to_str

The missing code path is not followed in any case, but better safe than sorry.

4 years agoAdd tests target to run tests with both python2 and python3
Olivier Aubert [Thu, 21 Mar 2013 21:37:19 +0000 (22:37 +0100)]
Add tests target to run tests with both python2 and python3

4 years agoAdd support for the new libvlc_media_track_t structure
Olivier Aubert [Thu, 14 Feb 2013 08:15:57 +0000 (09:15 +0100)]
Add support for the new libvlc_media_track_t structure

4 years agoCoding style fixes
Olivier Aubert [Thu, 14 Feb 2013 08:14:36 +0000 (09:14 +0100)]
Coding style fixes

4 years agoNormalize local paths in set_mrl
Olivier Aubert [Tue, 15 Jan 2013 14:05:39 +0000 (15:05 +0100)]
Normalize local paths in set_mrl

5 years agopython bindings: add AudioOutputDevice definition
Olivier Aubert [Mon, 15 Oct 2012 18:56:22 +0000 (20:56 +0200)]
python bindings: add AudioOutputDevice definition

5 years agopython bindings: remove old log API related tests
Olivier Aubert [Mon, 15 Oct 2012 18:55:32 +0000 (20:55 +0200)]
python bindings: remove old log API related tests

5 years agopython bindings: fix marquee filter declaration
Olivier Aubert [Fri, 5 Oct 2012 19:46:57 +0000 (21:46 +0200)]
python bindings: fix marquee filter declaration

Since the video pipeline changes, the marquee filter should be declared at the Instance level and cannot be declared as a Media option. Fix the example player code.

See http://forum.videolan.org/viewtopic.php?f=32&t=104669&p=354390&hilit=python#p354390 for details

5 years agopython bindings: fix callback regexp to unblacklist libvlc_video_lock_cb
Olivier Aubert [Fri, 5 Oct 2012 19:38:14 +0000 (21:38 +0200)]
python bindings: fix callback regexp to unblacklist libvlc_video_lock_cb

It now correctly parses the libvlc_video_lock_cb signature and
generates the vlc.CallbackDecorators.VideoLockCb ctypes signature
definition, but the result is untested.
Interested users are invited to give it a try, and report issues and successes.

5 years agopython: make module python 2.6 compatible
Olivier Aubert [Fri, 28 Sep 2012 20:52:36 +0000 (22:52 +0200)]
python: make module python 2.6 compatible

sys.version_info.major (namedtuple) was introduced in 2.7. This is the only compatibility issue, so fix it.

Suggested by David Mills <tvtronix-ad-yahoo-dot-com>

5 years agopython bindings: update generated vlc.py module (python3 compatible)
Olivier Aubert [Mon, 10 Sep 2012 14:52:06 +0000 (16:52 +0200)]
python bindings: update generated vlc.py module (python3 compatible)

This new version is compatible (to some extent) with python3: the testsuite passes all tests, and the vlc.py standalone invocation works correctly.

There still are some tricky parts, that are mainly due to the change in string handling in python3.
All C API functions require byte strings as parameters, so all calls to vlc.libvlc_* methods should explicitly convert string parameters (using vlc.str_to_bytes() is the default encoding is OK).

Conversely, all C function returning char* values return byte strings, that have to be explicitly converted to python3 strings (using vlc.bytes_to_str()).

The OO-wrapper tries to address the most direct issues (i.e. you can call vlc.Media('foo') and it will work correctly), but a more general cleanup and conversion scheme should be devised. Contributions welcome.

5 years agopython bindings: add to explicit bytes_to_str conversions
Olivier Aubert [Mon, 10 Sep 2012 14:51:44 +0000 (16:51 +0200)]
python bindings: add to explicit bytes_to_str conversions

5 years agopython bindings: use assertTrue instead ot assert_
Olivier Aubert [Mon, 10 Sep 2012 14:47:52 +0000 (16:47 +0200)]
python bindings: use assertTrue instead ot assert_

assert_ is deprecated in python3

5 years agopython bindings: iterators API now requires the __next__() method instead of next()
Olivier Aubert [Mon, 10 Sep 2012 14:47:03 +0000 (16:47 +0200)]
python bindings: iterators API now requires the __next__() method instead of next()

Implement both so that the code is python2+3 compatible

5 years agopython bindings: fix print invocation
Olivier Aubert [Mon, 10 Sep 2012 14:43:23 +0000 (16:43 +0200)]
python bindings: fix print invocation

5 years agopython bindings: define test3 target for python3 bindings test
Olivier Aubert [Mon, 10 Sep 2012 14:41:17 +0000 (16:41 +0200)]
python bindings: define test3 target for python3 bindings test

5 years agopython bindings: convert string to bytes in logger test
Olivier Aubert [Mon, 10 Sep 2012 14:40:58 +0000 (16:40 +0200)]
python bindings: convert string to bytes in logger test

5 years agopython bindings: blacklist libvlc_printerr for now
Olivier Aubert [Mon, 10 Sep 2012 14:39:36 +0000 (16:39 +0200)]
python bindings: blacklist libvlc_printerr for now

5 years agopython bindings: explicitly convert string to bytes
Olivier Aubert [Mon, 10 Sep 2012 14:39:14 +0000 (16:39 +0200)]
python bindings: explicitly convert string to bytes

5 years agopython bindings: getch() returns a string, there is no decode() method
Olivier Aubert [Mon, 10 Sep 2012 14:38:53 +0000 (16:38 +0200)]
python bindings: getch() returns a string, there is no decode() method

5 years agopython bindings: automatically convert strings to bytes for python3
Olivier Aubert [Mon, 10 Sep 2012 14:38:17 +0000 (16:38 +0200)]
python bindings: automatically convert strings to bytes for python3

5 years agopython bindings: define common types/methods to unify string handling between python2...
Olivier Aubert [Mon, 10 Sep 2012 14:37:47 +0000 (16:37 +0200)]
python bindings: define common types/methods to unify string handling between python2 and 3

It does not properly solve all issues. Basically: python3 now treats
all strings as unicode strings, but the ctypes API conversion for
char* (ctypes.c_char_p) is mapped to byte strings. An explicit
conversion has to occur, but we have to specify the appropriate
encoding, which is hard to guess.

5 years agopython: make test.py python3 compliant
Olivier Aubert [Mon, 10 Sep 2012 14:35:44 +0000 (16:35 +0200)]
python: make test.py python3 compliant

5 years agopython bindings: PyFile_FromFile/AsFile are removed in python3. Use PyFile_FromFd...
Olivier Aubert [Mon, 10 Sep 2012 12:09:09 +0000 (14:09 +0200)]
python bindings: PyFile_FromFile/AsFile are removed in python3. Use PyFile_FromFd/PyObject_AsFileDescriptor

5 years agoUpdate generated module
Olivier Aubert [Thu, 14 Jun 2012 13:27:09 +0000 (15:27 +0200)]
Update generated module

5 years agopython bindings: fix docstring
Olivier Aubert [Thu, 14 Jun 2012 13:25:45 +0000 (15:25 +0200)]
python bindings: fix docstring