How to add camera hardware capabilities in Wince 5.0 for camera application
- From: "Balu" <baluiitb@xxxxxxxxx>
- Date: 23 Feb 2006 06:00:25 -0800
Hi all,
I am developing MS camera application for Wince Magneto.
I am trying to use the camera hardware capabilities in the null driver.
For this i have to expose MEDIASUTYPE_IJPG from the null driver for
still pin , which i am doing and as well implemented
AdapterHandleCompressionRequests.The OEM reg. settings for still pin
clsid also has been chaged.
Following is the CS_DATARANGE_VIDEO structure i am exposing for still
pin.
but when i select capture from the application, i am getting an
exception in pimg.dll, which cannot be detected as the source is not
available.
even the control not coming to CSPROPERTY_VIDEOCOMPRESSION_GETINFO. i
feel this could be an issue.
can any one help me out where exactly i am going wrong.Is there any
problem with CS_DATARANGE_VIDEO ?
Thanks in advance
Balu
#define FOURCC_IJPG 0x47504A49
#undef FRAMERATE
#undef DX
#undef DY
#undef DBITCOUNT
#undef BITRATE
#define BITRATE 10000
//{47504A49-0000-0010-8000-00AA00389B71}
#define DX 640
#define DY 480
#define DBITCOUNT 16
#define FRAMERATE 15
CS_DATARANGE_VIDEO DCAM_StreamMode_3 = {
// CSDATARANGE
{
sizeof (CS_DATARANGE_VIDEO), // Flags
0,
SAMPLESIZE, // SampleSize
0, // Reserved
STATIC_CSDATAFORMAT_TYPE_VIDEO,
FOURCC_IJPG,
0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71,
STATIC_CSDATAFORMAT_SPECIFIER_VIDEOINFO
},
TRUE, // BOOL, bFixedSizeSamples
TRUE, // BOOL, bTemporalCompression
CS_VIDEOSTREAM_CAPTURE, // StreamDescriptionFlags (CS_VIDEO_DESC_*)
0, // MemoryAllocationFlags (CS_VIDEO_ALLOC_*)
// _CS_VIDEO_STREAM_CONFIG_CAPS
{
STATIC_CSDATAFORMAT_SPECIFIER_VIDEOINFO,
CS_AnalogVideo_None, // AnalogVideoStandard
DX,DY, // InputSize, (the inherent size of the incoming
signal
// with every digitized pixel unique)
DX,DY, // MinCroppingSize, smallest rcSrc cropping rect
allowed
DX,DY, // MaxCroppingSize, largest rcSrc cropping rect
allowed
1, // CropGranularityX, granularity of cropping size
1, // CropGranularityY
1, // CropAlignX, alignment of cropping rect
1, // CropAlignY;
DX, DY, // MinOutputSize, smallest bitmap stream can produce
DX, DY, // MaxOutputSize, largest bitmap stream can produce
DX, // OutputGranularityX, granularity of output bitmap
size
DY, // OutputGranularityY;
0, // StretchTapsX (0 no stretch, 1 pix dup, 2
interp...)
0, // StretchTapsY
0, // ShrinkTapsX
0, // ShrinkTapsY
FRAMEINTERVAL_15FPS, // MinFrameInterval (10,000,000 /
15.00FPS), 100nS units
FRAMEINTERVAL_7_5FPS, // MaxFrameInterval (10,000,000 /
7.50FPS), 100nS units
BITRATE / 2, // MinBitsPerSecond ( 7.50 FPS);
BITRATE // MaxBitsPerSecond (15.00 FPS);
},
// CS_VIDEOINFOHEADER (default format)
{
0,0,0,0, // RECT rcSource;
0,0,0,0, // RECT rcTarget;
BITRATE, // DWORD dwBitRate;
0L, // DWORD dwBitErrorRate;
REFTIME_15FPS, // REFERENCE_TIME
AvgTimePerFrame. For (15 FPS) use 666666.
{
sizeof (CS_BITMAPINFOHEADER), // DWORD biSize;
DX, // LONG biWidth;
DY, // LONG biHeight;
-biHeight indicate TopDown for RGB
1, // WORD biPlanes;
DBITCOUNT, // WORD biBitCount;
FOURCC_IJPG | BI_SRCPREROTATE, // DWORD
biCompression;
SAMPLESIZE, // DWORD biSizeImage;
0, // LONG
biXPelsPerMeter;
0, // LONG
biYPelsPerMeter;
0, // DWORD biClrUsed;
0 // DWORD
biClrImportant;
},
{
0, // DWORD
dwBitMasks[CS_iMASK_COLORS];
0,
0
}
}
.
- Follow-Ups:
- RE: How to add camera hardware capabilities in Wince 5.0 for camera ap
- From: Snehal Parmar
- RE: How to add camera hardware capabilities in Wince 5.0 for camera ap
- Prev by Date: MSystem DiskOnChip G3 IPL for PXA27x
- Next by Date: registry editor for x86
- Previous by thread: MSystem DiskOnChip G3 IPL for PXA27x
- Next by thread: RE: How to add camera hardware capabilities in Wince 5.0 for camera ap
- Index(es):
Relevant Pages
|