[Live-devel] RTSP source for VDR

odjosc at free.fr odjosc at free.fr
Tue Jan 30 06:54:42 PST 2007


Hi,

First, thanks for your response.

> [...]
>
> >Steps 1-6 seem to work OK, even the last playing call but I don't know how
> to
> >get the TS data through a file descriptor.
>
> You don't.  If your incoming TS data is coming from a RTSP stream,
> then it will be coming in on a LIVE555 "MediaSource" object - in your
> case "subsession->readSource()".  To receive this data, you must feed
> it to a "MediaSink" object, and call sink->startPlaying().  See the
> "openRTSP" code ("playCommon.cpp") for examples of this; "openRTSP"
> uses "FileSink" objects to store the incoming data.
>
> I.e., you must write an appropriate "MediaSink" object to handle the
> incoming TS data.  (However, if you plan to just store this in a
> file, then you can use most of the "openRTSP" code as is.  Or, you
> can just run "openRTSP" with the "-v" option, to get the incoming TS
> data written to 'stdout'.)
> --
Unfortunately, it's not that easy because I'm only writing a plugin for VDR. As
far as I understand how it works, I can only tell VDR how to get the TS stream
just creating a "buffer" object and specifying the descriptor to use (ex.:
tsBuffer = new cTSBuffer(file_descriptor, buf_size, parm)). Then, the actual
data is read via an embedded method : tsBuffer->Get.

The goal is to display the stream "on the fly" (VDR is a Mediacenter
application), so it won't be written into a file (well, at least not directly).

Before reading your response, I made additionnal tests where I took data
directly from the subsession's socket (as I wrote in my previous post) and it
worked a few second...(although the frames were displayed slowly and had many
artifacts). Then the RTSP server gave up, because of some buffer concern (well
LiveMedia lib provides some data buffer management, so does VDR as well and
those seem to conflict...).
Reading your post I understand it shouldn't be done this way but as far as I
don't have direct access to VDR buffer, I don't see how to provide it with the
stream from FileSink Object.



More information about the live-devel mailing list