Re: MSN Webcam
On 5/18/05, Joaquín Fernández <[EMAIL PROTECTED]> wrote: > h... can you use a webcam in msn under wine If yes, can you explain > to me how to do it? > > I was not able to run msn messenger in wine. > http://wiki.winehq.com/MSN_Messenger_webcam_support -- James Hawkins
MSN Webcam
h... can you use a webcam in msn under wine If yes, can you explain to me how to do it? I was not able to run msn messenger in wine. Regards Joaquín -- -BEGIN PGP PUBLIC KEY BLOCK- Version: GnuPG v1.2.4 (GNU/Linux) mQFCBEFI/gARAwDd2+ojasT3rCyRktSw+Ix3m+yoxSD0NkpMLlunmJxwvn6wKZVl mDw76/Zu9mqDWWeSGdSl+60T7fDLrJZSEB45O9T5jdujj01GFeer7xuiuHBTFw8o CXqD/hzhqYc46ecAoIQQjZ2qZtOWLPRBbegK/nyOIguNAv9QGiKPLBS8o0ksxEUp EfLAExVmu6Zp693uKGf6XrBWNcLriuwRPr1mjy3N/bhMlqc3vcTeUBwxiUuX5h2P NQgB3d2AbJS6oEvhmZL0Bn/8Ij/MSvVrartmCXuw9eSx0aMC/R7Kw9TtUfxFVUGx fQKwoA9BXNElPLcNohbBS/fH87IMMxCJyn+rmTeNCEcUEQ7UgvVCdlzZ8+L4PdlH qGR81nhZVEwPRnSSesLpSHRC1QQVoceBeb7PICr/b2eZiKMX+bQ+Sm9hcXXDrW4g TWFudWVsIEZlcm7DoW5kZXogUXVpbGVzIDxqb2FxdWluQGNhc2FkZWFsYWJhbnph Lm9yZz6IXgQTEQIAHgUCQUj+AAIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRBH 677/q7xL4e15AJwNfSpeaXXMH2EjuKblfeBe51MrUgCcCP5jEnpXrDXLWULIW5yD t6VdHlU= =a8BM -END PGP PUBLIC KEY BLOCK-
Re: MSN Webcam
MediaHost (TM) wrote: Looks interesting! Any idea, when your patches get committed into the "official" releases? Maarten Lankhorst wrote: Status: Nearly complete, need testers. http://wiki.winehq.org/MSN_Messenger_webcam_support You need the native quartz dll, which get installed with internet explorer, as the builtin quartz doesn't work properly when changing media format on initialisation. Possibly a problem with the code I wrote. Can you provide more details on this? IFilterGraph Reconnect isn't implemented, and for some reason *looks strangely at Robert* instead of a FIXME() there's a TRACE telling it is a stub... I didn't write any of the IFilterGraph implementation, but you are right that it is crazy. Rob Writing some final bugfixes at the moment, so I think a matter of days before it'll be done in a state that julliard might commit.. There were 2 small reasons why builtin quartz wasn't working 1. if format changed, it would need to reconnect with new size (Quartz, submitted a patch) 2. if format wasn't changed, I used my own optimized code, that wrote 960 bytes to a wrong place, so it crashed. (Totally my fault) btw, nice name and signature...
Re: MSN Webcam
Maarten Lankhorst wrote: Status: Nearly complete, need testers. http://wiki.winehq.org/MSN_Messenger_webcam_support You need the native quartz dll, which get installed with internet explorer, as the builtin quartz doesn't work properly when changing media format on initialisation. Possibly a problem with the code I wrote. Can you provide more details on this? IFilterGraph Reconnect isn't implemented, and for some reason *looks strangely at Robert* instead of a FIXME() there's a TRACE telling it is a stub... I didn't write any of the IFilterGraph implementation, but you are right that it is crazy. Rob
MSN Webcam
Status: Nearly complete, need testers. http://wiki.winehq.org/MSN_Messenger_webcam_support You need the native quartz dll, which get installed with internet explorer, as the builtin quartz doesn't work properly when changing media format on initialisation. IFilterGraph Reconnect isn't implemented, and for some reason *looks strangely at Robert* instead of a FIXME() there's a TRACE telling it is a stub...
MSN Webcam patch
I am stuck on it, it seems that if I enable WINEDEBUG=+quartz it crashes THEORETICALLY, although wrong, this should be ok, since it doesn't disrupt anything BUT I asked others to test my patch, and unfortunately THEY weren't that lucky, it crashed, wether winedebug was enabled or not... so what I'm asking is, perhaps someone can find out what's wrong? I attached 4 files capturegraph.patch - implements icapturegraphbuilder (stubbed) quartzfix.patch - several fixes for quartz v4l.patch - implements the vfwcapture interface capture.c - in case you don't have a working v4l(2) device, i provided a version that doesn't actually do anything, while still invoking the crash just make sure you do 'regsvr32 quartz.dll' (with quartz = builtin) also devenum has to be builtin to invoke the crash: install msn messenger (you need internet explorer installed too) run msnmsgr with WINEDEBUG=+quartz,+qcap Unfortunately, I don't know how to fix this, and if this doesn't get fixed, it doesn't seem worth the effort to continue working on msn webcams :/ perhaps your shared minds at wineconf will be able to fix it, or those who stay at home ;) From what I can tell, the crash occurs in OutputPin_ConnectSpecific (wine/dlls/quartz/pin.c), exact line: hr = IPin_ReceiveConnection(pReceivePin, iface, pmt); I think pReceivePin is a pin provided by MSN messenger itself, so if it is a crash caused by differences between the quartz msn expects, and our implementation of quartz it will help to resolve cross-quartz differences (well that's the theory anyway :P) if this can't be fixed, I'll try to port this interface to qcap, where it should belong, but it it's not there because a lot of things from quartz is used.. which means i have to do a lot double...
msn webcam status
just thought I'd drop by and say how things are going.. i submitted a lot of patches already, and trying to get those commited, although they are not directly required for webcam support, they are meant to increase general stability, and fix some bugs: - dlls/avicap32: wrote a basic capgetdriverdescription (Trying to get it committed) - dlls/devenum: wrote videoinputdevice enumeration based on capgetdriverdescription (Trying to get it committed) - dlls/quartz: wrote some general fixes for filtergraph.c/pin.c added capturegraphbuilder interface (Trying to get those committed) of course, there's also the vfwcapture interface itself, after trying to get it to work with a real webcam, instead of the very flexible bttv driver, i came to the conclusion i needed to do some major background changes the vfwcapture interface itself won't change, because that part is now near perfect, but the stuff behind it is messy on itself, the interface is not useful, it needs the other fixes I posted above, so now I'm just waiting until those patches are implemented, my disk is getting too full with all those patches (only semi joking, i'm losing track of them..)
MSN Webcam patch (New: Now WITH Completely randomly transmitted images)
SInce stuff is missing from msvideo (ICSeqCompressFrame{Start,,Stop}) you have to use native MSVFW32.DLL This will crash when you stop msn webcam (Because of the CreateThread continuing to run) In general it is very unstable, but at least it proves you can use 'webcam's under wine. How does it work? apply patch set quartz, qcap and devenum to builtin (qcap just to be sure..) set msvfw32 to native (and make sure you have a native msvfw32) regsvr32 quartz.dll Run msn messenger (I tested it with MSN 6.2, dutch version, not sure wether it will work under 7.0) Now you can use the 'webcam' If you want, you can even make some patterns by changing the following lines in capture.c ;) for (pl0ink = 0;pl0ink < 320*240*3;pl0ink++) myData[pl0ink] = (BYTE) (rand() % 256); This patch is not very stable yet, but it's still a work in progress.. If anyone got some links to gstreamer tutorials that would help me with this, I would happily accept :) diff -Nru wine-old/dlls/devenum/createdevenum.c wine-new/dlls/devenum/createdevenum.c --- wine-old/dlls/devenum/createdevenum.c 2005-01-25 11:56:39.0 +0100 +++ wine-new/dlls/devenum/createdevenum.c 2005-04-15 21:23:47.0 +0200 @@ -117,6 +117,7 @@ if (IsEqualGUID(clsidDeviceClass, &CLSID_AudioRendererCategory) || IsEqualGUID(clsidDeviceClass, &CLSID_AudioInputDeviceCategory) || +IsEqualGUID(clsidDeviceClass, &CLSID_VideoInputDeviceCategory) || IsEqualGUID(clsidDeviceClass, &CLSID_MidiRendererCategory)) { hbasekey = HKEY_CURRENT_USER; @@ -142,6 +143,7 @@ { if (IsEqualGUID(clsidDeviceClass, &CLSID_AudioRendererCategory) || IsEqualGUID(clsidDeviceClass, &CLSID_AudioInputDeviceCategory) || +IsEqualGUID(clsidDeviceClass, &CLSID_VideoInputDeviceCategory) || IsEqualGUID(clsidDeviceClass, &CLSID_MidiRendererCategory)) { HRESULT hr = DEVENUM_CreateSpecialCategories(); @@ -413,6 +415,7 @@ CoTaskMemFree(pTypes); } } +res = DEVENUM_CreateAMCategoryKey(&CLSID_VideoInputDeviceCategory); } if (pMapper) diff -Nru wine-old/dlls/devenum/devenum_main.c wine-new/dlls/devenum/devenum_main.c --- wine-old/dlls/devenum/devenum_main.c2004-12-07 15:37:11.0 +0100 +++ wine-new/dlls/devenum/devenum_main.c2005-04-15 21:23:47.0 +0200 @@ -122,7 +122,7 @@ {&CLSID_AudioCompressorCategory, acmcat, TRUE}, {&CLSID_VideoCompressorCategory, vidcat, TRUE}, {&CLSID_LegacyAmFilterCategory, filtcat, TRUE}, - {&CLSID_VideoInputDeviceCategory, vfwcat, FALSE}, + {&CLSID_VideoInputDeviceCategory, vfwcat, TRUE}, {&CLSID_AudioInputDeviceCategory, wavein, FALSE}, {&CLSID_AudioRendererCategory, waveout, FALSE}, {&CLSID_MidiRendererCategory, midiout, FALSE}, @@ -156,7 +156,7 @@ pMapper = (IFilterMapper2*)mapvptr; -IFilterMapper2_CreateCategory(pMapper, &CLSID_VideoInputDeviceCategory, MERIT_DO_NOT_USE, friendlyvidcap); +IFilterMapper2_CreateCategory(pMapper, &CLSID_VideoInputDeviceCategory, MERIT_NORMAL, friendlyvidcap); IFilterMapper2_CreateCategory(pMapper, &CLSID_LegacyAmFilterCategory, MERIT_NORMAL, friendlydshow); IFilterMapper2_CreateCategory(pMapper, &CLSID_VideoCompressorCategory, MERIT_DO_NOT_USE, friendlyvidcomp); IFilterMapper2_CreateCategory(pMapper, &CLSID_AudioInputDeviceCategory, MERIT_DO_NOT_USE, friendlyaudcap); diff -Nru wine-old/dlls/msvideo/msvideo_main.c wine-new/dlls/msvideo/msvideo_main.c --- wine-old/dlls/msvideo/msvideo_main.c2005-02-17 12:51:01.0 +0100 +++ wine-new/dlls/msvideo/msvideo_main.c2005-04-17 20:35:19.0 +0200 @@ -1132,7 +1132,7 @@ } /*** - * ICSeqCompressFrameEnd [EMAIL PROTECTED] + * ICSeqCompressFrameStart [EMAIL PROTECTED] */ BOOL VFWAPI ICSeqCompressFrameStart(PCOMPVARS pc, LPBITMAPINFO lpbiIn) { diff -Nru wine-old/dlls/quartz/capture.c wine-new/dlls/quartz/capture.c --- wine-old/dlls/quartz/capture.c 1970-01-01 01:00:00.0 +0100 +++ wine-new/dlls/quartz/capture.c 2005-04-17 17:32:58.0 +0200 @@ -0,0 +1,166 @@ +/* DirectShow capture services (QUARTZ.DLL) + * + * Copyright 2005 Maarten Lankhorst + * + * This file contains the (internal) driver registration functions, + * driver enumeration APIs and DirectDraw creation functions. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it wil
Re: Wine msn webcam patch (Attempt 2)
Maarten Lankhorst wrote: I've been trying to get msn webcam to work again, and I found out that WINEDEBUG=+quartz gives a crash when msn creates a pin, and then does some stuff with it, I can only presume some TRACE or WARNING causes the error, but the effect is I can't use those commands, this patch currently allows MSN preview screen to become gray, but it's not actually sending any information (not even fake images) to msn's webcam pin, if someone can find where exactly it crashes, it would help a lot, and make it a lot easier for me to actually implement a working webcam (Right now it will probably only work for msn messenger, but I can imagine other programs will work with this too in a future version) This file makes changes to qcap, but they are not needed for the process as far as I know Hi Maarten, Thanks for your work on devenum,quartz and qcap. I have some comments in addition to the ones Mike has already made. diff -Nru wine-old/dlls/devenum/createdevenum.c wine-new/dlls/devenum/createdevenum.c --- wine-old/dlls/devenum/createdevenum.c 2005-01-25 11:56:39.0 +0100 +++ wine-new/dlls/devenum/createdevenum.c 2005-04-09 16:10:47.0 +0200 @@ -117,6 +117,7 @@ if (IsEqualGUID(clsidDeviceClass, &CLSID_AudioRendererCategory) || IsEqualGUID(clsidDeviceClass, &CLSID_AudioInputDeviceCategory) || +IsEqualGUID(clsidDeviceClass, &CLSID_VideoInputDeviceCategory) || IsEqualGUID(clsidDeviceClass, &CLSID_MidiRendererCategory)) { hbasekey = HKEY_CURRENT_USER; @@ -142,6 +143,7 @@ { if (IsEqualGUID(clsidDeviceClass, &CLSID_AudioRendererCategory) || IsEqualGUID(clsidDeviceClass, &CLSID_AudioInputDeviceCategory) || +IsEqualGUID(clsidDeviceClass, &CLSID_VideoInputDeviceCategory) || IsEqualGUID(clsidDeviceClass, &CLSID_MidiRendererCategory)) { HRESULT hr = DEVENUM_CreateSpecialCategories(); @@ -413,6 +415,7 @@ CoTaskMemFree(pTypes); } } +res = DEVENUM_CreateAMCategoryKey(&CLSID_VideoInputDeviceCategory); I'm not sure these changes are correct. If you go down the same route as done for the MIDI, wave in and wave out devices then you have to enumerate the video input devices and create keys for them here, but there is no clean way of doing this. pMapper = (IFilterMapper2*)mapvptr; -IFilterMapper2_CreateCategory(pMapper, &CLSID_VideoInputDeviceCategory, MERIT_DO_NOT_USE, friendlyvidcap); +IFilterMapper2_CreateCategory(pMapper, &CLSID_VideoInputDeviceCategory, MERIT_NORMAL, friendlyvidcap); IFilterMapper2_CreateCategory(pMapper, &CLSID_LegacyAmFilterCategory, MERIT_NORMAL, friendlydshow); IFilterMapper2_CreateCategory(pMapper, &CLSID_VideoCompressorCategory, MERIT_DO_NOT_USE, friendlyvidcomp); IFilterMapper2_CreateCategory(pMapper, &CLSID_AudioInputDeviceCategory, MERIT_DO_NOT_USE, friendlyaudcap); This change is wrong. The video input category is MERIT_DO_NOT_USE on both my Win2k and WinXP systems (tested with a webcam on the WinXP system too). This makes sense because you don't want capture devices to be automatically included in a filter graph to satisfy some requirement of some filter. If the MSN webcam won't work without this change then there is a bug elsewhere. +/* AMStreamConfig interface, we only need to implement {G,S}etFormat */ +static HRESULT WINAPI AMStreamConfig_QueryInterface(IAMStreamConfig * iface, REFIID riid, LPVOID * ppv) +{ + FIXME("%p: stub, not worth the effort\n", iface); + return S_OK; +} I'll implement it for you: { if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IAMStreamConfig)) { *ppv = (LPVOID)iface; return S_OK; } FIXME("No interface for iid %s\n", debugstr_guid(riid)); return E_NOINTERFACE; } + +static ULONG WINAPI AMStreamConfig_AddRef(IAMStreamConfig * iface) +{ + FIXME("%p: stub, not worth the effort\n", iface); + return 1; +} Again, you should implement this: return InterlockedIncrement(&This->refs); + +static ULONG WINAPI AMStreamConfig_Release(IAMStreamConfig * iface) +{ + FIXME("%p: stub, not worth the effort\n", iface); + return 1; +} + You should implement this too. +static HRESULT WINAPI AMStreamConfig_SetFormat(IAMStreamConfig *iface, + AM_MEDIA_TYPE *pmt) { + ERR("%p: %p stub !!\n", iface, pmt); + return E_NOTIMPL; +} Use FIXME instead of ERR. + +static HRESULT WINAPI AMStreamConfig_GetFormat(IAMStreamConfig *iface, + AM_MEDIA_TYPE **pmt) { + ERR("%p: %p stub !!\n", iface, pmt); + // FIXME: The stuff below is just there so it contains something Again, use FIXME. Don't use C99 comments
Re: Wine msn webcam patch (Attempt 2)
Hi Maarten, Maarten Lankhorst wrote: I've been trying to get msn webcam to work again, and I found out that Cool! The next step is probably to break up your patch a little, and submit it in smaller chunks. If you'd like I'm willing to help you do that. diff -Nru wine-old/dlls/devenum/createdevenum.c wine-new/dlls/devenum/createdevenum.c diff -Nru wine-old/dlls/devenum/devenum_main.c wine-new/dlls/devenum/devenum_main.c These two look like one chunk. diff -Nru wine-old/dlls/qcap/main.c wine-new/dlls/qcap/main.c diff -Nru wine-old/dlls/qcap/Makefile.in wine-new/dlls/qcap/Makefile.in diff -Nru wine-old/dlls/qcap/qcap_main.c wine-new/dlls/qcap/qcap_main.c diff -Nru wine-old/dlls/qcap/qcap_private.h wine-new/dlls/qcap/qcap_private.h diff -Nru wine-old/dlls/qcap/qcap.spec wine-new/dlls/qcap/qcap.spec diff -Nru wine-old/dlls/qcap/regsvr.c wine-new/dlls/qcap/regsvr.c And one more chunk. You might reconsider deleting qcap_main.c, and instead add you main.c implementation in there. +/** + * DirectShow ClassFactory + */ +typedef struct { +IClassFactory ITF_IClassFactory; + +DWORD ref; +HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj); +} IClassFactoryImpl; ClassFactories don't need to be allocated and freed, so it's sufficient to use a statically allocated IClassFactoryImpl, where AddRef and Release return 2 and 1 respectively. + * Copyright 2005 You need to add your name after the copyright. diff -Nru wine-old/dlls/quartz/capturegraph.c wine-new/dlls/quartz/capturegraph.c diff -Nru wine-old/dlls/quartz/filesource.c wine-new/dlls/quartz/filesource.c diff -Nru wine-old/dlls/quartz/filtergraph.c wine-new/dlls/quartz/filtergraph.c diff -Nru wine-old/dlls/quartz/main.c wine-new/dlls/quartz/main.c diff -Nru wine-old/dlls/quartz/Makefile.in wine-new/dlls/quartz/Makefile.in diff -Nru wine-old/dlls/quartz/quartz_private.h wine-new/dlls/quartz/quartz_private.h diff -Nru wine-old/dlls/quartz/regsvr.c wine-new/dlls/quartz/regsvr.c diff -Nru wine-old/dlls/quartz/v4wsource.c wine-new/dlls/quartz/v4wsource.c And this looks like it's still a bit of a work in progress. There's probably quite a few patches in there. +/* Copyright 2005 Maarten Lankhorst, Goal is to get MSN's webcam function to work.. Better to put the description on one line first, and the Copyright message below it, as described in the COPYING file on line 473. + return E_FAIL; return E_NOIMPL for stuff that isn't implemented. +static HRESULT WINAPI CaptureGraphBuilder_FindInterface(ICaptureGraphBuilder * iface, const GUID *pCategory, IBaseFilter *pf, REFIID riid, void **ppint) +{ + struct CaptureGraphImpl *This = (CaptureGraphImpl *)iface; + TRACE("%p: %s .. %p .. %s .. %p - unwanted untested unguaranteed unwarranted unreliable stub workaround!\n", iface, qzdebugstr_guid(pCategory), pf, qzdebugstr_guid(riid), *ppint); + return IBaseFilter_QueryInterface(pf, riid, ppint); + /* Looks for the specified interface on the filter, upstream and downstream from the filter, and, optionally, only on the output pin of the given category. */ +} Keeping you lines short will make it easier to read. --- wine-old/dlls/quartz/Makefile.in2005-02-10 18:13:18.0 +0100 +++ wine-new/dlls/quartz/Makefile.in2005-04-09 16:11:35.0 +0200 @@ -28,6 +28,8 @@ systemclock.c \ transform.c \ videorenderer.c \ + v4wsource.c \ + capturegraph.c \ waveparser.c Better keep the list in alphabetical order. + * LETS SING IT ALL TOGETHER NOW! ON MY MARK! + * COM SUCKS ASS! Indeed :) diff -Nru wine-old/include/axextend.idl wine-new/include/axextend.idl +interface IAMStreamConfig : IUnknown We've added this one for you already (in the CVS). Mike
Re: MSN Webcam patch
Vladdy Impaler wrote: RIght now I'm working on a patch so I can use my webcam under wine without having to switch to unix or use non-working solutions.. Right now there are 2 patches needed to get MSN to connect to the internet: first is to disable SSL, second strcpy's a value at urlmon getuseragent or something To get this to work, a few modifications to existing files are needed: First of all, if the catagory exists, let devenum return all from videoinput catagory: diff -Nru /root/wine-20050211/dlls/devenum/createdevenum.c wine-20050211/dlls/devenum/createdevenum.c --- /root/wine-20050211/dlls/devenum/createdevenum.c2005-01-25 11:56:39.0 +0100 +++ wine-20050211/dlls/devenum/createdevenum.c 2005-03-15 00:15:47.0 +0100 @@ -117,7 +117,8 @@ if (IsEqualGUID(clsidDeviceClass, &CLSID_AudioRendererCategory) || IsEqualGUID(clsidDeviceClass, &CLSID_AudioInputDeviceCategory) || -IsEqualGUID(clsidDeviceClass, &CLSID_MidiRendererCategory)) +IsEqualGUID(clsidDeviceClass, &CLSID_MidiRendererCategory) || +IsEqualGUID(clsidDeviceClass, &CLSID_VideoInputDeviceCategory)) { hbasekey = HKEY_CURRENT_USER; strcpyW(wszRegKey, wszActiveMovieKey); and a few other patches to devenum main (Not sure if those are needed) diff -Nru /root/wine-20050211/dlls/devenum/devenum_main.c wine-20050211/dlls/devenum/devenum_main.c --- /root/wine-20050211/dlls/devenum/devenum_main.c 2004-12-07 15:37:11.0 +0100 +++ wine-20050211/dlls/devenum/devenum_main.c 2005-03-15 00:15:47.0 +0100 @@ -122,7 +122,7 @@ {&CLSID_AudioCompressorCategory, acmcat, TRUE}, {&CLSID_VideoCompressorCategory, vidcat, TRUE}, {&CLSID_LegacyAmFilterCategory, filtcat, TRUE}, - {&CLSID_VideoInputDeviceCategory, vfwcat, FALSE}, + {&CLSID_VideoInputDeviceCategory, vfwcat, TRUE}, {&CLSID_AudioInputDeviceCategory, wavein, FALSE}, {&CLSID_AudioRendererCategory, waveout, FALSE}, {&CLSID_MidiRendererCategory, midiout, FALSE}, @@ -156,7 +156,7 @@ pMapper = (IFilterMapper2*)mapvptr; -IFilterMapper2_CreateCategory(pMapper, &CLSID_VideoInputDeviceCategory, MERIT_DO_NOT_USE, friendlyvidcap); +IFilterMapper2_CreateCategory(pMapper, &CLSID_VideoInputDeviceCategory, MERIT_NORMAL, friendlyvidcap); IFilterMapper2_CreateCategory(pMapper, &CLSID_LegacyAmFilterCategory, MERIT_NORMAL, friendlydshow); IFilterMapper2_CreateCategory(pMapper, &CLSID_VideoCompressorCategory, MERIT_DO_NOT_USE, friendlyvidcomp); IFilterMapper2_CreateCategory(pMapper, &CLSID_AudioInputDeviceCategory, MERIT_DO_NOT_USE, friendlyaudcap); I wanted to put all custom code into qcap, but because of the pins that's not possible. MultiMedia streams (amstream.dll) use a special filter that will need pins too so we may consider sharing them (as well as common Direct Show stuff) in a separate lib. I think Alexandre will not like it but I don't see other solution to prevent this code duplication. Christian
Re: MSN Webcam patch
I have to be off somewhere in a few minutes (hence me being up this early), so I'll make this quick ;-) I wrote a couple of patches for webcam support too a while back, and gave these to some people who were asking for them, so I thought I'd share them here now, to also provide some input on it - mind you that I haven't worked on this for a while now, so it's not really as fresh in my memory anymore, but with this rece- nt interest in it I guess I'll start looking into it again too. Of course MSN still crashes after it's signed in .. but that's beside the point here, really now ;-) Would be nice to get the webcam preview stuff working tho, and make some headway with V4L and Wine along the way. Some of the things that you've changed I've changed, but aren't in the patches below - I really should document what I change as I go along ;-) Most of the major changes are there though. I also got stuck at qcap, but ended up simply using a native DLL for that. Again, I was really just tinkering along, seeing how far I could go without having to implement some major interface, using both native and builtin DLLs. Anyway, I'll see if I can find some time tomorrow to look back into it; I did have a lot of fun hacking on Wine, and indespite of my inexperience regarding DirectX, I'll try to contribute back some more useful patches, hopefully ulti- mately getting that webcam support working. Kind regards, Jasper - Forwarded message from Jasper van Veghel <[EMAIL PROTECTED]> - Date: Sat, 15 Jan 2005 14:18:47 +0100 From: Jasper van Veghel <[EMAIL PROTECTED]> To: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: video4linux - wine Hey Luis, Robbert, It's been a few weeks ago since I've worked on this stuff; I wrote some note- worthy patches and some hacks to get MSN working; I'll let you decide what's what ;-) In dlls/wininet/ I made the following two changes; The first is to get it to connect to MSN (not camera-related), as it tries to send text over SSL for some reason.. not sure if this is necessary (anymore) though, with rsabase and all: --- netconnection.c.old 2005-01-15 13:46:46.0 +0100 +++ netconnection.c 2004-12-14 22:38:19.0 +0100 @@ -104,7 +104,7 @@ void NETCON_init(WININET_NETCONNECTION *connection, BOOL useSSL) { -connection->useSSL = useSSL; +connection->useSSL = /*useSSL*/0; connection->socketFD = -1; if (connection->useSSL) { Note the date on those files by the way; they were taken from CVS around 12/14/04, so it's not a complete diff to the recent CVS. This one takes care of an unknown / undocumented optionId in InternetSetOptionAW that MSN uses in dlls/wininet/: --- internet.c.old 2005-01-15 13:55:56.0 +0100 +++ internet.c 2004-12-14 17:29:42.0 +0100 @@ -1962,6 +1962,9 @@ case INTERNET_OPTION_CONNECTED_STATE: FIXME("Option INTERNET_OPTION_CONNECTED_STATE: STUB\n"); break; +case 87: + FIXME("Undocumented option 87: STUB\n"); + break; default: FIXME("Option %ld STUB\n",dwOption); INTERNET_SetLastError(ERROR_INVALID_PARAMETER); Of more interest might be this change to dlls/devenum/createdevenum.c: --- createdevenum.c.old 2005-01-15 14:02:24.0 +0100 +++ createdevenum.c 2004-12-27 22:07:27.0 +0100 @@ -117,7 +117,8 @@ if (IsEqualGUID(clsidDeviceClass, &CLSID_AudioRendererCategory) || IsEqualGUID(clsidDeviceClass, &CLSID_AudioInputDeviceCategory) || -IsEqualGUID(clsidDeviceClass, &CLSID_MidiRendererCategory)) +IsEqualGUID(clsidDeviceClass, &CLSID_MidiRendererCategory) || + IsEqualGUID(clsidDeviceClass, &CLSID_VideoInputDeviceCategory)) { hbasekey = HKEY_CURRENT_USER; strcpyW(wszRegKey, wszActiveMovieKey); @@ -142,7 +143,8 @@ { if (IsEqualGUID(clsidDeviceClass, &CLSID_AudioRendererCategory) || IsEqualGUID(clsidDeviceClass, &CLSID_AudioInputDeviceCategory) || -IsEqualGUID(clsidDeviceClass, &CLSID_MidiRendererCategory)) +IsEqualGUID(clsidDeviceClass, &CLSID_MidiRendererCategory) || + IsEqualGUID(clsidDeviceClass, &CLSID_VideoInputDeviceCategory)) { HRESULT hr = DEVENUM_CreateSpecialCategories(); if (FAILED(hr)) @@ -411,6 +413,55 @@ CoTaskMemFree(pTypes); } } + +res = DEVENUM_CreateAMCategoryKey(&CLSID_VideoInputDeviceCategory); +if (SUCCEEDED(res)) { /* can register device(s) in this category */ + for (i = 0; i < 10; i++) { // the index can range from 0 thru 9 + WCHAR szDeviceName[80], szDeviceVersion[80]; + + if (capGetDriverDescriptionW ((WORD) i, + szDeviceName, sizeof (szDeviceName), + szDeviceVersion, sizeof (szDeviceVersion))) { + IMoniker * pMoniker = NULL; + + TRAC
MSN Webcam patch
RIght now I'm working on a patch so I can use my webcam under wine without having to switch to unix or use non-working solutions.. Right now there are 2 patches needed to get MSN to connect to the internet: first is to disable SSL, second strcpy's a value at urlmon getuseragent or something To get this to work, a few modifications to existing files are needed: First of all, if the catagory exists, let devenum return all from videoinput catagory: diff -Nru /root/wine-20050211/dlls/devenum/createdevenum.c wine-20050211/dlls/devenum/createdevenum.c --- /root/wine-20050211/dlls/devenum/createdevenum.c2005-01-25 11:56:39.0 +0100 +++ wine-20050211/dlls/devenum/createdevenum.c 2005-03-15 00:15:47.0 +0100 @@ -117,7 +117,8 @@ if (IsEqualGUID(clsidDeviceClass, &CLSID_AudioRendererCategory) || IsEqualGUID(clsidDeviceClass, &CLSID_AudioInputDeviceCategory) || -IsEqualGUID(clsidDeviceClass, &CLSID_MidiRendererCategory)) +IsEqualGUID(clsidDeviceClass, &CLSID_MidiRendererCategory) || +IsEqualGUID(clsidDeviceClass, &CLSID_VideoInputDeviceCategory)) { hbasekey = HKEY_CURRENT_USER; strcpyW(wszRegKey, wszActiveMovieKey); and a few other patches to devenum main (Not sure if those are needed) diff -Nru /root/wine-20050211/dlls/devenum/devenum_main.c wine-20050211/dlls/devenum/devenum_main.c --- /root/wine-20050211/dlls/devenum/devenum_main.c 2004-12-07 15:37:11.0 +0100 +++ wine-20050211/dlls/devenum/devenum_main.c 2005-03-15 00:15:47.0 +0100 @@ -122,7 +122,7 @@ {&CLSID_AudioCompressorCategory, acmcat, TRUE}, {&CLSID_VideoCompressorCategory, vidcat, TRUE}, {&CLSID_LegacyAmFilterCategory, filtcat, TRUE}, - {&CLSID_VideoInputDeviceCategory, vfwcat, FALSE}, + {&CLSID_VideoInputDeviceCategory, vfwcat, TRUE}, {&CLSID_AudioInputDeviceCategory, wavein, FALSE}, {&CLSID_AudioRendererCategory, waveout, FALSE}, {&CLSID_MidiRendererCategory, midiout, FALSE}, @@ -156,7 +156,7 @@ pMapper = (IFilterMapper2*)mapvptr; -IFilterMapper2_CreateCategory(pMapper, &CLSID_VideoInputDeviceCategory, MERIT_DO_NOT_USE, friendlyvidcap); +IFilterMapper2_CreateCategory(pMapper, &CLSID_VideoInputDeviceCategory, MERIT_NORMAL, friendlyvidcap); IFilterMapper2_CreateCategory(pMapper, &CLSID_LegacyAmFilterCategory, MERIT_NORMAL, friendlydshow); IFilterMapper2_CreateCategory(pMapper, &CLSID_VideoCompressorCategory, MERIT_DO_NOT_USE, friendlyvidcomp); IFilterMapper2_CreateCategory(pMapper, &CLSID_AudioInputDeviceCategory, MERIT_DO_NOT_USE, friendlyaudcap); I wanted to put all custom code into qcap, but because of the pins that's not possible. I wrote a basic stub for CaptureGraphBuilder and added it and regsvr calls to qcap. There s no current implementation of qcap, so therefore I added my gzipped qcap.tgz as an attachment (To keep things simple) My current implementation of the actual interface was based on filesource.c, so i made some functions and struct defs global in quartz: diff -Nru /root/wine-20050211/dlls/quartz/filesource.c wine-20050211/dlls/quartz/filesource.c --- /root/wine-20050211/dlls/quartz/filesource.c2005-01-06 20:36:47.0 +0100 +++ wine-20050211/dlls/quartz/filesource.c 2005-03-15 00:15:47.0 +0100 @@ -663,17 +663,6 @@ FileSource_GetCurFile }; - -/* the dwUserData passed back to user */ -typedef struct DATAREQUEST -{ -IMediaSample * pSample; /* sample passed to us by user */ -DWORD_PTR dwUserData; /* user data passed to us */ -OVERLAPPED ovl; /* our overlapped structure */ - -struct DATAREQUEST * pNext; /* next data request in list */ -} DATAREQUEST; - void queue(DATAREQUEST * pHead, DATAREQUEST * pItem) { DATAREQUEST * pCurrent; diff -Nru /root/wine-20050211/dlls/quartz/quartz_private.h wine-20050211/dlls/quartz/quartz_private.h --- /root/wine-20050211/dlls/quartz/quartz_private.h2005-02-10 18:13:18.0 +0100 +++ wine-20050211/dlls/quartz/quartz_private.h 2005-03-15 00:15:47.0 +0100 @@ -52,8 +52,8 @@ HRESULT QUARTZ_CreateSystemClock(IUnknown * pUnkOuter, LPVOID * ppv); HRESULT ACMWrapper_create(IUnknown * pUnkOuter, LPVOID * ppv); HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv); - HRESULT EnumMonikerImpl_Create(IMoniker ** ppMoniker, ULONG nMonikerCount, IEnumMoniker ** ppEnum); +HRESULT VfwCapture_create(IUnknown * pUnkOuter, LPVOID * ppv); typedef struct tagENUMPINDETAILS { @@ -80,4 +80,14 @@ BOOL CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE * pmt2, BOOL bWildcards); void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE * pmt); +typedef struct DATAREQUEST +{ +IMediaSample * pSample; /* sample passed to us by user */ +DWORD_PTR dwUserData; /* user data passed to us */ +OVERLAPPED ovl; /* our overlapped structure */ + +struct DATAREQUEST * pNext; /* next data request in list */ +} DATAREQUEST; + +void q