From: dos on
Hi all,

I'm developing a Stream Class minidriver to catch MPEG2-TS from a USB-TV
box. I modified Testcap, sample code of DDK. Then I use GraphEdit to connect
my filter to VMR. Kernel message shows that system loads mpg2dmx to open my
stream. But after receiving 3 SRB_GET_DATA_INTERSECTION commands, an error
message is shown as: "These filters can't agree on a connection. Verify type
compatibility of input pin and output pin."
Please help me to check out my format definition. What's wrong with it?
Thanks!

static KS_DATARANGE_MPEG2_VIDEO StreamFormatMPEG2_Capture =
{
// KSDATARANGE
{
sizeof (KS_DATARANGE_MPEG2_VIDEO), // FormatSize
0, // Flags
0, // SampleSize
0, // Reserved

STATIC_KSDATAFORMAT_TYPE_STREAM, // aka. MEDIATYPE_Stream
STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT, //MEDIASUBTYPE MPEG2
TRANSPORT,
// STATIC_KSDATAFORMAT_SPECIFIER_NONE // aka. None
STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO // aka. None
},

TRUE, // BOOL, bFixedSizeSamples (all samples same size?)
FALSE, // BOOL, bTemporalCompression (all I frames?)
0, // Reserved (was StreamDescriptionFlags)
0, // Reserved (was MemoryAllocationFlags
(KS_VIDEO_ALLOC_*))

// _KS_VIDEO_STREAM_CONFIG_CAPS
{
STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO, // GUID
KS_AnalogVideo_None, // This is a digital sensor
720,480, // InputSize, (the inherent size of the incoming
signal
// with every digitized pixel unique)
160,120, // MinCroppingSize, smallest rcSrc cropping rect
allowed
720,480, // MaxCroppingSize, largest rcSrc cropping rect
allowed
8, // CropGranularityX, granularity of cropping size
1, // CropGranularityY
8, // CropAlignX, alignment of cropping rect
1, // CropAlignY;
160, 120, // MinOutputSize, smallest bitmap stream can produce
720, 480, // MaxOutputSize, largest bitmap stream can produce
8, // OutputGranularityX, granularity of output bitmap
size
1, // OutputGranularityY;
0, // StretchTapsX (0 no stretch, 1 pix dup, 2
interp...)
0, // StretchTapsY
0, // ShrinkTapsX
0, // ShrinkTapsY
333667, // MinFrameInterval, 100 nS units
640000000, // MaxFrameInterval, 100 nS units
8 * 2 * 30 * 160 * 120, // MinBitsPerSecond;
8 * 2 * 30 * 720 * 480 // MaxBitsPerSecond;
},

//KS_MPEGVIDEOINFO2
{
// KS_VIDEOINFOHEADER2 (default format)
{
0,0,720,480, // RECT rcSource;
0,0,0,0, // RECT rcTarget;
0x003d0900, // DWORD dwBitRate;
0L, // DWORD dwBitErrorRate;
333667, // REFERENCE_TIME
AvgTimePerFrame;

KS_INTERLACE_UNUSED, // DWORD dwInterlaceFlags
0, // DWORD dwCopyProtectFlags
4, // DWORD dwPictAspectRatioX
3, // DWORD dwPictAspectRatioY
0, // DWORD dwReserved1
0, // DWORD dwReserved2

// KS_BITMAPINFOHEADER
{
sizeof (KS_BITMAPINFOHEADER), // DWORD biSize;
D_X, // LONG biWidth;
D_Y, // LONG biHeight;
0, // WORD biPlanes;
0, // WORD biBitCount;
// FOURCC_MPEG2, // DWORD biCompression;
0,
0, // DWORD biSizeImage;
0x000007d0, // LONG
biXPelsPerMeter;
0x0000cf27, // LONG
biYPelsPerMeter;
0, // DWORD biClrUsed;
0 // DWORD biClrImportant;
}
},
0x0006f498,
1,
KS_MPEG2Profile_Main,
KS_MPEG2Level_Main,
KS_MPEG2_DVB_UserData,
(DWORD)bSequenceHeader,
}
};



From: Max Paklin on
Your format description is wrong.

