IBaseFilter and IAMVideoProcAmp

Hi
Iam trying to control the quality of the output, such as brightness, contrast, saturation
of DCAM ,My code looks like

IAMVideoControl *iVC=0;
IBaseFilter *a_pCamera=NULL;
HRESULT hr;
ICaptureGraphBuilder2 *pBuild;

hr = CoCreateInstance((REFCLSID)CLSID_CaptureGraphBuilder2,
NULL, CLSCTX_INPROC, (REFIID)IID_ICaptureGraphBuilder2,
(void **)&pBuild);
hr = pBuild->RenderStream(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video,
a_pCamera,NULL, NULL);
hr= a_pCamera->QueryInterface(IID_IAMVideoControl, (void **)&iVC);

But it is crashing.I doubt about the initialization of IBaseFilter.Is it correct?
If not please can you tell me how to do the proper initialization?

Thanks.
Jayalakshmi

You are completely misusing ICaptureDeviceBuilder2.
Look at AmCap sample from Platform SDK on how to use it correctly. Also check the documentation.

– Max.

— Jayalakshmi wrote:
> Hi
> Iam trying to control the quality of the output, such as brightness, contrast, saturation
> of DCAM ,My code looks like
>
> IAMVideoControl *iVC=0;
> IBaseFilter *a_pCamera=NULL;
> HRESULT hr;
> ICaptureGraphBuilder2 *pBuild;
>
> hr = CoCreateInstance((REFCLSID)CLSID_CaptureGraphBuilder2,
> NULL, CLSCTX_INPROC, (REFIID)IID_ICaptureGraphBuilder2,
> (void )&pBuild);
> hr = pBuild->RenderStream(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video,
> a_pCamera,NULL, NULL);
> hr= a_pCamera->QueryInterface(IID_IAMVideoControl, (void
)&iVC);
>
> But it is crashing.I doubt about the initialization of IBaseFilter.Is it correct?
> If not please can you tell me how to do the proper initialization?
>
> Thanks.
> Jayalakshmi
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@yahoo.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS’ NCAA March Madness, live on your desktop!
http://platinum.yahoo.com