[FFmpeg-devel] [PATCH] RTSP muxer, round 5

Martin Storsjö martin
Sat Feb 27 11:18:27 CET 2010


On Fri, 26 Feb 2010, Ronald S. Bultje wrote:

> On Fri, Feb 26, 2010 at 11:51 AM, Martin Storsj? <martin at martin.st> wrote:
> > On Fri, 26 Feb 2010, Luca Barbato wrote:
> >> On 02/22/2010 10:01 PM, Martin Storsj? wrote:
> >> > On Mon, 22 Feb 2010, Ronald S. Bultje wrote:
> >> >> On Fri, Feb 19, 2010 at 6:05 PM, Martin Storsj? <martin at martin.st> wrote:
> >> >> +static int rtsp_write_close(AVFormatContext *s)
> >> >> +{
> >> >> + ? ?RTSPState *rt = s->priv_data;
> >> >> + ? ?char cmd[1024];
> >> >> +
> >> >> + ? ?snprintf(cmd, sizeof(cmd),
> >> >> + ? ? ? ? ? ? "PAUSE %s RTSP/1.0\r\n",
> >> >> + ? ? ? ? ? ? s->filename);
> >> >> + ? ?rtsp_send_cmd_async(s, cmd);
> >> >> +
> >> >> + ? ?snprintf(cmd, sizeof(cmd),
> >> >> + ? ? ? ? ? ? "TEARDOWN %s RTSP/1.0\r\n",
> >> >> + ? ? ? ? ? ? s->filename);
> >> >> + ? ?rtsp_send_cmd_async(s, cmd);
> >> >> +
> >> >> + ? ?rtsp_close_streams(s);
> >> >> + ? ?url_close(rt->rtsp_hd);
> >> >> + ? ?return 0;
> >> >> +}
> >> >>
> >> >> Why do you send both PAUSE and TEARDOWN?
> >> >
> >> > I've modelled much behaviour after QuickTime Broadcaster, which did this,
> >> > IIRC. The PAUSE didn't seem to be necessary, though, so removed.
> >>
> >> I'd keep that, teardown is supposed to "just" invalidate rtsp the session...
> >
> > Hmm, ok. Any other statements on this, Luca A, Ronald? I don't know the
> > specs in detail, but can change this if you think that's more correct
> > keeping the PAUSE.
> 
> Luca is my bible when it comes to spec compliance (and he just quoted
> the spec to me on IRC), so if he thinks including PAUSE is better,
> then I think we should include the PAUSE.

Ok, so like the attached then? Or should we use ff_rtsp_send_cmd() which 
waits for the reply before proceeding with sending the next command?

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtsp-pause-teardown.patch
Type: text/x-diff
Size: 698 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100227/5ccf80f6/attachment.patch>



More information about the ffmpeg-devel mailing list