[FFmpeg-devel] [RFC] Separating the RTSP muxer/demuxer and SDP demuxer

Ronald S. Bultje rsbultje
Thu Oct 7 14:24:31 CEST 2010


Hi,

On Thu, Oct 7, 2010 at 6:01 AM, Martin Storsj? <martin at martin.st> wrote:
> The rtpdec code has dependencies on some other demuxers, that are chained
> for decoding some formats. More precisely, the asf, rm, mpegts and mov
> demuxers are used.

(I don't think you're discussing this part here yet, but here goes
anyway.) This can be fixed in part, but it's not pretty.
- mpegts and asf will always be enabled, the RTP stream contains full
demuxer streams
- only a small subset of mov/rm is used, so we can split that in new
shared files or add relevant #if .._DEMUXER in movdec/rmdec.c (little
ugly)

> rtsp.c ? ? ? - handling of RTSP protocol things, shared by the RTSP muxer
> ? ? ? ? ? ? ? and demuxer
> rtspenc.c ? ?- RTSP muxer only
> rtspcommon.c - common code shared by all three components, such as opening
> ? ? ? ? ? ? ? of the transport contexts, cleanup of transport contexts,
> ? ? ? ? ? ? ? common parsing helpers such as get_word(), get_word_sep(),
> ? ? ? ? ? ? ? get_word_until_chars()
> rtprecv.c ? ?- functions for receiving RTP packets, shared by the RTSP and
> ? ? ? ? ? ? ? SDP demuxers
> rtspdec.c ? ?- RTSP demuxer only
> sdpdec.c ? ? - SDP demuxer only
>
> (This is written on top of the patches from the SAP muxer, where common
> code for setting up a chained RTP muxer is split into rtpenc_chain.c.)
>
> So, the files built for each of the three components would be:
>
> RTSP muxer: rtsp.c, rtspcommon.c, rtspenc.c
> RTSP demuxer: rtsp.c, rtspcommon.c, rtprecv.c, rtspdec.c
> SDP demuxer: rtspcommon.c, rtprecv.c, sdpdec.o
[..]
> So, what do you think? Is splitting it this way worthwhile, or does it
> just separate the code too much, making it harder to follow when the
> control flow jumps around between all of the files?

How much space is saved by this?

Ronald



More information about the ffmpeg-devel mailing list