The MPEG-2 data is stored inside a much larger file (along with several
other types of data) and I want to pull it into a memory buffer and play it
back without having to pull it out into a .MPEG file first (this is a very
time consuming process on data files in the range of 50-100GB).
I've tried to find answers on this board and in the SDK reference but it's a
bit confusing.
Thanks.
Actually there is nothing confusing in the answers given in
this newgroup several times: you must write a DirectShow
source filter or parser. The exact type of filter depends on
the exact type of data you have (MPEG-2 doesn't say much:
e.g. is it a TS, PS or ES?), the set of other filters you
want it to work with (do you want it to work with the stock
MPEG-2 splitters or some third-party splittters/decoders?)
and how you retrieve the data.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
I couldn't find anything in the forum (no, I didn't read the entire thing
and my searches weren't finding much), the SDK reference is what was
confusing (to a WMP development newbie like myself).
As you'll note in my original message, this is transport stream data (TS). I
want this to be as generic as possible so stock splitters/decoders would be
ideal.
If you know of any good guides/tutorials/examples of DirectShow source
filters I'd appreciate a link. If not, I'll see what I can find myself.
Thanks.
> Nothing is confusing when you already know about it and
> have worked with it.
I meant this question is asked almost on a weekly basis and
I personally and others as well have given more or less
detailed instructions on several occasions.
> I couldn't find anything in the forum (no, I didn't read
> the entire thing and my searches weren't finding much),
> the SDK reference is what was confusing (to a WMP
> development newbie like myself).
On this I'll always agree: the WMP SDK could spend 2 lines
to clearly state that it only deal with the WMP
*application* API while for format support you should look
at DirectShow.
> As you'll note in my original message, this is transport
> stream data (TS). I want this to be as generic as
> possible so stock splitters/decoders would be ideal.
Since you have a TS, you're lucky and you can write a simple
push source that will work with the stock MPEG-2
Demultiplexer.
> If you know of any good guides/tutorials/examples of
> DirectShow source filters I'd appreciate a link. If not,
> I'll see what I can find myself.
The DirectShow SDK (part of the Platform/Windows SDK)
contains tutorials and samples. You should look at either
the Push or Ball samples (which output uncompressed video,
so you'll need to change them to output a TS stream: see the
doc page about the MPEG-2 Demultiplexer for supported media
types). The CSource base class reference privides
instructions on how to write a push source and the chapter
"Writing DirectShow Filters" in the "Using DirectShow"
section provides background info on DS filters. You should
also read the "About DirectShow" section first.
Thanks again.