You either tell that it is transport stream and that's where you use
KS_DATARANGE with
> STATIC_KSDATAFORMAT_TYPE_STREAM, // aka. MEDIATYPE_Stream
> STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT, //MEDIASUBTYPE MPEG2

Or you tell the system that you have MPEG2 video and that's when you use
KS_DATARANGE_MPEG2_VIDEO and all those MPEG2 goodies.


So change the descriptor to simple one (see below) and it should work.

static KS_DATARANGE StreamFormatMPEG2_Capture =
{
// KSDATARANGE
{
sizeof (KS_DATARANGE ), // FormatSize
0, // Flags
0, // SampleSize
0, // Reserved

STATIC_KSDATAFORMAT_TYPE_STREAM, // aka. MEDIATYPE_Stream
STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT, //MEDIASUBTYPE MPEG2
TRANSPORT,
STATIC_KSDATAFORMAT_SPECIFIER_NONE // aka. None
};

-- Max.




"dos" <dos(a)discussions.microsoft.com> wrote in message
news:0221258C-4FDF-4BB9-9071-460BC94C1E64(a)microsoft.com...
> Hi all,
>
> I'm developing a Stream Class minidriver to catch MPEG2-TS from a USB-TV
> box. I modified Testcap, sample code of DDK. Then I use GraphEdit to
> connect
> my filter to VMR. Kernel message shows that system loads mpg2dmx to open
> my
> stream. But after receiving 3 SRB_GET_DATA_INTERSECTION commands, an error
> message is shown as: "These filters can't agree on a connection. Verify
> type
> compatibility of input pin and output pin."
> Please help me to check out my format definition. What's wrong with it?
> Thanks!
>
> static KS_DATARANGE_MPEG2_VIDEO StreamFormatMPEG2_Capture =
> {
> // KSDATARANGE
> {
> sizeof (KS_DATARANGE_MPEG2_VIDEO), // FormatSize
> 0, // Flags
> 0, // SampleSize
> 0, // Reserved
>
> STATIC_KSDATAFORMAT_TYPE_STREAM, // aka. MEDIATYPE_Stream
> STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT, //MEDIASUBTYPE MPEG2
> TRANSPORT,
> // STATIC_KSDATAFORMAT_SPECIFIER_NONE // aka. None
> STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO // aka. None
> },
>
> TRUE, // BOOL, bFixedSizeSamples (all samples same
> size?)
> FALSE, // BOOL, bTemporalCompression (all I frames?)
> 0, // Reserved (was StreamDescriptionFlags)
> 0, // Reserved (was MemoryAllocationFlags
> (KS_VIDEO_ALLOC_*))
>
> // _KS_VIDEO_STREAM_CONFIG_CAPS
> {
> STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO, // GUID
> KS_AnalogVideo_None, // This is a digital sensor
> 720,480, // InputSize, (the inherent size of the incoming
> signal
> // with every digitized pixel unique)
> 160,120, // MinCroppingSize, smallest rcSrc cropping rect
> allowed
> 720,480, // MaxCroppingSize, largest rcSrc cropping rect
> allowed
> 8, // CropGranularityX, granularity of cropping size
> 1, // CropGranularityY
> 8, // CropAlignX, alignment of cropping rect
> 1, // CropAlignY;
> 160, 120, // MinOutputSize, smallest bitmap stream can
> produce
> 720, 480, // MaxOutputSize, largest bitmap stream can
> produce
> 8, // OutputGranularityX, granularity of output bitmap
> size
> 1, // OutputGranularityY;
> 0, // StretchTapsX (0 no stretch, 1 pix dup, 2
> interp...)
> 0, // StretchTapsY
> 0, // ShrinkTapsX
> 0, // ShrinkTapsY
> 333667, // MinFrameInterval, 100 nS units
> 640000000, // MaxFrameInterval, 100 nS units
> 8 * 2 * 30 * 160 * 120, // MinBitsPerSecond;
> 8 * 2 * 30 * 720 * 480 // MaxBitsPerSecond;
> },
>
> //KS_MPEGVIDEOINFO2
> {
> // KS_VIDEOINFOHEADER2 (default format)
> {
> 0,0,720,480, // RECT rcSource;
> 0,0,0,0, // RECT rcTarget;
> 0x003d0900, // DWORD dwBitRate;
> 0L, // DWORD dwBitErrorRate;
> 333667, // REFERENCE_TIME
> AvgTimePerFrame;
>
> KS_INTERLACE_UNUSED, // DWORD dwInterlaceFlags
> 0, // DWORD dwCopyProtectFlags
> 4, // DWORD dwPictAspectRatioX
> 3, // DWORD dwPictAspectRatioY
> 0, // DWORD dwReserved1
> 0, // DWORD dwReserved2
>
> // KS_BITMAPINFOHEADER
> {
> sizeof (KS_BITMAPINFOHEADER), // DWORD biSize;
> D_X, // LONG biWidth;
> D_Y, // LONG biHeight;
> 0, // WORD biPlanes;
> 0, // WORD biBitCount;
> // FOURCC_MPEG2, // DWORD biCompression;
> 0,
> 0, // DWORD biSizeImage;
> 0x000007d0, // LONG
> biXPelsPerMeter;
> 0x0000cf27, // LONG
> biYPelsPerMeter;
> 0, // DWORD biClrUsed;
> 0 // DWORD biClrImportant;
> }
> },
> 0x0006f498,
> 1,
> KS_MPEG2Profile_Main,
> KS_MPEG2Level_Main,
> KS_MPEG2_DVB_UserData,
> (DWORD)bSequenceHeader,
> }
> };
>
>
>


