Hello.
I need some help to write capture driver which receive MPEG2 stream from USB
capture device.
Here is the description:
I modify the capture driver of DDK USB PC camera to change driver's out
stream from video to MPEG2.
Result render is ok, but the driver stream data can't be play by
DirectShow(I have correct MPEG2 decoder in the Capture Graph).
The GraphEdit display error code is "0x800706f8" and error message is "The
graph could not change state, provide to request user buffer is invalid".
I try to trace the capture driver, I find stream state already from pause to
run and data is prepare to read,
but no any read command to read MPEG2 stream from AP. In the meanwhile I use
another tool--"KsStudio",
it display "KSDATAFORMAT.FormatSize (152) does not match the size of the
specified format (sizeof(KSDATAFORMAT) = 64)"
after capture driver receive SRB_GET_DATA_INTERSECTION from stream class
driver.
I only change MajorFormat, SubFormat and Specifier of DataRange structure
from original DDK source code.
(The MajorFormat parameter is 'STATIC_KSDATAFORMAT_TYPE_STREAM',
the SubFormat parameter is 'STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT' and
the Specifier parameter is 'STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO').
After above-mentioned method fail, I try another solution as DDK mentioned
to change DataRange and DataForamt structure.
DataRange use 'KS_DATARANGE_MPEG2_VIDEO' structure and DataFormat use
'KS_MPEGVIDEOINFO2' structure.
The MajorFormat, SubFormat and Specifier parameter same as above-mentioned
method. Result is still fail.
Help, please! What am I doing wrong???
I will be happy to hear any clues.
Thanks.
Shaq
|