Video Capturing under Wine

Maarten Lankhorst m.b.lankhorst at gmail.com
Sat May 14 15:46:38 CDT 2005


James Hawkins wrote:

>On 5/14/05, Maarten Lankhorst <m.b.lankhorst at gmail.com> wrote:
>  
>
>>We are not windows, using HKLM/SYSTEM/.../msvideo would not be an option imho, because when should we write it? And what if you just connected your webcam and modprobe'd the drivers for it, it would make things too difficult. I think the best way is to use winmm like dsound/etc uses, and add a configure option in ~/.wine/config so you can select what video driver you want to use. Since I don't exactly know how winmm works, some insight in how (for example) the sound drivers in winmm are called/used would be more then welcome, since, unlike the rest of the stuff I worked upon until now was well documented, but I doubt winmm is...
>>
>>    
>>
>
>We are currently phasing out .wine/config.  The plan is to have
>winecfg ready by the end of June, and remove the config file at the
>same time.  winmm uses a location in the registry to determine which
>driver to use.  Writing to HKLM/SYSTEM/... etc is not out of the
>question;  the win32 api does it, and wine is an implementation of
>this api.  There are several possible times to right this registry
>data (I'm not here to say which one is best or correct).  It can be
>put in wine.inf which the registry is loaded from, or can be written
>during a DllRegisterServer call.
>  
>
Well, I think both methods wouldn't be the best way, in that case, you 
would have to restart whole wine as soon as a new webcam is modprobe'd, 
I know wine is a reimplementation of the windows api, but the drivers 
are very different from those in windows, because we don't have to call 
drivers directly now, but instead merely relay it to other driver 
models, I think using a wine-only dll would be best. Since there is only 
1 capture system per platform, we could use configure scripts to 
determine what capture driver to use, if any, and possibly allow clues 
with --with(out)-videocapture(=...). Currently I already use something 
similar:
- v4l.c (Compiled only if videodev.h (V4l) is found)
- null.c (Compiled only if videodev is not found)

Vfw driver dlls (in windows) apparantly start with vfw, so I suggest the 
name of the dll should be vfwwine.dll, and that we link to it from 
avicap32 and qcap.

Maarten Lankhorst



More information about the wine-devel mailing list