i used below code to show default properties of webcam. but it shows
(pDefault , pDefault1,pDefault2,pDefault3,pDefault4) zero. of course laptop's webcam is not like this and shows numbers correctly .program always shows zero for my external webcam .why "SetupProperties" works for some camera and dose not work for some other? i used directshow library in my pro
(pDefault , pDefault1,pDefault2,pDefault3,pDefault4) zero. of course laptop's webcam is not like this and shows numbers correctly .program always shows zero for my external webcam .why "SetupProperties" works for some camera and dose not work for some other? i used directshow library in my pro
private void SetupProperties(DsDevice dev)
{
object o;
Guid IID_IBaseFilter = new Guid("56a86895-0ad4-11ce-b03a-0020af0ba770");
dev.Mon.BindToObject(null, null, ref IID_IBaseFilter, out o);
IAMVideoProcAmp vpa = (IAMVideoProcAmp)o;
int pMin, pMax, pSteppingDelta, pDefault;
int pMin2, pMax2, pSteppingDelta2, pDefault2;
int pMin3, pMax3, pSteppingDelta3, pDefault3;
int pMin4, pMax4, pSteppingDelta4, pDefault4;
VideoProcAmpFlags pFlags, pFlags2, pFlags3, pFlags4;
vpa.GetRange(
VideoProcAmpProperty.Brightness,
out pMin,
out pMax,
out pSteppingDelta,
out pDefault,
out pFlags);
vpa.GetRange(
VideoProcAmpProperty.Sharpness,
out pMin2,
out pMax2,
out pSteppingDelta2,
out pDefault2,
out pFlags2);
vpa.GetRange(
VideoProcAmpProperty.BacklightCompensation,
out pMin3,
out pMax3,
out pSteppingDelta3,
out pDefault3,
out pFlags3);
vpa.GetRange(
VideoProcAmpProperty.Contrast,
out pMin4,
out pMax4,
out pSteppingDelta4,
out pDefault4,
out pFlags4);
}
No comments:
Post a Comment