Re: Missing links in RTP streaming solution



On Nov 21, 1:15 pm, "Alessandro Angeli" <nob...@xxxxxxxxxxxxxxxxxx>
wrote:
From: "Ralf Globisch"

[...]

So my first question is: How would I set the output media
type of the RTPSource dynamically? Let's say I didn't
know before hand if I was going to retrieve 352x288 or
320x240?
Since graphs A and B are now disconnected, the only way I
would be able to set the media type of the RTPSource
would be to store data about the media type such as the
VIDEOINFOHEADER in the RTP packet itself or as part of
the payload and once the first packet has been received I
could retrieve this data and set the type of the Source
Filter.
But this needs to be connected to the rest of the
pipeline before receiving the first packet so what am I
missing?

RTP is only a transport protocol and you need an out-of-band
signalling protocol, e.g. RTSP or a custom one, to negotiate
whatever needs negotiating beforehand, that is to establish
a "session". Usually, session establishment takes place
inside the source filter's IFileSourceFile::Load() method
(or upon connection of the input pins for other filters). If
you do not implement IFileSourceFilter, you can move the
negotiation to IBaseFilter::JoinFilterGraph() instead or to
IPin::Connect() (the latter is safer and you should
establish the session right at the beginning of the method,
before the actual connection process starts).

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

Thanks for your speedy responses Geraint and Alessandro ;)

That makes sense though I'm still trying to digest the flow of events
in my head:

1) I open a URL in windows media player e.g.
rtsp://www.somedomain.com/someresource.file_extension
2) Media player does a lookup of .rtsp in the registry and determines
in the "Extensions" sub-key what source filter to use
for .file_extension
3) Media player loads the source filter into the graph
4) In the filter initialisation code I use RTSP or some protocol to
setup my RTP session before streaming starts

One more question though: How does the media player pass through the
"www.somedomain.com/someresource.file_extension" parameter to the
filter?

Thanks again for your replies, I really appreciate it,
Ralf

.



Relevant Pages

  • [ANN] Java Web Parts 1.0 (GA) is now available
    ... The Java Web Parts (JWP) team is proud to announce that new year's day ... Javascript compressor, a request recorder, a cross-site scripting ... filter, a compression filter and an IP access control filter ... Listener - Context and Session listeners for various occassions ...
    (comp.lang.java.programmer)
  • Re: Help regarding writing a Source Filter
    ... I must write a Source Filter that produce out a video stream of YUV ... To attach this DirectShow filter to a source of data (e.g. the YUV frames ... main .NET app) that builds the graph, how I specifiy a destination window ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: direct show design issue
    ... while my the I view different portions from my source filter. ... access the portion of the image that you specify and display it ... next filter is my transform filter. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Playing a MPEG2 file across a UWB Network
    ... > I'm trying to play a MPEG2 file across a UWB network and as such, ... > source filter and attempt to decode it to my MPEG2 demultiplexer. ... As a MPEG2 file is really big, potentially few hundred megs of data, does ...
    (microsoft.public.win32.programmer.directx.video)
  • How to play audio and video from two different sources
    ... My source filter is a modified ... Now I must add a second source of data, namely PCM audio. ... another callback to the C# app that will supply the audio sample. ...
    (microsoft.public.win32.programmer.directx.video)