[vlc-devel] simple question about binding-python

Guillaume GENS guillaume.gens at gmail.com
Wed Mar 25 15:07:27 CET 2009

On Tue, Mar 24, 2009 at 11:34 PM, Olivier Aubert <
olivier.aubert at liris.cnrs.fr> wrote:

> > question, when you call one instance of libvlc from binding-python:
> > - GIL is lock into libvlc.so ?
> > - this instance is threading ouside of GIL? (VLM is independant of
> > GIL ? in other process ?)
> The GIL is released only in the mediacontrol API. The libvlc API (and
> VLM) has no such code. Cannot remember if there was any good reason for
> this in fact. Grep the bindings code for Py_BEGIN_ALLOW_THREADS for more
> details.

ok so if i undersand this macro Py_BEGIN_ALLOW_THREADS (in vlc_instance.c &
vlc_mdeiacontrol.c),Instance is threading in current python session even
when program run a play stream. right?
it's no nice if the python program is big with also several thread :S (any
idea ? within a new process with multiprosessing library?)

> > ... and bonus question, what strengths & weaknesses to use python
> > binding libvlc instead to VLC telnet console ? (an opinion?)
> The ability to program?
> o.

yes, because i'm working in vlc.Instance at the moment i try 2 codes

import vlc
vlm = vlc.Instance('')
vlm_session = vlc.MediaControl(vlm)
... (and here i don't know how to redirect the stream to IP@ instead visual
windows embedded and when i set_visual(0) I trap in error)

import vlc
vlm = vlc.Instance('')
... ok it's good but i can't take a snapshoot with this method and i want

in this 2 cases, i don't know how to do for send AND record the same stream
( ... and take a snapshoot stream on fly)

in pydoc, i found
(name=str, output=str)       Add a media's input MRLin argument, it's a
input stream or output stream ? (or just an error in docstring ?)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090325/46c1c85f/attachment.html>

More information about the vlc-devel mailing list