Multimedia extensions Framework

Roger Binns rogerb at rogerbinns.com
Mon May 24 14:54:47 EDT 2004


Dmitry Borisov wrote:
> At this time bullets 1-3 are implemented at 90%( http://pymedia.sourceforge.net ).
> Some functionality still in test, some still needs to be written.

External interfaces are also needed.  For example I need to convery to/from
Qualcomm's PureVoice format. They conveniently only provide a Windows binary
that will only accept particularly constrained wav files.  To do conversions,
I have to invoke the external binary (via Wine on Linux also works) and munge
everything through temporary files.

That is all a gross hack, but having some sort of "standard" external binary
callout mechanism will be nice.

> > From my prospective I want to be able to write drivers for USB devices in Python.
> > It may include:

You should be aware that userspace stuff just cannot match the speed of kernel
level drivers.  For some of the stuff you mentioned (eg camcorders, tv cards)
you will have to use kernel level drivers, or you will lose data.

For other stuff such as storage, you will just be a lot slower than a
kernel level driver.  (As an example I get about a 3rd the speed from
Python than kernel drivers when dealing with a device that is just
bulk data).

The other reason for having kernel level drivers is so that the
devices appear "normally" and can be used by other programs
(eg an audio device appearing as a normal OS level audio device).

> If anyone has any experience with doing USB specific bindings in Python or want
> to participate or give feedback,

I have already done a wrapper around libusb/libusb-win32.  It has been shipping
with my BitPim project on Windows, Linux and Mac for almost 8 months now.
Many other projects (such as Gphoto and Linux scanners) use libusb.

You can see the wrapper at http://cvs.sf.net/viewcvs.py/bitpim/bitpim/native/usb/
It does need a distutils wrapper around it all.  (I haven't done one myself
since there doesn't seem to be easy integration of Swig with distutils).

Roger






More information about the Python-list mailing list