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

Luca Abeni lucabe72
Wed Jan 13 14:29:59 CET 2010

Hi all,

Martin Storsj? wrote:
>> I really wanted chained (de) muxers to become th basis of several things
>> what you describe does not sound like its useable for any of that
>> example, one wants to mux dv video & audio in dv and that in avi or
>> mpeg ps in mov. (these silly formats exist sadly ...)
>> or even mux rtsp in mov ;) (this one hopefully doesnt exist ...)
>> your 2 functions just dont do that, the surrounding code is missing
>> also lav* private API has ff_ prefixes not av_
> Hmm, then I think what we're doing here differs a bit from what you're 
> aiming at with chained muxers.

Well, I believe both these things (the RTSP muxer and what Michael
describes) can be part of a "chained muxers" framework. But this
framework is not in place yet, so the RTSP muxer is currently using
some "special case" solution.
In my opinion, this can be ok, and we can migrate the RTSP muxer to
the chained muxer API as soon as it is ready.

>> and if you choose to keep this stuff in rtsp i dont mind but i think
>> it is a huge mess. And this might be less than fun to maintain because
>> the AVStream API can change and this can easily break the copy hacks
>> in rtsp without anyone noticing
> Yes, it may easily break - I personally think that my first approach with 
> using the RTP muxer internally wouldn't have had that problem

I am not sure if this solution can break too easily, but I might be
missing something as usual :)
Anyway, to me this looks more cleaner than the original patch (which
exported some internals of the RTP muxer).

> But without a better suggestion on how to abstract this cleanly (Luca A/B, 
> Ronald?) I think it's better to leave it like this for now. When there are 
> more examples of chained muxers, it's much easier to abstract out the 
> common parts that should be shared.

I agree with this, and I hope this solution is acceptable.

>> and at the least, i guess AVMetadata AVChapters AVProgram copying is
>> missing but probably alot more
> None of them really are relevant to RTSP/RTP, I think.

If we want some helpers in libavformat/utils.c (as in the last patch),
then AVMetadata AVChapters AVProgram (and many other things) have to
be considered (and, freeing the AVCodecContext to copy the pointer from
the "master" muxer is not an option).
But if the code is left in rtsp.c (maybe with a comment saying that it
should be moved to the chained muxer API when it's ready), then your
current code looks ok to me. I hope this second possibility is acceptable.


More information about the ffmpeg-devel mailing list