Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Streaming file data to WMP

1 view
Skip to first unread message

evanandr

unread,
May 14, 2007, 11:45:01 AM5/14/07
to
I'm new to WMP development and I'm trying to figure out how I can send raw
data (in this case, MPEG-2 TS video) to WMP for streaming playback.

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.

Alessandro Angeli

unread,
May 14, 2007, 2:20:03 PM5/14/07
to
From: "evanandr"

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


evanandr

unread,
May 14, 2007, 3:00:00 PM5/14/07
to
Nothing is confusing when you already know about it and have worked with it.

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.

Alessandro Angeli

unread,
May 14, 2007, 4:16:18 PM5/14/07
to
From: "evanandr"

> 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.

evanandr

unread,
May 14, 2007, 6:04:00 PM5/14/07
to
Thanks for the very detailed help. I'm sure this does get asked a lot. I
assumed this must be a problem seen previously and was surprised I had
trouble finding answers. I guess I needed better search terms.

Thanks again.

0 new messages