Hi,

Tried building below grpah :

async reader (raw file TransportStream.dat) -> mpeg2 demux -> mpeg2
decoder -> video render

For the above graph I am getting error VFW_E_NO_TRANSPORT
(0x80040266L) , async -> mpeg2demux

* async reader and mpeg2demux are Microsoft's filters without any
modification.
* .dat file type is added in registry which uses async reader as
source filter, majortype - MEDIATYPE_Stream and subtype
MEDIASUBTYPE_MPEG2_TRANSPORT


Queries:
1. I did some search on this error and found
http://groups.google.com/group/microsoft.public.win32.programmer.directx.video/msg/b9947140313f33e5

is this what I have to do?

2. Does mpeg2demux for wince6.0 support MEDIASUBTYPE_MPEG2_TRANSPORT
streams?


Regards,
Dev

Re: mpeg2demux for demuxing raw transport stream by Damon

Damon
Fri Jun 06 13:50:37 PDT 2008

"dev" <krt.dev@gmail.com> wrote in message
news:1985a374-369c-48e7-bb42-aef6e41e9822@a32g2000prf.googlegroups.com...
> Tried building below grpah :
> async reader (raw file TransportStream.dat) -> mpeg2 demux -> mpeg2
> decoder -> video render
> For the above graph I am getting error VFW_E_NO_TRANSPORT
> (0x80040266L) , async -> mpeg2demux
> * async reader and mpeg2demux are Microsoft's filters without any
> modification.
> * .dat file type is added in registry which uses async reader as
> source filter, majortype - MEDIATYPE_Stream and subtype
> MEDIASUBTYPE_MPEG2_TRANSPORT


See http://msdn.microsoft.com/en-us/library/ms787310(VS.85).aspx for more
info. The mpeg2demux filter only supports program streams in pull mode (it
will do program and transport streams in PUSH mode). So when you connect
the filters and the demux sees that the source filter supports IAsyncReader,
it is expecting to do program streams in pull mode. I haven't looked into
the code to see exactly what is happening, although you can do that since
you have the code. But I suspect this is the cause for the failure. You
can either create a push-mode source filter that will read your file, or
create a pull-to-push filter that reads data via IAsyncReader and pushes it
downstream.

--
Damon Barry
Windows Embedded CE Multimedia

This posting is provided "AS IS" with no warranties, and confers no rights.


Re: mpeg2demux for demuxing raw transport stream by dev

dev
Wed Jun 11 07:34:03 PDT 2008

On Jun 7, 1:50 am, "Damon Barry [MSFT]" <dam...@online.microsoft.com>
wrote:
> "dev" <krt....@gmail.com> wrote in message
>
> news:1985a374-369c-48e7-bb42-aef6e41e9822@a32g2000prf.googlegroups.com...
>
> > Tried building below grpah :
> > async reader (raw file TransportStream.dat) ->mpeg2demux ->mpeg2
> > decoder -> video render
> > For the above graph I am getting error VFW_E_NO_TRANSPORT
> > (0x80040266L) , async -> mpeg2demux
> > * async reader and mpeg2demux are Microsoft's filters without any
> > modification.
> > * .dat file type is added in registry which uses async reader as
> > source filter, majortype - MEDIATYPE_Stream and subtype
> > MEDIASUBTYPE_MPEG2_TRANSPORT
>
> Seehttp://msdn.microsoft.com/en-us/library/ms787310(VS.85).aspxfor more
> info. The mpeg2demux filter only supports program streams in pull mode (it
> will do program and transport streams in PUSH mode). So when you connect
> the filters and the demux sees that the source filter supports IAsyncReader,
> it is expecting to do program streams in pull mode. I haven't looked into
> the code to see exactly what is happening, although you can do that since
> you have the code. But I suspect this is the cause for the failure. You
> can either create a push-mode source filter that will read your file, or
> create a pull-to-push filter that reads data via IAsyncReader and pushes it
> downstream.
>
> --DamonBarry
> Windows Embedded CE Multimedia
>
> This posting is provided "AS IS" with no warranties, and confers no rights.

Hi Damon,

Thanks for the reply.

