[Live-devel] ServerMediaSession.patch

Andrew Voznytsa andrew.voznytsa at gmail.com
Sat Jan 27 07:14:09 PST 2007


Ok, I'll explain my real use cases.

I wrote DirectShow filter (http://en.wikipedia.org/wiki/DirectShow) 
which is used for streaming in DirectShow environment. Filter has a few 
input pins. Some pre-conditions: it is not necessary that all pins are 
connected. Also it is not necessary that pin connection process happens 
only once. Filter itself is associated with ServerMediaSession. Each 
connected input pin - with ServerMediaSubsession (in my case - some kind 
of PassiveMediaSubsession).

b) Because pins may connect/disconnect in any order I should be able 
possible to add/remove associated subsession on each connect/disconnect 
event.

a) Since it is possible to remove subsession then it is possible to add 
it again. If I do so subsession will get trackNumber equal to number of 
addSubession() calls + 1. This is not right because of compatibility 
with Darwin/QT software - they require trackNumber'ing from 0 if I 
understood it right.

c) I don't use server object for streaming: I save SDP file in Darwin's 
content directory so if anyone requests Darwint to stream 
rtsp://../my.sdp it will wotk in relay mode: listen to my RTP and resend 
it. Because I may stream live content it would be nice to update session 
information. For example if my capture device was reconfigured from 
capturing TV1 channel to TV2 in run time then I'd be able to update 
session info too.. In run time, without recreation ServerMediaSession/etc.

Ross Finlayson wrote:
>> attached is patch for ServerMediaSession which:
>> a) enables user-level control of trackNumber for ServerMediaSubsession.
> 
> I won't be adding this feature, because it is both unnecessary 
> (what's wrong with the current behavior; the user shouldn't care what 
> track numbers the RTSP server uses?), and dangerous (it doesn't 
> prevent duplicate track numbers).
> 
>> b) allows to remove ServerMediaSubsession.
> 
> Can you give an example of a realistic situation where you might want 
> to do this?  (This feature doesn't seem totally unreasonable, but I'm 
> not convinced that is useful enough to add.)
> 
>> c) allows to overwrite 's=' 'i=' during SDP generation process.
> 
> Can you explain why you need this?  In the current code, 
> "ServerMediaSession::generateSDPDescription()" is called only by the 
> RTSP server (to implement the RTSP "DESCRIBE" command).  How would it 
> be possible/appropriate to pass a "info" and/or "description" 
> parameter to the call to "generateSDPDescription()" at this point? 
> Do you have some other situation in mind where you want to call 
> "generateSDPDescription()"?

--
Best regards,
Andrew Voznytsa


More information about the live-devel mailing list