How to add camera hardware capabilities in Wince 5.0 for camera application



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
}
}

.



Relevant Pages

  • RE: How to add camera hardware capabilities in Wince 5.0 for camera ap
    ... I am trying to use the camera hardware capabilities in the null driver. ... still pin, which i am doing and as well implemented ... #undef FRAMERATE ... DX, DY, // MinOutputSize, smallest bitmap stream can produce ...
    (microsoft.public.windowsce.embedded)
  • ANNOUNCE: DBI 1.42
    ... handle to be undef instead of triggering an error. ... Currently no trace flags have been defined. ... Added dbivport.h for driver authors to use. ... Corrected typos in docs thanks to Steffen Goeldner. ...
    (perl.dbi.users)
  • Re: [PATCH 0/9] isdn4linux: add drivers for Siemens Gigaset ISDN DECT PABX
    ... > Networking drivers belong on the netdev@xxxxxxxxxxxxxxx list ... The Gigaset driver isn't in fact a networking driver; ... >> +#undef notice ... I couldn't find any existing macros of that kind in kernel.h, ...
    (Linux-Kernel)
  • [DVB patch 14/48] dibusb: debug changes
    ... use own err,info,warn defines, driver description ... (Patrick Boettcher) ... +#undef info ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: faied tests installing DBD::ODBC on FreeBSD
    ... <- DESTROY= undef during global destruction ... Driver connect 'Test', 'keith', 'xxxx' ... SQLConnect 'Test', 'keith' ...
    (perl.dbi.users)