I implemented a push source filter which would read transport stream
and push to mpeg2 demux.
The graph is : Push source --> mpeg2 demux [configured to give one
output pin, PSI] --> PSI parser.

The push source I implemented is reading input file sequentially and
pushing it downstreams.
Should the push source filter do anything apart from file reading
and sending it downstreams ?


Regards,
Dev



Re: mpeg2demux for demuxing raw transport stream by Damon

Damon
Wed Jun 11 09:50:33 PDT 2008

"dev" <krt.dev@gmail.com> wrote in message
news:005a65ab-63b1-41a3-bb33-ad81da0a23ca@u12g2000prd.googlegroups.com...
> Should the push source filter do anything apart from file reading
> and sending it downstreams ?

I don't think it needs to do anything else.
--
Damon Barry
Windows Embedded CE Multimedia

This posting is provided "AS IS" with no warranties, and confers no rights.



Re: mpeg2demux for demuxing raw transport stream by dev

dev
Thu Jun 12 04:26:37 PDT 2008

On Jun 11, 9:50 pm, "Damon Barry [MSFT]" <dam...@online.microsoft.com>
wrote:
> "dev" <krt....@gmail.com> wrote in message
>
> news:005a65ab-63b1-41a3-bb33-ad81da0a23ca@u12g2000prd.googlegroups.com...
>
> > Should the push source filter do anything apart from file reading
> > and sending it downstreams ?
>
> I don't think it needs to do anything else.
> --
> Damon Barry
> Windows Embedded CE Multimedia
>
> This posting is provided "AS IS" with no warranties, and confers no rights.

Hi Damon,

Thanks a lot for the input.

My approach: Push source filter --> mpeg2demux --> PSI parser

* Created PSI pin on mpeg2demux
* PSi parser queried available program and streams and created a pin
for video on demux.


Query:

For creating video pin in demux,using IMpeg2Demultiplexer
interface,CreateOutputPin method I need to pass AM_MEDIA_TYPE.
Does mpeg2demux in any way parse and give media type?
What I see in my mpeg2 decoder is,the same garbage values that I have
filled during creation of video pin.
Do I have to parse this information myselves or I can get it from
demux ?

Any input would be great help

Regards,
Dev

Re: mpeg2demux for demuxing raw transport stream by Damon

Damon
Thu Jun 12 12:39:08 PDT 2008

"dev" <krt.dev@gmail.com> wrote in message
news:8dca83df-7af6-4625-9273-f4e031fd2734@w8g2000prd.googlegroups.com...
> Does mpeg2demux in any way parse and give media type?
> What I see in my mpeg2 decoder is,the same garbage values that I have
> filled during creation of video pin.
> Do I have to parse this information myselves or I can get it from
> demux ?

Check out the following page on MSDN:
http://msdn.microsoft.com/en-us/library/ms787857(VS.85).aspx. It says:

"When the demux filter's output pin connects to the decoder, it offers the
media type that was specified when the pin was created. Because the demux
does not examine the ES byte stream, it does not validate the media type. In
theory, an MPEG-2 decoder should be able to connect with just the major type
and subtype filled in, to indicate the type of data. The decoder should then
examine the sequence headers that arrive in the media samples. However, in
practice, many decoders will not connect unless the media type includes a
complete format block."

So ideally you just set the major and sub types, the filters connect, and
the decoder grabs whatever info it needs directly from the stream. The
media type is there to supply information to the decoder, but if you know
that your decoder is going to ignore the media type, then you don't need to
bother filling it. Is this the case for your decoder?

No, I don't think the demux will parse out this information for you.

--
Damon Barry
Windows Embedded CE Multimedia

This posting is provided "AS IS" with no warranties, and confers no rights.


Re: mpeg2demux for demuxing raw transport stream by dev

dev
Thu Jun 12 22:12:05 PDT 2008

