[Live-devel] Using an SDP file to receive an RTP stream

Ross Finlayson finlayson at live555.com
Tue Nov 7 05:20:27 PST 2006


>So, I am wondering if anyone has suggestions or hints about how to hack
>openrtsp for directly using an SDP file (instead of an rtsp:// url).

First, I presume that this is a multicast stream, rather than a 
unicast stream.  (A unicast stream cannot be received using a SDP 
description alone, because - for unicast streams - you need aditional 
port number information that can be determined only using the RTSP 
protocol (SETUP and PLAY).)

Receiving a multicast stream from a SDP description is easy.  Don't 
"hack openRTSP"; instead, just write your own application that:
1/ Creates a "MediaSession" object, using
	MediaSession* mediaSession = MediaSession::createNew(*env, 
sdpDescription);
2/ Iterate through each of the session's "MediaSubsession" objects, 
'initiating' each one.  (This creates "RTPSource" and "RTCPInstance" 
objects for each.)
	subsession->initiate();
3/ Then, for each "MediaSubsession", create a 'sink' object, and 
start playing it, to receive the stream:
	sink->startPlaying(*(subsession->readSource()), ...);
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


More information about the live-devel mailing list