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,
From: dos on
Hi Max,

Thanks for your suggestion!
I change my code in the way your suggested:
static KSDATARANGE StreamFormatMPEG2_Capture =
{
// KSDATARANGE
sizeof (KSDATARANGE), // 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
};
Now, capture pin can be connected with MPEG2 demultiplexer. But when I "run"
the graph, an error message is shown: "The graph could not change the state".
The return code is 0x800706f8. It means user buffer is invalid.
Why?

dos

"Max Paklin" wrote:

> 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
> >> > {
> >> > //
From: dos on
Hi Max,

Thanks for your suggestion!
I change my code in the way your suggested:
static KSDATARANGE StreamFormatMPEG2_Capture =
{
// KSDATARANGE
sizeof (KSDATARANGE), // 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
};
Now, capture pin can be connected with MPEG2 demultiplexer. But when I "run"
the graph, an error message is shown: "The graph could not change the state".
The return code is 0x800706f8. It means user buffer is invalid.
Why?

dos

"Max Paklin" wrote:

> 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
> >> > {
> >> > //
From: Max Paklin on
What is your graph topology?
Output A/V pins of the demux are connected, aren't they?

Now it is time to put some breakpoints in your pin handlers and make sure
that state transition is handled correctly.

-- Max.




"dos" <dos(a)discussions.microsoft.com> wrote in message
news:9EC0A3F7-8DA7-4BFB-8CBA-45B752640A65(a)microsoft.com...
> Hi Max,
>
> Thanks for your suggestion!
> I change my code in the way your suggested:
> static KSDATARANGE StreamFormatMPEG2_Capture =
> {
> // KSDATARANGE
> sizeof (KSDATARANGE), // 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
> };
> Now, capture pin can be connected with MPEG2 demultiplexer. But when I
> "run"
> the graph, an error message is shown: "The graph could not change the
> state".
> The return code is 0x800706f8. It means user buffer is invalid.
> Why?
>
> dos
>
> "Max Paklin" wrote:
>
>> 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
>> >>
From: Max Paklin on
What is your graph topology?
Output A/V pins of the demux are connected, aren't they?

Now it is time to put some breakpoints in your pin handlers and make sure
that state transition is handled correctly.

-- Max.




"dos" <dos(a)discussions.microsoft.com> wrote in message
news:9EC0A3F7-8DA7-4BFB-8CBA-45B752640A65(a)microsoft.com...
> Hi Max,
>
> Thanks for your suggestion!
> I change my code in the way your suggested:
> static KSDATARANGE StreamFormatMPEG2_Capture =
> {
> // KSDATARANGE
> sizeof (KSDATARANGE), // 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
> };
> Now, capture pin can be connected with MPEG2 demultiplexer. But when I
> "run"
> the graph, an error message is shown: "The graph could not change the
> state".
> The return code is 0x800706f8. It means user buffer is invalid.
> Why?
>
> dos
>
> "Max Paklin" wrote:
>
>> 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
>> >>
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5
Prev: dxgkdx.dll
Next: Assigning raw mode to PDO in KMDF problem.