[gst-devel] About videotest and rtsp-server : is-live true and false

Luca Ognibene luca.ognibene at gmail.com
Wed Apr 1 13:59:42 CEST 2009


On Wed, Apr 1, 2009 at 12:37 PM, yangsb <yangsb05 at gmail.com> wrote:
>
> I am trying my rtsp-server using videotestsrc as the video input.
> I found that if the property is-live of videotestsrc is false , my server
> works fine.
> Buf if is-live of videotestsrc is true , my server still works , but the
> client ( vlc media player  )
> can only receiving  packets , not able to decode and display images.
>
> I wish to know what happens to videotestsrc when is-live becomes true ?
>

Hi, i had the same problem yesterday so i know what's going on! At
least i think..
If you set is-live to false:
 * client(vlc) send DESCRIBE request
 * rtsp-server creates your pipeline
 * rtsp-server set_state(gst.STATE_PAUSED) and wait for preroll
 * rtsp-server reply to client
 * client send SETUP and PLAY request
 * rtsp-server set_state(gst.STATE_PLAYING) your pipeline

If you set is-live to true:
 * client(vlc) send DESCRIBE request
 * rtsp-server creates your pipeline
 * rtsp-server set_state(gst.STATE_PLAYING)  (there's no preroll in a
live pipeline)
 * rtsp-server set_state(gst.STATE_PAUSED)
 * rtsp-server reply to client
 * client send SETUP and PLAY request
 * rtsp-server set_state(gst.STATE_PLAYING) your pipeline

This way your client loses buffers created from the first to the
second set_state and if you're encoding in mpeg4/h264 or so your
client will need to wait for the next keyframe to display something.
This is whay i've understood yesterday looking at rtsp-server code
(mainly rtsp-media.c).. please correct me if i'm wrong :)

ciao
Luca




More information about the gstreamer-devel mailing list