From: Alexander Prado on 22 Feb 2005 11:45 Hi There! I am a newbie in Driver Development, so I think my doubt is simple. What I need is a virtual driver for capturing desktop window (applications must see it as a webcam). I have installed DDK and realized that TESTCAP (DDK ýs sample) has all I need - except that this driver doesn't capture anything (it only shows color bars). So, I have thought that all I would have to do was to change the core function "ImageSynth" (in capxfer.c), including a screen capture method and to make some simple changes... I have been trying to use GDI for capturing the screen, and likely that's the problem. In order to debug, I have commented all the code in "ImageSynth", except the following commands, but I have no success (the driver is successfully compiled and installed, but Windows shows a message "Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39)". void ImageSynth ( IN OUT PHW_STREAM_REQUEST_BLOCK pSrb, IN ImageXferCommands Command, IN BOOL FlipHorizontal ) { // IF THE FOLLOWING COMMANDS ARE COMMENTED, DRIVER WORKS FINE! HDC hdcScreen; hdcScreen = CreateDC("DISPLAY", NULL, NULL, NULL); DeleteDC(hdcScreen); } Does anybody could help me to do this job? I would prefer starting from either a DDK sample or another source code available. Thanks in advance. Alex
From: Calvin Guan on 22 Feb 2005 11:51 "Alexander Prado" <marteletto(a)hotmail.com> wrote in message news:OzQVf0PGFHA.3792(a)TK2MSFTNGP10.phx.gbl... [snip] > Does anybody could help me to do this job? Is this a production driver? Are you saying you want a consultant/contractor for the work? -- Calvin Guan Software Engineer/Radeon NT Drivers ATI Technologies Inc. Markham ON, Canada www.ati.com
From: Alexander Prado on 22 Feb 2005 12:03 Calvin, Thanks for your quit answear! Firstly I would try do develop by myself, so I would like to receive some help. In a second moment, if I really do not be able to do this job, I would evaluate contract a third party. Best Regards, Alex "Calvin Guan" <cguan(a)pleasenospam.ati.com> wrote in message news:#dbjB7PGFHA.2180(a)TK2MSFTNGP10.phx.gbl... > "Alexander Prado" <marteletto(a)hotmail.com> wrote in message > news:OzQVf0PGFHA.3792(a)TK2MSFTNGP10.phx.gbl... > > [snip] > > Does anybody could help me to do this job? > > Is this a production driver? > Are you saying you want a consultant/contractor for the work? > > -- > Calvin Guan Software Engineer/Radeon NT Drivers > ATI Technologies Inc. Markham ON, Canada www.ati.com > >
From: Maxim S. Shatskih on 24 Feb 2005 11:12 The best way of solving this is to forget WDM and use the old VfW driver. User-mode-only DLL, exposed to DirectShow by standard MS's QCAP.DLL wrapper. I can recommend a Russian company who already has this solution debugged and working. -- Maxim Shatskih, Windows DDK MVP StorageCraft Corporation maxim(a)storagecraft.com http://www.storagecraft.com "Alexander Prado" <marteletto(a)hotmail.com> wrote in message news:OzQVf0PGFHA.3792(a)TK2MSFTNGP10.phx.gbl... > Hi There! > > I am a newbie in Driver Development, so I think my doubt is simple. > What I need is a virtual driver for capturing desktop window (applications > must see it as a webcam). > > I have installed DDK and realized that TESTCAP (DDK ýs sample) has all I > need - except that this driver doesn't capture anything (it only shows color > bars). So, I have thought that all I would have to do was to change the core > function "ImageSynth" (in capxfer.c), including a screen capture method and > to make some simple changes... > > I have been trying to use GDI for capturing the screen, and likely that's > the problem. In order to debug, I have commented all the code in > "ImageSynth", except the following commands, but I have no success (the > driver is successfully compiled and installed, but Windows shows a message > "Windows cannot load the device driver for this hardware. The driver may be > corrupted or missing. (Code 39)". > > void ImageSynth ( > IN OUT PHW_STREAM_REQUEST_BLOCK pSrb, > IN ImageXferCommands Command, > IN BOOL FlipHorizontal > ) > { > // IF THE FOLLOWING COMMANDS ARE COMMENTED, DRIVER WORKS FINE! > HDC hdcScreen; > hdcScreen = CreateDC("DISPLAY", NULL, NULL, NULL); > DeleteDC(hdcScreen); > } > > > Does anybody could help me to do this job? I would prefer starting from > either a DDK sample or another source code available. > > Thanks in advance. > > > Alex > > > > >
From: Eugene Sukhodolin on 25 Feb 2005 00:44 Alexander, > I am a newbie in Driver Development, so I think my doubt is simple. > What I need is a virtual driver for capturing desktop window (applications > must see it as a webcam). First of all, to capture/stream the screen you need a sort of video driver. Windows (NT) graphics drivers are not WDM ones. By far not. NT video drivers enjoy their own bicomponent portclass-based model which is unlike to anything else in Windows drivers world. It is not possible to turn video driver into KS streaming one directly due to a number of reasons. Video port class and streaming port class drivers can not service a single device at the same time. Video devices are created only by video port class and are exclusive ones. And so on. Meanwhile it is possible to create a WDM screen streaming solution based on a tandem of drivers - video mirroring and the streaming one. It is a tough task for an experienced developer. Moreover, I believe this solution is inefficient and unnatural. Desktop stream is not a framewise video by its nature. Usually the updates do not come periodically at a constant rate. Updates normally come in a quite small portions in average compared to a wholescreen size. There are even periods of no screen activity at all. But in WDM video streaming model you're compelled to produce a full-screen constant (or near constant) bitrate video all the time. At a rough estimation, it is some 100 times and more higher than the required traffic should be. Drastic difference, isn't it? Of course, it is possible to decrease a frame rate. But then you'll loose the smoothness and dynamics. My advice is to forget WDM streaming in a scope of this task and use an important property that a mirror driver in itself has. This kind of driver offers the ability to track the exact area of update since it intercepts all rendering requests and is able to examine their bounding regions. You may share the screen surface memory with a client application/service and provide some messaging to tell the application that there is a change on the screen. Regarding samples. DDK mirror sample is just a skeleton of a driver. It performs no rendering, offers no efficient method of mirror surface access and no messaging services. Of course, to be functional, this driver have to implement some sort of rendering for required DDIs. And a reliable mechanism of communication to the program that mediates the screen image to its real consumers. Video capture ddk sample driver may be used as a skeleton for a WDM capture part. The only way to make it read the image of the desktop from the mirror is a direct backdoor communication with mirror's miniport driver. This is very tricky, indeed. At least because streaming driver can't even open the mirror's device as far as it is exclusivly opened by GDI all the time. Maybe the reverse scheme would work: video mirror's miniport opens a special device on a KS driver and manipulates the driver through it on a behalf of an active instance of a mirror device. Screen memory should be allocated and mapped in a special way for this approach to work. Hope my comments were of some help to you. -- Sincerely, Eugene Sukhodolin www.demoforge.com
|
Next
|
Last
Pages: 1 2 Prev: How to use Ndisprot IOCTL_NDISPROT_SET_OID_VALUE Next: How could i reset a USB device |