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

Josh Allmann joshua.allmann
Fri Oct 8 11:35:30 CEST 2010

On 8 October 2010 02:03, Martin Storsj? <martin at martin.st> wrote:
> On Fri, 8 Oct 2010, Josh Allmann wrote:
>> rtsp_fetch_packet is the only code shared between SDP and RTSP. Even
>> then, it has more to do with RTP packet fetching than anything
>> intrinsically in RTSP (or SDP for that matter). Extricating
>> rtsp_fetch_packet from both would make splitting the SDP stuff into
>> its own file much more straightforward.
> I think our disagreement stems from this misunderstanding.
> rtsp_fetch_packet isn't the only code shared between the two. The RTSP
> demuxer also uses the SDP parsing - you get the SDP description of the
> stream with the DESCRIBE RTSP method, and then parse it and set up the
> streams according to that.

Yeah, we will have to factor out sdp_parse to ff_sdp_parse either way.
As I said earlier though, I am not averse to just putting all the
shared SDP stuff in the SDP demuxer.

Also I noticed that sdp_read_header shares rtsp_open_transport_ctx.
That complicates things, I'll need to think about it :) And there's
also the UDP stuff. My bad.

> (Otherwise, I wouldn't have put the code in this file unless it actually
> was used by both, or if I made a mistake. ;P)
> Does this change your opinion on how it should be organized?

Yeah, this looks good insofar it preserves the current structure of
the code while separating dependencies. I may not like the SDP parsing
where it is, but I understand why it's there.


More information about the ffmpeg-devel mailing list