Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Entertainment » microsoft.public.windowsmedia.sdk
Thread: Streaming Packets to WMP

HTVi
TV Discussion Newsgroups

Streaming Packets to WMP
"Gur" <gur[ at ]gur.co.il> 5/25/2007 9:04:49 AM
I know this subject is introduced here allot and also was addressed
accordingly (thanks Alessandro Angeli and Chris P.) but my problem is
totally different...
Here is my scenario -
I have a WME9 streaming live video to one WMP9 across the Internet . In the
receiving PC, I'd like to sniff the HTTP packets by some library (WinPcap
for example), and in the callback loop (which gets called upon every
incoming packet and can also fetch their data) I want to stream it again to
a third PC running also WMP9. These packets should be, to my understanding,
compressed HTTP data
packets.

Could this work?
Can I use simply HTTP server logic for implementing the stream source?
Is there some sample that is close to what I need?

Thanks in advance

Gur


Re: Streaming Packets to WMP
"Alessandro Angeli" <nobody[ at ]nowhere.in.the.net> 5/25/2007 4:24:29 PM
From: "Gur"

[Quoted Text]
> I know this subject is introduced here allot and also was
> addressed accordingly (thanks Alessandro Angeli and Chris
> P.) but my problem is totally different...
> Here is my scenario -
> I have a WME9 streaming live video to one WMP9 across the
> Internet . In the receiving PC, I'd like to sniff the
> HTTP packets by some library (WinPcap for example), and
> in the callback loop (which gets called upon every
> incoming packet and can also fetch their data) I want to
> stream it again to a third PC running also WMP9. These
> packets should be, to my understanding, compressed HTTP
> data packets.

There is no such thing as an HTTP packet, let alone a
compressed HTTP packet (well, unless you are using HTTP
chunked bodies compressed for WAP transactions, which is not
WME9's case).

> Could this work?

Yes.

> Can I use simply HTTP server logic for implementing the
> stream source?

It depends on how the third client works, what capabilities
the streaming is supposed to offer and how much dirty work
you are willing to do.

> Is there some sample that is close to what I need?

WindowsMediaServices9 :-)

You should consider the following difficulties:

- the HTTP used by WME9 is not plain HTTP, but it is still
HTTP so this is easy
- HTTP responses are not structured but the data is, which
means that understanding HTTP is not enough
- the structure of the data includes a header (easy to
parse) and then data packets (a nightmare), according to ASF
syntax
- unless the third client is already connected when
streaming begins, you will need to cache the header and then
modify it to reflect the status of the stream at the time of
connection; you may also need to modify the packets
(discontinuity flags and timestamps)
- HTTP is a pull (that is, on-demand) protocol so, if you
want to push the stream to the third client, you will need a
different control layer beside the HTTP transaction

--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


Re: Streaming Packets to WMP
"Neil Smith [MVP Digital Media]" <neil[ at ]nospam.com> 5/25/2007 6:05:26 PM
On Fri, 25 May 2007 11:04:49 +0200, "Gur" <gur[ at ]gur.co.il> wrote:


[Quoted Text]
>Here is my scenario -
>I have a WME9 streaming live video to one WMP9 across the Internet . In the
>receiving PC, I'd like to sniff the HTTP packets by some library (WinPcap
>incoming packet and can also fetch their data) I want to stream it again to
>a third PC running also WMP9


VideoLAN could be used to "reflect" the stream data to another PC
http://www.videolan.org/vlc/features.html

Why you'd want to do that I'm not clear, but there you go.

HTH
Cheers - Neil
------------------------------------------------
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs
Re: Streaming Packets to WMP
"Gur" <gur[ at ]gur.co.il> 5/27/2007 7:27:25 AM

