“I am simply amazed that I have not been able to ask my questions in a
way that actually induces you to answer them. None of what you have
said explains your data flow.”
Really sorry about that, Like I said earlier Im not able to provide many
details.
" You are calling a function called GetCaptureBuffer in that other driver,
and
copying that to the stream pointer leading edge, where it can be
consumed as a captured image. Is that correct?"
Yes exactly.
"If that’s really the architecture, then you can’t induce another driver
to generate data for you. However, you can certainly generate an all
blue image in a static memory buffer, then at the point where you get
the frame, you do:
PBYTE pImage = NULL;
if( real camera is present )
{
pImage = GetCaptureBuffer();
}
else
{
pImage = staticBlueImage;
}"
Thats great! yes I havent considered simply not doing anything to the
capture buffer
and just use the synthetized image I already have instead if no camera is
detected.
Now here is the question I have to do that, right now what Im doing to add
CaptureBuffer support to AVSHWS
is to add these property methods in the table
DEFINE_KSPROPERTY_TABLE(PinCaptureProperties).
DEFINE_KSPROPERTY_ITEM_DISPLAY_ADAPTER_GUID(CCapturePin::PropertyGetDisplayAdapterGUID),
//THIS WILL WORK IF THIS PROPERTY IS NOT SET
DEFINE_KSPROPERTY_PREFERRED_CAPTURE_SURFACE(CCapturePin::PropertyGetPreferredCaptureSurface),
DEFINE_KSPROPERTY_CURRENT_CAPTURE_SURFACE(CCapturePin::PropertyGetCurrentCaptureSurface,
CCapturePin::PropertySetCurrentCaptureSurface),
DEFINE_KSPROPERTY_MAP_CAPTURE_HANDLE_TO_VRAM_ADDRESS(CCapturePin::PropertyGetMapCaptureHandleToVramAddress),
};
(And the methods of course, too large to publish here)
Using that scheme Now how can I change in realtime the capture surface
so it tries to use my synthetized image (from AVSHWS) instead of the
capture buffer?
BTW: CCapturePin::PropertyGetMapCaptureHandleToVramAddress returns the
capture buffer.
2015-06-08 12:36 GMT-05:00 Tim Roberts :
> German Cons wrote:
> >
> > Oh, ok basically all I want to be able to call the GetCaptureBuffer
> > method from the driver.
> > So I can determine if the driver is working.
> > Actually is pretty straightforward, right now Im able to access the
> > capture buffer
> > and process the data in it sending the result to the pin.
> >
> > However if there is NO camera attached, the data is empty.
> >
>
> I am simply amazed that I have not been able to ask my questions in a
> way that actually induces you to answer them. None of what you have
> said explains your data flow.
>
> Here’s what I am interpreting, by reading between the lines. I
> shouldn’t have to read between the lines, but you haven’t given us the
> details.
>
> I’m guessing that your AVStream driver doesn’t actually talk to hardware
> at all. Instead, you have some other driver that talks to the camera
> (you keep calling it “the graphics driver”, but I don’t think that’s
> really what you mean; graphics drivers don’t talk to cameras). You are
> calling a function called GetCaptureBuffer in that other driver, and
> copying that to the stream pointer leading edge, where it can be
> consumed as a captured image. Is that correct?
>
> If that’s really the architecture, then you can’t induce another driver
> to generate data for you. However, you can certainly generate an all
> blue image in a static memory buffer, then at the point where you get
> the frame, you do:
>
> PBYTE pImage = NULL;
> if( real camera is present )
> {
> pImage = GetCaptureBuffer();
> }
> else
> {
> pImage = staticBlueImage;
> }
>
>
>
> > I think one way to do this, would be to let the image synthetizer
> > create the image in RAM (what it already does) and then copy it
> > to the capture buffer. But I dont know how to do that.
>
> Why? You don’t really need to modify the capture buffer, you need to
> change what you return. You can do that using something like the above.
>
>
> > -So basically I want the driver to emulate the camera (when hardware
> > is not present)
> > and use the capture buffer so I can test if the graphics capture
> > method is working correcty.
>
> If the “graphics capture method” returns nothing when there is no
> camera, then you can’t really do this without modifying the capture driver.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>