📄 cameraprops.h
字号:
DX, // LONG biWidth;
DY, // LONG biHeight;
1, // WORD biPlanes;
DBITCOUNT, // WORD biBitCount;
FOURCC_UYVY, // DWORD biCompression;
DX*DY*(DBITCOUNT/2), // DWORD biSizeImage;
0, // LONG biXPelsPerMeter;
0, // LONG biYPelsPerMeter;
0, // DWORD biClrUsed;
0, // DWORD biClrImportant;
0,0,0 // DWORD dwBitMasks
}
};
#undef DX
#undef DY
#undef DBITCOUNT
#define DX 640
#define DY 480
#define DBITCOUNT 16
// To support mode4, 640x480, RGB 5:6:5
CS_DATARANGE_VIDEO DCAM_StreamMode_3 =
{
// CSDATARANGE
{
sizeof (CS_DATARANGE_VIDEO),
0, // Flags
DX_MAX*DY_MAX*(DBITCOUNT/2), // SampleSize
0, // Reserved
STATIC_CSDATAFORMAT_TYPE_VIDEO,
0xe436eb7b, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70,
STATIC_CSDATAFORMAT_SPECIFIER_VIDEOINFO
},
TRUE, // BOOL, bFixedSizeSamples (all samples same size?)
TRUE, // BOOL, bTemporalCompression (all I frames?)
CS_VIDEOSTREAM_PREVIEW, // StreamDescriptionFlags (CS_VIDEO_DESC_*)
0, // MemoryAllocationFlags (CS_VIDEO_ALLOC_*)
// _CS_VIDEO_STREAM_CONFIG_CAPS
{
STATIC_CSDATAFORMAT_SPECIFIER_VIDEOINFO,
CS_AnalogVideo_None, // AnalogVideoStandard
DX_MAX,DY_MAX, // InputSize, (the inherent size of the incoming signal with every digitized pixel unique)
DX_MAX,DY_MAX, // MinCroppingSize, smallest rcSrc cropping rect allowed
DX_MAX,DY_MAX, // MaxCroppingSize, largest rcSrc cropping rect allowed
1, // CropGranularityX, granularity of cropping size
1, // CropGranularityY
1, // CropAlignX, alignment of cropping rect
1, // CropAlignY;
DX_MIN, DY_MIN, // MinOutputSize, smallest bitmap stream can produce
DX_MAX, DY_MAX, // MaxOutputSize, largest bitmap stream can produce
DX_MAX, // OutputGranularityX, granularity of output bitmap size
DY_MAX, // OutputGranularityY;
0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...)
0, // StretchTapsY
0, // ShrinkTapsX
0, // ShrinkTapsY
333000, // MinFrameInterval (10,000,000 / 30.00FPS), 100nS units
1000000, // MaxFrameInterval (10,000,000 / 10.00FPS), 100nS units
(DX_MIN*DY_MIN*DBITCOUNT)*10, // (160 * 120 * DBITCOUNT) * DFPS_MIN, // MinBitsPerSecond (10.00 FPS);
(DX_MAX*DY_MAX*DBITCOUNT)*30, // MaxBitsPerSecond (30.00 FPS);
},
// CS_VIDEOINFOHEADER (default format)
{
0,0,0,0, // RECT rcSource;
0,0,0,0, // RECT rcTarget;
DX*DY*DBITCOUNT*30, // DWORD dwBitRate; 614400 * 30FPS * 8 bit/Byte;
0L, // DWORD dwBitErrorRate;
333333, // REFERENCE_TIME AvgTimePerFrame (30 FPS);
{
sizeof (CS_BITMAPINFOHEADER), // DWORD biSize;
DX, // LONG biWidth;
DY, // LONG biHeight; -biHeight indicate TopDown for RGB
1, // WORD biPlanes;
DBITCOUNT, // WORD biBitCount;
CS_BI_BITFIELDS, // DWORD biCompression;
DX*DY*(DBITCOUNT/2), // DWORD biSizeImage;
0, // LONG biXPelsPerMeter;
0, // LONG biYPelsPerMeter;
0, // DWORD biClrUsed;
0 // DWORD biClrImportant;
},
{
0xF800, // DWORD dwBitMasks[CS_iMASK_COLORS];
0x07E0,
0x001F
}
}
} ;
#undef DX
#undef DY
#undef DBITCOUNT
#define DX 240
#define DY 320
#define DBITCOUNT 24
CS_DATARANGE_VIDEO DCAM_StreamMode_4 =
{
// CSDATARANGE
{
sizeof (CS_DATARANGE_VIDEO),
0, // Flags
DX_MAX*DY_MAX*(DBITCOUNT/8), // SampleSize
0, // Reserved
STATIC_CSDATAFORMAT_TYPE_VIDEO,
0xe436eb7b, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70,
STATIC_CSDATAFORMAT_SPECIFIER_VIDEOINFO
},
TRUE, // BOOL, bFixedSizeSamples (all samples same size?)
TRUE, // BOOL, bTemporalCompression (all I frames?)
CS_VIDEOSTREAM_PREVIEW, // StreamDescriptionFlags (CS_VIDEO_DESC_*)
0, // MemoryAllocationFlags (CS_VIDEO_ALLOC_*)
// _CS_VIDEO_STREAM_CONFIG_CAPS
{
STATIC_CSDATAFORMAT_SPECIFIER_VIDEOINFO,
CS_AnalogVideo_None, // AnalogVideoStandard
DX_MAX,DY_MAX, // InputSize, (the inherent size of the incoming signal with every digitized pixel unique)
DX_MAX,DY_MAX, // MinCroppingSize, smallest rcSrc cropping rect allowed
DX_MAX,DY_MAX, // MaxCroppingSize, largest rcSrc cropping rect allowed
1, // CropGranularityX, granularity of cropping size
1, // CropGranularityY
1, // CropAlignX, alignment of cropping rect
1, // CropAlignY;
DX_MIN, DY_MIN, // MinOutputSize, smallest bitmap stream can produce
DX_MAX, DY_MAX, // MaxOutputSize, largest bitmap stream can produce
DX_MAX, // OutputGranularityX, granularity of output bitmap size
DY_MAX, // OutputGranularityY;
0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...)
0, // StretchTapsY
0, // ShrinkTapsX
0, // ShrinkTapsY
333000, // MinFrameInterval (10,000,000 / 30.00FPS), 100nS units
// 1000000, // MaxFrameInterval (10,000,000 / 10.00FPS), 100nS units
// TODO: Remove this hack for 1FPS
10000000, // MaxFrameInterval (10,000,000 / 1.00FPS), 100nS units
(DX_MIN*DY_MIN*DBITCOUNT)*10, // (160 * 120 * DBITCOUNT) * DFPS_MIN, // MinBitsPerSecond (10.00 FPS);
(DX_MAX*DY_MAX*DBITCOUNT)*30, // MaxBitsPerSecond (30.00 FPS);
},
// CS_VIDEOINFOHEADER (default format)
{
0,0,0,0, // RECT rcSource;
0,0,0,0, // RECT rcTarget;
// DX*DY*DBITCOUNT*30, // DWORD dwBitRate; 230400 * 30FPS * 8 bit/Byte
// TODO: Remove this hack for 1FPS
DX*DY*DBITCOUNT*3, // DWORD dwBitRate; 230400 * 30FPS * 8 bit/Byte
0L, // DWORD dwBitErrorRate;
// 333333, // DWORD AvgTimePerFrame;
// TODO: Remove this hack for 1FPS
3333333, // DWORD AvgTimePerFrame;
{
sizeof (CS_BITMAPINFOHEADER), // DWORD biSize;
DX, // LONG biWidth;
DY, // LONG biHeight; -biHeight indicate TopDown for RGB
1, // WORD biPlanes;
DBITCOUNT, // WORD biBitCount;
CS_BI_RGB, // DWORD biCompression;
DX*DY*3, // DWORD biSizeImage;
0, // LONG biXPelsPerMeter;
0, // LONG biYPelsPerMeter;
0, // DWORD biClrUsed;
0 // DWORD biClrImportant;
},
{
0xF800, // DWORD dwBitMasks[CS_iMASK_COLORS];
0x07E0,
0x001F
}
}
} ;
#undef DX
#undef DY
#undef DBITCOUNT
#define DX 240
#define DY 320
#define DBITCOUNT 16
CS_DATARANGE_VIDEO DCAM_StreamMode_5 =
{
// CSDATARANGE
{
sizeof (CS_DATARANGE_VIDEO),
0, // Flags
DX_MAX*DY_MAX*(DBITCOUNT/8), // SampleSize
0, // Reserved
STATIC_CSDATAFORMAT_TYPE_VIDEO,
0xe436eb7b, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70,
STATIC_CSDATAFORMAT_SPECIFIER_VIDEOINFO
},
TRUE, // BOOL, bFixedSizeSamples (all samples same size?)
TRUE, // BOOL, bTemporalCompression (all I frames?)
CS_VIDEOSTREAM_PREVIEW, // StreamDescriptionFlags (CS_VIDEO_DESC_*)
0, // MemoryAllocationFlags (CS_VIDEO_ALLOC_*)
// _CS_VIDEO_STREAM_CONFIG_CAPS
{
STATIC_CSDATAFORMAT_SPECIFIER_VIDEOINFO,
CS_AnalogVideo_None, // AnalogVideoStandard
DX_MAX,DY_MAX, // InputSize, (the inherent size of the incoming signal with every digitized pixel unique)
DX_MAX,DY_MAX, // MinCroppingSize, smallest rcSrc cropping rect allowed
DX_MAX,DY_MAX, // MaxCroppingSize, largest rcSrc cropping rect allowed
1, // CropGranularityX, granularity of cropping size
1, // CropGranularityY
1, // CropAlignX, alignment of cropping rect
1, // CropAlignY;
DX_MIN, DY_MIN, // MinOutputSize, smallest bitmap stream can produce
DX_MAX, DY_MAX, // MaxOutputSize, largest bitmap stream can produce
DX_MAX, // OutputGranularityX, granularity of output bitmap size
DY_MAX, // OutputGranularityY;
0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...)
0, // StretchTapsY
0, // ShrinkTapsX
0, // ShrinkTapsY
333000, // MinFrameInterval (10,000,000 / 30.00FPS), 100nS units
// 1000000, // MaxFrameInterval (10,000,000 / 10.00FPS), 100nS units
// TODO: Remove this hack for 1FPS
10000000, // MaxFrameInterval (10,000,000 / 1.00FPS), 100nS units
(DX_MIN*DY_MIN*DBITCOUNT)*10, // (160 * 120 * DBITCOUNT) * DFPS_MIN, // MinBitsPerSecond (10.00 FPS);
(DX_MAX*DY_MAX*DBITCOUNT)*30, // MaxBitsPerSecond (30.00 FPS);
},
// CS_VIDEOINFOHEADER (default format)
{
0,0,0,0, // RECT rcSource;
0,0,0,0, // RECT rcTarget;
// DX*DY*DBITCOUNT*30, // DWORD dwBitRate; 230400 * 30FPS * 8 bit/Byte
// TODO: Remove this hack for 1FPS
DX*DY*DBITCOUNT*3, // DWORD dwBitRate; 230400 * 30FPS * 8 bit/Byte
0L, // DWORD dwBitErrorRate;
// 333333, // DWORD AvgTimePerFrame;
// TODO: Remove this hack for 1FPS
3333333, // DWORD AvgTimePerFrame;
{
sizeof (CS_BITMAPINFOHEADER), // DWORD biSize;
DX, // LONG biWidth;
DY, // LONG biHeight; -biHeight indicate TopDown for RGB
1, // WORD biPlanes;
DBITCOUNT, // WORD biBitCount;
CS_BI_RGB, // DWORD biCompression;
DX*DY*3, // DWORD biSizeImage;
0, // LONG biXPelsPerMeter;
0, // LONG biYPelsPerMeter;
0, // DWORD biClrUsed;
0 // DWORD biClrImportant;
},
{
0xF800, // DWORD dwBitMasks[CS_iMASK_COLORS];
0x07E0,
0x001F
}
}
} ;
ULONG DefaultVideoControlCaps[] =
{
CS_VideoControlFlag_FlipHorizontal | CS_VideoControlFlag_FlipVertical /*PREVIEW*/,
CS_VideoControlFlag_ExternalTriggerEnable /*CAPTURE*/,
CS_VideoControlFlag_ExternalTriggerEnable | CS_VideoControlFlag_Trigger /*STILL*/
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -