阅读:3379回复:1
web camera data range switch issue.
Dear all:
I have met a difficult during web camera driver developing. Here is the problem. Using one web camera hardware supports MJPEG 1 and YUY2, and amcap.exe to test my driver. If driver just creats YUY2 data range, AmCap works well(video frames are displayed continously). If driver just creats MJPEG data range, AmCap works well also. However, if driver creats both YUY2 and MJPEG data range, AmCap can not work continuously when I set data frame as YUY2. And in order to resume amcap, I need switch other windows or clilk amcmp's window several times. Furthermore, graphedit is OK. The next are data ranges: const KS_DATARANGE_VIDEO FormatYUY2_Capture = { // // KSDATARANGE // { sizeof (KS_DATARANGE_VIDEO), // FormatSize 0, // Flags 0,//DMAX_X2 * DMAX_Y2 * 2, // SampleSize 0, // Reserved STATICGUIDOF (KSDATAFORMAT_TYPE_VIDEO), // aka. MEDIATYPE_Video 0x32595559, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71, //aka. MEDIASUBTYPE_YUY2, STATICGUIDOF (KSDATAFORMAT_SPECIFIER_VIDEOINFO) // aka. FORMAT_VideoInfo }, TRUE, // BOOL, bFixedSizeSamples (all samples same size?) TRUE, // BOOL, bTemporalCompression (all I frames?) 0, // Reserved (was StreamDescriptionFlags) 0, // Reserved (was MemoryAllocationFlags // (KS_VIDEO_ALLOC_*)) // // _KS_VIDEO_STREAM_CONFIG_CAPS // { STATICGUIDOF( KSDATAFORMAT_SPECIFIER_VIDEOINFO ), // GUID KS_AnalogVideo_None,// // AnalogVideoStandard DMAX_X2, DMAX_Y2, // InputSize, (the inherent size of the incoming signal // with every digitized pixel unique) D_X2,D_Y2, // MinCroppingSize, smallest rcSrc cropping rect allowed DMAX_X2, DMAX_Y2, // MaxCroppingSize, largest rcSrc cropping rect allowed 1, // CropGranularityX, granularity of cropping size 1, // CropGranularityY 1, // CropAlignX, alignment of cropping rect 1, // CropAlignY; D_X2, D_Y2, // MinOutputSize, smallest bitmap stream can produce DMAX_X2, DMAX_Y2, // MaxOutputSize, largest bitmap stream can produce 1, // OutputGranularityX, granularity of output bitmap size 1, // OutputGranularityY; 0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...) 0, // StretchTapsY 0, // ShrinkTapsX 0, // ShrinkTapsY 333333, // MinFrameInterval, 100 nS units 640000000, // MaxFrameInterval, 100 nS units 8 * 2 * 30 * D_X2 * D_Y2, // MinBitsPerSecond; 8 * 2 * 30 * DMAX_X2 * DMAX_Y2, // MaxBitsPerSecond; }, // // KS_VIDEOINFOHEADER (default format) // { 0, 0, D_X2, D_Y2, // RECT rcSource; 0, 0, D_X2, D_Y2, // RECT rcTarget; DMAX_X2 * DMAX_Y2 * 2 *8* 30, // DWORD dwBitRate; 0L, // DWORD dwBitErrorRate; 333333, // REFERENCE_TIME AvgTimePerFrame; sizeof (KS_BITMAPINFOHEADER), // DWORD biSize; DMAX_X2, // LONG biWidth; DMAX_Y2, // LONG biHeight; 1, // WORD biPlanes; 16, // WORD biBitCount; FOURCC_YUY2, // DWORD biCompression; DMAX_X2 * DMAX_Y2 * 2+1, // DWORD biSizeImage; 0, // LONG biXPelsPerMeter; 0, // LONG biYPelsPerMeter; 0, // DWORD biClrUsed; 0 // DWORD biClrImportant; } }; // FormatMJPEG_Capture: // // This is the data range description of the YUY2 format we support. const KS_DATARANGE_VIDEO FormatMJPEG_Capture = { // // KSDATARANGE // { sizeof (KS_DATARANGE_VIDEO), // FormatSize 0, // Flags 0,//DMAX_X2 * DMAX_Y2 * 2, // SampleSize 0, // Reserved STATICGUIDOF (KSDATAFORMAT_TYPE_VIDEO), // aka. MEDIATYPE_Video 0x47504A4D, 0x0000, 0x0010, 0x80, 0x00,0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71, //aka. MEDIASUBTYPE_YUY2, STATICGUIDOF (KSDATAFORMAT_SPECIFIER_VIDEOINFO) // aka. FORMAT_VideoInfo }, TRUE, // BOOL, bFixedSizeSamples (all samples same size?) TRUE, // BOOL, bTemporalCompression (all I frames?) 0, // Reserved (was StreamDescriptionFlags) 0, // Reserved (was MemoryAllocationFlags // (KS_VIDEO_ALLOC_*)) // // _KS_VIDEO_STREAM_CONFIG_CAPS // { STATICGUIDOF( KSDATAFORMAT_SPECIFIER_VIDEOINFO ), // GUID KS_AnalogVideo_None,// // AnalogVideoStandard DMAX_X, DMAX_Y, // InputSize, (the inherent size of the incoming signal // with every digitized pixel unique) D_X,D_Y, // MinCroppingSize, smallest rcSrc cropping rect allowed DMAX_X, DMAX_Y, // MaxCroppingSize, largest rcSrc cropping rect allowed 1, // CropGranularityX, granularity of cropping size 1, // CropGranularityY 1, // CropAlignX, alignment of cropping rect 1, // CropAlignY; D_X, D_Y, // MinOutputSize, smallest bitmap stream can produce DMAX_X, DMAX_Y, // MaxOutputSize, largest bitmap stream can produce 1, // OutputGranularityX, granularity of output bitmap size 1, // OutputGranularityY; 0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...) 0, // StretchTapsY 0, // ShrinkTapsX 0, // ShrinkTapsY 333333, // MinFrameInterval, 100 nS units 200000000, // MaxFrameInterval, 100 nS units 8 * 2 * 30 * D_X * D_Y, // MinBitsPerSecond; 8 * 2 * 30 * DMAX_X * DMAX_Y, // MaxBitsPerSecond; }, // // KS_VIDEOINFOHEADER (default format) // { 0, 0, D_X, D_Y, // RECT rcSource; 0, 0, D_X, D_Y, // RECT rcTarget; DMAX_X * DMAX_Y * 2 *8* 30, // DWORD dwBitRate; 0L, // DWORD dwBitErrorRate; 333333, // REFERENCE_TIME AvgTimePerFrame; sizeof (KS_BITMAPINFOHEADER), // DWORD biSize; DMAX_X, // LONG biWidth; DMAX_Y, // LONG biHeight; 1, // WORD biPlanes; 24, // WORD biBitCount; FOURCC_MJPEG, // DWORD biCompression; DMAX_X * DMAX_Y * 2+1, // DWORD biSizeImage; 0, // LONG biXPelsPerMeter; 0, // LONG biYPelsPerMeter; 0, // DWORD biClrUsed; 0 // DWORD biClrImportant; } }; |
|
沙发#
发布于:2009-12-05 20:16
2
Step1Browse through bridal wedding dresses magazines to find cheap bridal gowns, styles you like and those that exemplify wedding dress the styles that would compliment the wedding you are planning. Clip the pictures to take with you to the wedding dress shops. One of the most important wedding dresses things for every bride on her wedding day is how she looks in her wedding dress. If you want to look your best on your wedding day,wedding dresses you must pick the right wedding dresses style. From the type of skirt to the design of the top, you must find the style that best wedding dresses compliments your features and your body type. Here are some tips for 2009 wedding Dresses picking the perfect wedding dress style. Step2Schedule an appointment to try wedding dresses on wedding dresses at a wedding dress shop that has a variety of dress styles in a variety of sizes that you can try on. Step4Show your magazine clippings to the wedding dress shop consultant so she knows prom dresses what you are looking for. Step9Visit cheap bridal gowns, at least two more wedding dresses dress shops plus size wedding dresses and ask to see dresses of a similar style wholesale wedding gowns before selecting your final wedding dress. Step6Try on many wedding dresses in as many different styles as possible, cheap wedding dress even if you think they are bridal dress not what you want. Try on dresses with cheap wedding dress different skirt styles and top styles to get a feeling of what looks and feels best on you. Step5Ask the wedding dress shop consultant to pull dresses for you to try on that are similar to the magazine clipping dresses and a few that exemplify other wedding dress styles that she thinks would compliment your body type. Step7Ask your friend’s Prom Dress opinion wedding dresses of every dress and bridal gown, note the pros and cons of each style. Have your friend take a picture of you in each dress wedding dresses for reference when you leave the dress shop. Step8Pick the wedding dress style that you looked wedding dresses the best in. A good friend Step3Go to your wedding dress shop appointment with glove a good friend and a camera. |
|