"Alessandro Angeli" <nobody[ at ]nowhere.in.the.net> wrote in message
news:%23Dny8kunHHA.1220[ at ]TK2MSFTNGP03.phx.gbl...
[Quoted Text]
> From: "Gur"
>
>> I know this subject is introduced here allot and also was
>> addressed accordingly (thanks Alessandro Angeli and Chris
>> P.) but my problem is totally different...
>> Here is my scenario -
>> I have a WME9 streaming live video to one WMP9 across the
>> Internet . In the receiving PC, I'd like to sniff the
>> HTTP packets by some library (WinPcap for example), and
>> in the callback loop (which gets called upon every
>> incoming packet and can also fetch their data) I want to
>> stream it again to a third PC running also WMP9. These
>> packets should be, to my understanding, compressed HTTP
>> data packets.
>
> There is no such thing as an HTTP packet, let alone a compressed HTTP
> packet (well, unless you are using HTTP chunked bodies compressed for WAP
> transactions, which is not WME9's case).
>
>> Could this work?
>
> Yes.
>
>> Can I use simply HTTP server logic for implementing the
>> stream source?
>
> It depends on how the third client works, what capabilities the streaming
> is supposed to offer and how much dirty work you are willing to do.
>
>> Is there some sample that is close to what I need?
>
> WindowsMediaServices9 :-)
>
> You should consider the following difficulties:
>
> - the HTTP used by WME9 is not plain HTTP, but it is still HTTP so this is
> easy
> - HTTP responses are not structured but the data is, which means that
> understanding HTTP is not enough
> - the structure of the data includes a header (easy to parse) and then
> data packets (a nightmare), according to ASF syntax

Why do I need to modify the data packets? Can't I just forward to the third
pary as is?

Gur



Re: Streaming Packets to WMP
"Alessandro Angeli" <nobody[ at ]nowhere.in.the.net> 5/28/2007 12:41:37 AM
From: "Gur"

[Quoted Text]
> Why do I need to modify the data packets? Can't I just
> forward to the third pary as is?

If you connect in mid-stream, the timestamps will not be
starting from 0 and the data may not be starting on a clean
point. The receiver may or may not be able to handle such a
situation.


--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


Re: Streaming Packets to WMP
"Gur" <gur[ at ]gur.co.il> 5/28/2007 10:57:28 AM
Thanks
[Quoted Text]
>> Why do I need to modify the data packets? Can't I just
>> forward to the third pary as is?
>
> If you connect in mid-stream, the timestamps will not be starting from 0
> and the data may not be starting on a clean point. The receiver may or may
> not be able to handle such a situation.
>
Thanks,
1. Is the parsing of ASF requires also the decompressing of the packets?

2. Is it possible to simulate such a scenario (in a standard environment of
WMP WME transmition), in which a gap in the timestamps is occurs in the
stream - like in a physical disconnection between WMP and WME. A simple
disconnection would probably handled by the tcp protocol and the missing
packets would be retransmited and it won't work, but is there some better
way to simulate such a gap in order to see the WMP reaction?

Thanks allot Mr. Angeli. Your answers really helped me allot in my mission.

Regards

Gur


Re: Streaming Packets to WMP
"Alessandro Angeli" <nobody[ at ]nowhere.in.the.net> 5/29/2007 9:42:57 PM
From: "Gur"

[Quoted Text]
> 1. Is the parsing of ASF requires also the decompressing
> of the packets?

No.

> 2. Is it possible to simulate such a scenario (in a
> standard environment of WMP WME transmition), in which a
> gap in the timestamps is occurs in the stream - like in a
> physical disconnection between WMP and WME. A simple
> disconnection would probably handled by the tcp protocol
> and the missing packets would be retransmited and it
> won't work, but is there some better way to simulate such
> a gap in order to see the WMP reaction?

The easiest way is to write your own encoder using the
WMWriter and WMWriterNetworkSink objects in the WMF runtime
(see the WMF SDK), which is what WME9 uses itself. Create
your own IWMWriterSink class that wraps the
WMWriterNetworkSink object and simply forwards the calls
but, every once in a while, skips a call to
IWMWriterSink::OnDataUnit().


--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen