Hello Group,
I’m a Device Driver Newbie and am working on writing a Video Display
Mirror driver.
My Desire is to have an engine managed surface, that I can periodically
take a “snapshot” of for further processing This surface is to be a
portion of the displayed desktop, but may not necessarily encompass the
whole desktop.
To accomplish this, I am creating a “frame buffer” using EngAllocMem and
then using EngCreateBitmap to define this frame buffer. I then perform
an EngAssociateSurface call to inform the engine of the existance of the
surface.
This all seems to work fine if I cause the surface/bitmap to be the same
size as the desktop (determined during DrvEnablePDEV by using
dmPelsWidth and dmPelsHeight ), but as I am not necessarily interested
in the entire desktop, and in the interest of conserving bandwidth, I
would like to make the clip region smaller than the actually display size.
My problem is that I don’t understand how to set up a clip region that
is less than the whole desktop without getting OS errors:
From the DDK:
“A mirror device can specify an arbitrary clip region in the virtual
desktop, including one that spans more than one physical display device.
GDI then sends the mirror device all drawing operations that intersect
that driver’s clip region. A mirror device can set a clip region that
exactly matches a particular physical device; therefore, it can
effectively mirror that device.”
Any insight as to how I might accomplish this would be appreciated. Do
I need to move to a device managed surface and actually change
parameters to the Eng calls on all calls that I would punt back to GDI?
I really am happy to let GDI manage the surface, and just be able to
periodically grab the frame buffer data of interest.
Regards,
Brett Swimley
–
Brett Swimley
Sr. Design Engineer
Advanced Electronic Designs
bds AT aedinc DOT net
you must have seen teh application with the mirror sample in the ddk. In
that change display settings for the mirror driver is called which is passed
a devmode structure. it is this structure in which the clip region is
specified. there are members of the structure ‘dmPosition’ for position,
dmPelsWidth, dmPelsHeight and dmBitsPerPel.
by changing these u can change these variables for the clip region.
MUDEEM
From: Brett Swimley
>Reply-To: “Windows System Software Devs Interest List”
>
>To: “Windows System Software Devs Interest List”
>Subject: [ntdev] Mirror Driver Clip Region Questions
>Date: Fri, 20 Aug 2004 08:59:46 -0600
>
>Hello Group,
>
>I’m a Device Driver Newbie and am working on writing a Video Display Mirror
>driver.
>
>My Desire is to have an engine managed surface, that I can periodically
>take a “snapshot” of for further processing This surface is to be a
>portion of the displayed desktop, but may not necessarily encompass the
>whole desktop.
>
>To accomplish this, I am creating a “frame buffer” using EngAllocMem and
>then using EngCreateBitmap to define this frame buffer. I then perform an
>EngAssociateSurface call to inform the engine of the existance of the
>surface.
>
>This all seems to work fine if I cause the surface/bitmap to be the same
>size as the desktop (determined during DrvEnablePDEV by using dmPelsWidth
>and dmPelsHeight ), but as I am not necessarily interested in the entire
>desktop, and in the interest of conserving bandwidth, I would like to make
>the clip region smaller than the actually display size.
>
>My problem is that I don’t understand how to set up a clip region that is
>less than the whole desktop without getting OS errors:
>
>From the DDK:
>
>“A mirror device can specify an arbitrary clip region in the virtual
>desktop, including one that spans more than one physical display device.
>GDI then sends the mirror device all drawing operations that intersect that
>driver’s clip region. A mirror device can set a clip region that exactly
>matches a particular physical device; therefore, it can effectively mirror
>that device.”
>
>Any insight as to how I might accomplish this would be appreciated. Do I
>need to move to a device managed surface and actually change parameters to
>the Eng calls on all calls that I would punt back to GDI? I really am
>happy to let GDI manage the surface, and just be able to periodically grab
>the frame buffer data of interest.
>
>Regards,
>
>Brett Swimley
>
>–
>Brett Swimley
>Sr. Design Engineer
>Advanced Electronic Designs
>
>
>bds AT aedinc DOT net
>
>
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
Thank you for your help. I now think that I see how I can change the
display settings from a user-mode application. I haven’t tried yet but
I’m encouraged.
Regards,
Brett
mudeem iqbal wrote:
you must have seen teh application with the mirror sample in the ddk.
In that change display settings for the mirror driver is called which
is passed a devmode structure. it is this structure in which the clip
region is specified. there are members of the structure ‘dmPosition’
for position, dmPelsWidth, dmPelsHeight and dmBitsPerPel.
by changing these u can change these variables for the clip region.
MUDEEM
> From: Brett Swimley
>> Reply-To: “Windows System Software Devs Interest List”
>>
>> To: “Windows System Software Devs Interest List”
>> Subject: [ntdev] Mirror Driver Clip Region Questions
>> Date: Fri, 20 Aug 2004 08:59:46 -0600
>>
>> Hello Group,
>>
>> I’m a Device Driver Newbie and am working on writing a Video Display
>> Mirror driver.
>>
>> My Desire is to have an engine managed surface, that I can
>> periodically take a “snapshot” of for further processing This
>> surface is to be a portion of the displayed desktop, but may not
>> necessarily encompass the whole desktop.
>>
>> To accomplish this, I am creating a “frame buffer” using EngAllocMem
>> and then using EngCreateBitmap to define this frame buffer. I then
>> perform an EngAssociateSurface call to inform the engine of the
>> existance of the surface.
>>
>> This all seems to work fine if I cause the surface/bitmap to be the
>> same size as the desktop (determined during DrvEnablePDEV by using
>> dmPelsWidth and dmPelsHeight ), but as I am not necessarily
>> interested in the entire desktop, and in the interest of conserving
>> bandwidth, I would like to make the clip region smaller than the
>> actually display size.
>>
>> My problem is that I don’t understand how to set up a clip region
>> that is less than the whole desktop without getting OS errors:
>>
>> From the DDK:
>>
>> “A mirror device can specify an arbitrary clip region in the virtual
>> desktop, including one that spans more than one physical display
>> device. GDI then sends the mirror device all drawing operations that
>> intersect that driver’s clip region. A mirror device can set a clip
>> region that exactly matches a particular physical device; therefore,
>> it can effectively mirror that device.”
>>
>> Any insight as to how I might accomplish this would be appreciated.
>> Do I need to move to a device managed surface and actually change
>> parameters to the Eng calls on all calls that I would punt back to
>> GDI? I really am happy to let GDI manage the surface, and just be
>> able to periodically grab the frame buffer data of interest.
>>
>> Regards,
>>
>> Brett Swimley
>>
>> –
>> Brett Swimley
>> Sr. Design Engineer
>> Advanced Electronic Designs
>>
>>
>> bds AT aedinc DOT net
>>
>>
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>> http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as: xxxxx@hotmail.com
>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@aedinc.net
> To unsubscribe send a blank email to xxxxx@lists.osr.com
–
Brett Swimley
Sr. Design Engineer
Advanced Electronic Designs
bds AT aedinc DOT net