English 中文(简体)
VLC/Python bindings?
原标题:

Does anyone know how to implement the VLC Python bindings? I downloaded vlc.py and vlcwidget.py from the VLC wiki (http://wiki.videolan.org/Python_bindings) and tried to run vlcwidget. Other than having vlc installed, do I need to do anything else, or should I just be able to run python vlcwidget.py ? Because that is not working for me. I m using Python2.5 and VLC 0.8.6e on Ubuntu 8.04.

The problem has to do with my libvlc shared library, I think. That library is used to create this instance:

dll=ctypes.CDLL( libvlc.so )

and then later, the error occurs here:

if hasattr(dll,  libvlc_media_player_new ): ...

dll apparently doesn t have a libvlc_media_player_new attribute and so fails to create other objects it needs. Specifically, the libvlc_media_player_new function isn t created.

最佳回答
$ git clone git://git.videolan.org/vlc.git && cd vlc
$ git log -Slibvlc_media_player_new
...
commit bf1292e44390c6469483cea3817d6c2a3dbd811c
Author: Pierre d Herbemont <pdherbemont@videolan.org>
Date:   Sun Mar 30 03:59:32 2008 +0200

    libvlc: rename libvlc_media_descriptor to libvlc_media and libvlc_media_instance to libvlc_media_player.

There was no libvlc_media_player_new prior to this commit, which went in some time between 0.8.4 and 0.9. (I m not sure when; VLC s git repository seems to be missing tags in that range.)

The Python bindings use the newer API. You ll have to upgrade VLC to use them.

问题回答

暂无回答




相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签