[FFmpeg-devel] [PATCH] RTSP muxer, round 5
Martin Storsjö
martin
Mon Feb 22 22:01:36 CET 2010
On Mon, 22 Feb 2010, Ronald S. Bultje wrote:
> Hi,
>
> On Fri, Feb 19, 2010 at 6:05 PM, Martin Storsj? <martin at martin.st> wrote:
> [9]:
>
> +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.
> in write_packet():
>
> + av_init_packet(&local_pkt);
> + local_pkt.stream_index = 0;
> + local_pkt.pts = pkt->pts;
> + local_pkt.flags = pkt->flags;
> + local_pkt.data = pkt->data;
> + local_pkt.size = pkt->size;
>
> Is the packet copy necessary? I'm not totally sure, but could you just
> change pkt->stream_index and forward?
No, doesn't seem to be necessary anymore. I guess this is a remnant from
earlier designs - removed.
Updated patch attached.
// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-an-RTSP-muxer.patch
Type: text/x-diff
Size: 7879 bytes
Desc:
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100222/5d2af1ed/attachment.patch>
More information about the ffmpeg-devel
mailing list