[Live-devel] How can I receive RTCP message when using
SimpleRTPSink
Ross Finlayson
finlayson at live.com
Wed May 19 16:43:35 PDT 2004
>In my program, I have the following code to create a Program Stream
No, for the code you've writtenn, the input source should be a *Transport*
Stream, not a Program Stream. (To stream a Program Stream, you use a MIME
subtype of "mp2p" (rather than "mp2t"), and must use a dynamic payload type
(i.e., >= 96, *not* 33).)
>and send
>to a SimpleRTPSink.
>
> aSimpleRTPSink = SimpleRTPSink::createNew(*env, rtpGroupsock, 33, 90000,
>"video", "mp2t");
> // Create (and start) a 'RTCP instance' for this RTP sink:
> const unsigned maxCNAMElen = 100;
> unsigned char CNAME[maxCNAMElen+1];
> gethostname((char*)CNAME, maxCNAMElen);
> CNAME[maxCNAMElen] = '\0'; // just in case
>
> // Create (and start) a 'RTCP instance' for this RTP sink:
> const unsigned totalSessionBandwidth = 4500; // in kbps; for RTCP b/w
>share
>
> RTCPInstance::createNew(*env, rtcpGroupsock,
> totalSessionBandwidth, CNAME,
> aSimpleRTPSink, NULL /* we're a server */, isSSM);
> // Note: This starts RTCP running automatically
> aSimpleRTPSink->startPlaying(*fileSource, afterPlaying, aSimpleRTPSink);
This code is correct - provided that your input source is a Transport
Stream (not a Program Stream).
>Then I use VLC to view the content using "udp://@239.255.42.42:6666". I can
>view the stream with noises since I am transferring a program stream using a
>transport stream format. But I didn't observe any RTCP RR messages.
This is the fault of VLC. It's handling of "udp://" URLs is a hack, and
doesn't use the LIVE.COM code. It just ignores the RTP header (if
present), and doesn't process or send back RTCP at all.
Ross Finlayson
LIVE.COM
<http://www.live.com/>
More information about the live-devel
mailing list