[Live-devel] RTSP customization

Victor Kozhuhov vkozhuhov at gmx.net
Wed Aug 23 18:40:55 PDT 2006


Hello,

I am writing a sort of custom RTSP server application, intended to stream
specific media files on demand.
When application starts, I have no idea about real file names, so I am
unable to create ServerMediaSession objects and submit them to the server
prior to event loop.
It is possible to list the directory on startup, but its content may change
in run time.

Please let me know if the is an elegant way to update ServerMediaSessions
table in run-time in some special case (for example, if request link is not
listed)?

I failed to find such feature in the RTSPServer code, so I am going to
implement a sort of extrnal event handler mechanism: declare special pure
interface (some RTSPServerExtender with several events onXXX(...) ),
implement this interface in my application and pass it to the server. Than
server will call corresponding handler about error or other special
condition, so it may react properly (update table).

I found the following in August mail list digest:
"You can add new "ServerMediaSession" objects to (or remove existing
"ServerMediaSession" objects from) a running RTSPServer at any time.
But you do this within the event loop - not using threads.  Please,
everybody, read the FAQ! "

I did it - really :-)

Actually, there is no problem to schedule a task for listing the directory,
looking for newly appeared / removed files and updating ServerMediaSession
table in run time, but this idea has several disadvantages (for example, if
there are 1000 new files in the directory, but the client will ask for only
one, it is not necessary to list all of them).

Please let me know if there is a way to do what I want without modifying the
server code?
If not - please tell me if you are intersted in such modification and
corresponding sources submit?

Thank you in advance,
Victor.



More information about the live-devel mailing list