[vlc-devel] [PATCH] libdc1394 V2 updates for dc1394 access module

Rob Shortt rob at tvcentric.com
Mon May 14 22:10:36 CEST 2007


Hello list!

I just joined the list but I was speaking to Andrea Guzzo off list about 
these updates.  As promissed, here is my work.

I saw in the list archives you were concerned about supporting both the 
new and old APIs since not all (hardly any) distros are shipping the new 
library.  However, I did not realize this until too late.  My copy only 
works with the new API.  Also, FYI, the new version is made so it may 
install alongside the old one without conflicts.  Therefore it may be 
easy to add a check to configure and keep two separate dc1394 access 
modules, depricating the old one... that's just an idea that popped into 
my head right now.

Here are some quick notes about these changes:

-This was tested with a Unibrain Fire-i cam.
- You may find the V2 migration guide at: 
http://damien.douxchamps.net/ieee1394/libdc1394/v1.x/migration_v1_v2.php
-I tried to duplicate the existing coding style as much as I could.
-ISO channel handling is automatic.
-DMA is automatic.  All of the DMA / non-DMA functions are rolled into one.
-many struct and constants changes
-I renamed the capture= option to vdev= because the device assignment is 
automatic, and following api changes.
-Added option buffers= to change the # of DMA buffers.  1 is the default.
-The library makes camera scanning easier.
-With the new API format and resolution are rolled into one property, 
"mode".  I handle combining them when parsing the options.
-Added option "resetbus" because I found that when attempting 
unsupported modes subsequent tests failed with a "no bandwidth" error. 
Resetting the ieee1394 bus solves the problem.
-audio muxing may need more testing but I didn't fiddle with that.

Questions:

-Do the VLC internals use the p_sys->width and height variables?  If 
not, they can be removed.

-What about format conversions?  I see there's an unused function, 
MovePixelUYVY().


I think that's all...  My C skills aren't the best but things went 
pretty smooth.  The new API is easy to use.  If you have any questions 
please ask.  I have left a few TODO items in place.  I have attached a 
patch and new file for your convenience (may depend on how you'd like to 
integrate it).

Thanks for the great project, VLC rocks!
-Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vlc-access_dc1394-libdc1394_V2-01.patch
Type: text/x-patch
Size: 31322 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070514/bdba03b6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dc1394.c
Type: text/x-csrc
Size: 29661 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070514/bdba03b6/attachment.c>


More information about the vlc-devel mailing list