From: dos on
Hi Max,

Thanks for your suggestion.
But my capture pin still can't be connect with VMR in GraphEdit, even after
I modified the structure just like your code. Maybe I don't process
SRB_GET_DATA_INTERSECTION in a correct way? It's complicated to fill all data
structures for separate command. Can you supply any sample code that can
capture TS stream by Stream Class minidriver for me?
Thanks again.

"Max Paklin" wrote:

> Your format description is wrong.
>
> You either tell that it is transport stream and that's where you use
> KS_DATARANGE with
> > STATIC_KSDATAFORMAT_TYPE_STREAM, // aka. MEDIATYPE_Stream
> > STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT, //MEDIASUBTYPE MPEG2
>
> Or you tell the system that you have MPEG2 video and that's when you use
> KS_DATARANGE_MPEG2_VIDEO and all those MPEG2 goodies.
>
>
> So change the descriptor to simple one (see below) and it should work.
>
> static KS_DATARANGE StreamFormatMPEG2_Capture =
> {
> // KSDATARANGE
> {
> sizeof (KS_DATARANGE ), // FormatSize
> 0, // Flags
> 0, // SampleSize
> 0, // Reserved
>
> STATIC_KSDATAFORMAT_TYPE_STREAM, // aka. MEDIATYPE_Stream
> STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT, //MEDIASUBTYPE MPEG2
> TRANSPORT,
> STATIC_KSDATAFORMAT_SPECIFIER_NONE // aka. None
> };
>
> -- Max.
>
>
>
>
> "dos" <dos(a)discussions.microsoft.com> wrote in message
> news:0221258C-4FDF-4BB9-9071-460BC94C1E64(a)microsoft.com...
> > Hi all,
> >
> > I'm developing a Stream Class minidriver to catch MPEG2-TS from a USB-TV
> > box. I modified Testcap, sample code of DDK. Then I use GraphEdit to
> > connect
> > my filter to VMR. Kernel message shows that system loads mpg2dmx to open
> > my
> > stream. But after receiving 3 SRB_GET_DATA_INTERSECTION commands, an error
> > message is shown as: "These filters can't agree on a connection. Verify
> > type
> > compatibility of input pin and output pin."
> > Please help me to check out my format definition. What's wrong with it?
> > Thanks!
> >
> > static KS_DATARANGE_MPEG2_VIDEO StreamFormatMPEG2_Capture =
> > {
> > // KSDATARANGE
> > {
> > sizeof (KS_DATARANGE_MPEG2_VIDEO), // FormatSize
> > 0, // Flags
> > 0, // SampleSize
> > 0, // Reserved
> >
> > STATIC_KSDATAFORMAT_TYPE_STREAM, // aka. MEDIATYPE_Stream
> > STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT, //MEDIASUBTYPE MPEG2
> > TRANSPORT,
> > // STATIC_KSDATAFORMAT_SPECIFIER_NONE // aka. None
> > STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO // aka. None
> > },
> >
> > TRUE, // BOOL, bFixedSizeSamples (all samples same
> > size?)
> > FALSE, // BOOL, bTemporalCompression (all I frames?)
> > 0, // Reserved (was StreamDescriptionFlags)
> > 0, // Reserved (was MemoryAllocationFlags
> > (KS_VIDEO_ALLOC_*))
> >
> > // _KS_VIDEO_STREAM_CONFIG_CAPS
> > {
> > STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO, // GUID
> > KS_AnalogVideo_None, // This is a digital sensor
> > 720,480, // InputSize, (the inherent size of the incoming
> > signal
> > // with every digitized pixel unique)
> > 160,120, // MinCroppingSize, smallest rcSrc cropping rect
> > allowed
> > 720,480, // MaxCroppingSize, largest rcSrc cropping rect
> > allowed
> > 8, // CropGranularityX, granularity of cropping size
> > 1, // CropGranularityY
> > 8, // CropAlignX, alignment of cropping rect
> > 1, // CropAlignY;
> > 160, 120, // MinOutputSize, smallest bitmap stream can
> > produce
> > 720, 480, // MaxOutputSize, largest bitmap stream can
> > produce
> > 8, // OutputGranularityX, granularity of output bitmap
> > size
> > 1, // OutputGranularityY;
> > 0, // StretchTapsX (0 no stretch, 1 pix dup, 2
> > interp...)
> > 0, // StretchTapsY
> > 0, // ShrinkTapsX
> > 0, // ShrinkTapsY
> > 333667, // MinFrameInterval, 100 nS units
> > 640000000, // MaxFrameInterval, 100 nS units
> > 8 * 2 * 30 * 160 * 120, // MinBitsPerSecond;
> > 8 * 2 * 30 * 720 * 480 // MaxBitsPerSecond;
> > },
> >
> > //KS_MPEGVIDEOINFO2
> > {
> > // KS_VIDEOINFOHEADER2 (default format)
> > {
> > 0,0,720,480, // RECT rcSource;
> > 0,0,0,0, // RECT rcTarget;
> > 0x003d0900, // DWORD dwBitRate;
> > 0L, // DWORD dwBitErrorRate;
> > 333667, // REFERENCE_TIME
> > AvgTimePerFrame;
> >
> > KS_INTERLACE_UNUSED, // DWORD dwInterlaceFlags
> > 0, // DWORD dwCopyProtectFlags
> > 4, // DWORD dwPictAspectRatioX
> > 3, // DWORD dwPictAspectRatioY
> > 0, // DWORD dwReserved1
> > 0, // DWORD dwReserved2
> >
> > // KS_BITMAPINFOHEADER
> > {
> > sizeof (KS_BITMAPINFOHEADER), // DWORD biSize;
> > D_X, // LONG biWidth;
> > D_Y, // LONG biHeight;
> > 0, // WORD biPlanes;
> > 0, // WORD biBitCount;
> > // FOURCC_MPEG2, // DWORD biCompression;
> > 0,
> > 0, // DWORD biSizeImage;
> > 0x000007d0, // LONG
> > biXPelsPerMeter;
> > 0x0000cf27, // LONG
> > biYPelsPerMeter;
> > 0, // DWORD biClrUsed;
> > 0 // DWORD biClrImportant;
> > }
> > },
> > 0x0006f498,
> > 1,
> > KS_MPEG2Profile_Main,
> > KS_MPEG2Level_Main,
> > KS_MPEG2_DVB_UserData,
> > (DWORD)bSequenceHeader,
> > }
>
From: dos on
Hi Max,