On Jun 13, 12:39 am, "Damon Barry [MSFT]"
<dam...@online.microsoft.com> wrote:
> "dev" <krt....@gmail.com> wrote in message
>
> news:8dca83df-7af6-4625-9273-f4e031fd2734@w8g2000prd.googlegroups.com...
>
> > Does mpeg2demux in any way parse and give media type?
> > What I see in my mpeg2 decoder is,the same garbage values that I have
> > filled during creation of video pin.
> > Do I have to parse this information myselves or I can get it from
> > demux ?
>
> Check out the following page on MSDN:http://msdn.microsoft.com/en-us/library/ms787857(VS.85).aspx. It says:
>
> "When the demux filter's output pin connects to the decoder, it offers the
> media type that was specified when the pin was created. Because the demux
> does not examine the ES byte stream, it does not validate the media type. In
> theory, an MPEG-2 decoder should be able to connect with just the major type
> and subtype filled in, to indicate the type of data. The decoder should then
> examine the sequence headers that arrive in the media samples. However, in
> practice, many decoders will not connect unless the media type includes a
> complete format block."
>
> So ideally you just set the major and sub types, the filters connect, and
> the decoder grabs whatever info it needs directly from the stream. The
> media type is there to supply information to the decoder, but if you know
> that your decoder is going to ignore the media type, then you don't need to
> bother filling it. Is this the case for your decoder?
>
> No, I don't think the demux will parse out this information for you.
>
> --
> Damon Barry
> Windows Embedded CE Multimedia
>
> This posting is provided "AS IS" with no warranties, and confers no rights.

Hi Damon,

Thanks a lot for the reply.

I need info of media type, specifically height and width info before
the transform method is hit.
I typically use info from my input pins media type, but in this case
as I have filled some garbage value I get the same values back.

Is there any place before transform is being called I can parse and
get the properties of stream ?


Regards,
Dev

Re: mpeg2demux for demuxing raw transport stream by Damon

Damon
Fri Jun 13 12:17:34 PDT 2008

"dev" <krt.dev@gmail.com> wrote in message
news:8ca90ce6-c107-4c28-91fe-cdb91fed8614@k13g2000hse.googlegroups.com...
> I need info of media type, specifically height and width info before
> the transform method is hit.
> I typically use info from my input pins media type, but in this case
> as I have filled some garbage value I get the same values back.
> Is there any place before transform is being called I can parse and
> get the properties of stream ?

If the mpeg2demux is operating in PULL mode, then it parses the video
stream, populates the media type (which includes width and height info), and
automatically creates the output pin from the media type. This won't work
for you since you're doing transport streams, which the demux filter only
processes in PUSH mode.

You can look at the code in CMpeg2ProgramStreamAnalyzer::InitVideoStream_()
to see how they're parsing the video. I believe you'll have to add code to
your source filter to parse the transport stream container, and then the
video format within the container, to figure out the width and height.
--
Damon Barry
Windows Embedded CE Multimedia

This posting is provided "AS IS" with no warranties, and confers no rights.


Re: mpeg2demux for demuxing raw transport stream by dev

dev
Wed Jun 18 00:16:49 PDT 2008

On Jun 14, 12:17 am, "Damon Barry [MSFT]"
<dam...@online.microsoft.com> wrote:
> "dev" <krt....@gmail.com> wrote in message
>
> news:8ca90ce6-c107-4c28-91fe-cdb91fed8614@k13g2000hse.googlegroups.com...
>
> > I need info of media type, specifically height and width info before
> > the transform method is hit.
> > I typically use info from my input pins media type, but in this case
> > as I have filled some garbage value I get the same values back.
> > Is there any place before transform is being called I can parse and
> > get the properties of stream ?
>
> If the mpeg2demux is operating in PULL mode, then it parses the video
> stream, populates the media type (which includes width and height info), and
> automatically creates the output pin from the media type. This won't work
> for you since you're doing transport streams, which the demux filter only
> processes in PUSH mode.
>
> You can look at the code in CMpeg2ProgramStreamAnalyzer::InitVideoStream_()
> to see how they're parsing the video. I believe you'll have to add code to
> your source filter to parse the transport stream container, and then the
> video format within the container, to figure out the width and height.
> --DamonBarry
> Windows Embedded CE Multimedia
>
> This posting is provided "AS IS" with no warranties, and confers no rights.

Hi Damon,

Thanks a lot for the input.

Regards,
Dev