Thanks for your suggestion.
But my capture pin still can't be connect with VMR in GraphEdit, even after
I modified the structure just like your code. Maybe I don't process
SRB_GET_DATA_INTERSECTION in a correct way? It's complicated to fill all data
structures for separate command. Can you supply any sample code that can
capture TS stream by Stream Class minidriver for me?
Thanks again.

"Max Paklin" wrote:

> Your format description is wrong.
>
> You either tell that it is transport stream and that's where you use
> KS_DATARANGE with
> > STATIC_KSDATAFORMAT_TYPE_STREAM, // aka. MEDIATYPE_Stream
> > STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT, //MEDIASUBTYPE MPEG2
>
> Or you tell the system that you have MPEG2 video and that's when you use
> KS_DATARANGE_MPEG2_VIDEO and all those MPEG2 goodies.
>
>
> So change the descriptor to simple one (see below) and it should work.
>
> static KS_DATARANGE StreamFormatMPEG2_Capture =
> {
> // KSDATARANGE
> {
> sizeof (KS_DATARANGE ), // FormatSize
> 0, // Flags
> 0, // SampleSize
> 0, // Reserved
>
> STATIC_KSDATAFORMAT_TYPE_STREAM, // aka. MEDIATYPE_Stream
> STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT, //MEDIASUBTYPE MPEG2
> TRANSPORT,
> STATIC_KSDATAFORMAT_SPECIFIER_NONE // aka. None
> };
>
> -- Max.
>
>
>
>
> "dos" <dos(a)discussions.microsoft.com> wrote in message
> news:0221258C-4FDF-4BB9-9071-460BC94C1E64(a)microsoft.com...
> > Hi all,
> >
> > I'm developing a Stream Class minidriver to catch MPEG2-TS from a USB-TV
> > box. I modified Testcap, sample code of DDK. Then I use GraphEdit to
> > connect
> > my filter to VMR. Kernel message shows that system loads mpg2dmx to open
> > my
> > stream. But after receiving 3 SRB_GET_DATA_INTERSECTION commands, an error
> > message is shown as: "These filters can't agree on a connection. Verify
> > type
> > compatibility of input pin and output pin."
> > Please help me to check out my format definition. What's wrong with it?
> > Thanks!
> >
> > static KS_DATARANGE_MPEG2_VIDEO StreamFormatMPEG2_Capture =
> > {
> > // KSDATARANGE
> > {
> > sizeof (KS_DATARANGE_MPEG2_VIDEO), // FormatSize
> > 0, // Flags
> > 0, // SampleSize
> > 0, // Reserved
> >
> > STATIC_KSDATAFORMAT_TYPE_STREAM, // aka. MEDIATYPE_Stream
> > STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT, //MEDIASUBTYPE MPEG2
> > TRANSPORT,
> > // STATIC_KSDATAFORMAT_SPECIFIER_NONE // aka. None
> > STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO // aka. None
> > },
> >
> > TRUE, // BOOL, bFixedSizeSamples (all samples same
> > size?)
> > FALSE, // BOOL, bTemporalCompression (all I frames?)
> > 0, // Reserved (was StreamDescriptionFlags)
> > 0, // Reserved (was MemoryAllocationFlags
> > (KS_VIDEO_ALLOC_*))
> >
> > // _KS_VIDEO_STREAM_CONFIG_CAPS
> > {
> > STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO, // GUID
> > KS_AnalogVideo_None, // This is a digital sensor
> > 720,480, // InputSize, (the inherent size of the incoming
> > signal
> > // with every digitized pixel unique)
> > 160,120, // MinCroppingSize, smallest rcSrc cropping rect
> > allowed
> > 720,480, // MaxCroppingSize, largest rcSrc cropping rect
> > allowed
> > 8, // CropGranularityX, granularity of cropping size
> > 1, // CropGranularityY
> > 8, // CropAlignX, alignment of cropping rect
> > 1, // CropAlignY;
> > 160, 120, // MinOutputSize, smallest bitmap stream can
> > produce
> > 720, 480, // MaxOutputSize, largest bitmap stream can
> > produce
> > 8, // OutputGranularityX, granularity of output bitmap
> > size
> > 1, // OutputGranularityY;
> > 0, // StretchTapsX (0 no stretch, 1 pix dup, 2
> > interp...)
> > 0, // StretchTapsY
> > 0, // ShrinkTapsX
> > 0, // ShrinkTapsY
> > 333667, // MinFrameInterval, 100 nS units
> > 640000000, // MaxFrameInterval, 100 nS units
> > 8 * 2 * 30 * 160 * 120, // MinBitsPerSecond;
> > 8 * 2 * 30 * 720 * 480 // MaxBitsPerSecond;
> > },
> >
> > //KS_MPEGVIDEOINFO2
> > {
> > // KS_VIDEOINFOHEADER2 (default format)
> > {
> > 0,0,720,480, // RECT rcSource;
> > 0,0,0,0, // RECT rcTarget;
> > 0x003d0900, // DWORD dwBitRate;
> > 0L, // DWORD dwBitErrorRate;
> > 333667, // REFERENCE_TIME
> > AvgTimePerFrame;
> >
> > KS_INTERLACE_UNUSED, // DWORD dwInterlaceFlags
> > 0, // DWORD dwCopyProtectFlags
> > 4, // DWORD dwPictAspectRatioX
> > 3, // DWORD dwPictAspectRatioY
> > 0, // DWORD dwReserved1
> > 0, // DWORD dwReserved2
> >
> > // KS_BITMAPINFOHEADER
> > {
> > sizeof (KS_BITMAPINFOHEADER), // DWORD biSize;
> > D_X, // LONG biWidth;
> > D_Y, // LONG biHeight;
> > 0, // WORD biPlanes;
> > 0, // WORD biBitCount;
> > // FOURCC_MPEG2, // DWORD biCompression;
> > 0,
> > 0, // DWORD biSizeImage;
> > 0x000007d0, // LONG
> > biXPelsPerMeter;
> > 0x0000cf27, // LONG
> > biYPelsPerMeter;
> > 0, // DWORD biClrUsed;
> > 0 // DWORD biClrImportant;
> > }
> > },
> > 0x0006f498,
> > 1,
> > KS_MPEG2Profile_Main,
> > KS_MPEG2Level_Main,
> > KS_MPEG2_DVB_UserData,
> > (DWORD)bSequenceHeader,
> > }
>
From: Max Paklin on
I have no samples that I can share on this subject.
Do you have MPEG2 decoder software on your machine? You can't hook MPEG2TS
output to VMR. It has to go via MPEG2 Demux and MPEG2 A/V Decoders.

-- Max.



"dos" <dos(a)discussions.microsoft.com> wrote in message
news:5BA13A1A-6648-4767-9542-99BC05732E0F(a)microsoft.com...
> Hi Max,
>
> Thanks for your suggestion.
> But my capture pin still can't be connect with VMR in GraphEdit, even
> after
> I modified the structure just like your code. Maybe I don't process
> SRB_GET_DATA_INTERSECTION in a correct way? It's complicated to fill all
> data
> structures for separate command. Can you supply any sample code that can
> capture TS stream by Stream Class minidriver for me?
> Thanks again.
>
> "Max Paklin" wrote:
>
>> Your format description is wrong.
>>
>> You either tell that it is transport stream and that's where you use
>> KS_DATARANGE with
>> > STATIC_KSDATAFORMAT_TYPE_STREAM, // aka.
>> > MEDIATYPE_Stream
>> > STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT, //MEDIASUBTYPE MPEG2
>>
>> Or you tell the system that you have MPEG2 video and that's when you use
>> KS_DATARANGE_MPEG2_VIDEO and all those MPEG2 goodies.
>>
>>
>> So change the descriptor to simple one (see below) and it should work.
>>
>> static KS_DATARANGE StreamFormatMPEG2_Capture =
>> {
>> // KSDATARANGE
>> {
>> sizeof (KS_DATARANGE ), // FormatSize
>> 0, // Flags
>> 0, // SampleSize
>> 0, // Reserved
>>
>> STATIC_KSDATAFORMAT_TYPE_STREAM, // aka. MEDIATYPE_Stream
>> STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT, //MEDIASUBTYPE MPEG2
>> TRANSPORT,
>> STATIC_KSDATAFORMAT_SPECIFIER_NONE // aka. None
>> };
>>
>> -- Max.
>>
>>
>>
>>
>> "dos" <dos(a)discussions.microsoft.com> wrote in message
>> news:0221258C-4FDF-4BB9-9071-460BC94C1E64(a)microsoft.com...
>> > Hi all,
>> >
>> > I'm developing a Stream Class minidriver to catch MPEG2-TS from a
>> > USB-TV
>> > box. I modified Testcap, sample code of DDK. Then I use GraphEdit to
>> > connect
>> > my filter to VMR. Kernel message shows that system loads mpg2dmx to
>> > open
>> > my
>> > stream. But after receiving 3 SRB_GET_DATA_INTERSECTION commands, an
>> > error
>> > message is shown as: "These filters can't agree on a connection. Verify
>> > type
>> > compatibility of input pin and output pin."
>> > Please help me to check out my format definition. What's wrong with it?
>> > Thanks!
>> >
>> > static KS_DATARANGE_MPEG2_VIDEO StreamFormatMPEG2_Capture =
>> > {
>> > // KSDATARANGE
>> > {
>> > sizeof (KS_DATARANGE_MPEG2_VIDEO), // FormatSize
>> > 0, // Flags
>> > 0, // SampleSize
>> > 0, // Reserved
>> >
>> > STATIC_KSDATAFORMAT_TYPE_STREAM, // aka.
>> > MEDIATYPE_Stream
>> > STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT, //MEDIASUBTYPE MPEG2
>> > TRANSPORT,
>> > // STATIC_KSDATAFORMAT_SPECIFIER_NONE // aka. None
>> > STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO // aka. None
>> > },
>> >
>> > TRUE, // BOOL, bFixedSizeSamples (all samples same
>> > size?)
>> > FALSE, // BOOL, bTemporalCompression (all I frames?)
>> > 0, // Reserved (was StreamDescriptionFlags)
>> > 0, // Reserved (was MemoryAllocationFlags
>> > (KS_VIDEO_ALLOC_*))
>> >
>> > // _KS_VIDEO_STREAM_CONFIG_CAPS
>> > {
>> > STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO, // GUID
>> > KS_AnalogVideo_None, // This is a digital
>> > sensor
>> > 720,480, // InputSize, (the inherent size of the incoming
>> > signal
>> > // with every digitized pixel unique)
>> > 160,120, // MinCroppingSize, smallest rcSrc cropping rect
>> > allowed
>> > 720,480, // MaxCroppingSize, largest rcSrc cropping rect
>> > allowed
>> > 8, // CropGranularityX, granularity of cropping
>> > size
>> > 1, // CropGranularityY
>> > 8, // CropAlignX, alignment of cropping rect
>> > 1, // CropAlignY;
>> > 160, 120, // MinOutputSize, smallest bitmap stream can
>> > produce
>> > 720, 480, // MaxOutputSize, largest bitmap stream can
>> > produce
>> > 8, // OutputGranularityX, granularity of output
>> > bitmap
>> > size
>> > 1, // OutputGranularityY;
>> > 0, // StretchTapsX (0 no stretch, 1 pix dup, 2
>> > interp...)
>> > 0, // StretchTapsY
>> > 0, // ShrinkTapsX
>> > 0, // ShrinkTapsY
>> > 333667, // MinFrameInterval, 100 nS units
>> > 640000000, // MaxFrameInterval, 100 nS units
>> > 8 * 2 * 30 * 160 * 120, // MinBitsPerSecond;
>> > 8 * 2 * 30 * 720 * 480 // MaxBitsPerSecond;
>> > },
>> >
>> > //KS_MPEGVIDEOINFO2
>> > {
>> > // KS_VIDEOINFOHEADER2 (default format)
>> > {
>> > 0,0,720,480, // RECT rcSource;
>> > 0,0,0,0, // RECT rcTarget;
>> > 0x003d0900, // DWORD dwBitRate;
>> > 0L, // DWORD dwBitErrorRate;
>> > 333667, // REFERENCE_TIME
>> > AvgTimePerFrame;
>> >
>> > KS_INTERLACE_UNUSED, // DWORD dwInterlaceFlags
>> > 0, // DWORD dwCopyProtectFlags
>> > 4, // DWORD dwPictAspectRatioX
>> > 3, // DWORD dwPictAspectRatioY
>> > 0, // DWORD dwReserved1
>> > 0, // DWORD dwReserved2
>> >
>> > // KS_BITMAPINFOHEADER
>> > {
>> > sizeof (KS_BITMAPINFOHEADER), // DWORD biSize;
>> > D_X, // LONG biWidth;
>> > D_Y, // LONG biHeight;
>> > 0, // WORD biPlanes;
>> > 0, // WORD biBitCount;
>> > // FOURCC_MPEG2, // DWORD biCompression;
>> > 0,
>> > 0,