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

Michael Niedermayer michaelni
Wed Jan 13 05:17:39 CET 2010


On Tue, Jan 12, 2010 at 03:05:01PM +0200, Martin Storsj? wrote:
> On Mon, 11 Jan 2010, Michael Niedermayer wrote:
> 
> > > - Are there any other stream parameters that need to be copied to the
> > >   AVStream objects of the chained muxers, other than sample_aspect_ratio?
> > > - Which stream parameters need to be copied back to the original AVStream
> > >   from the opened chained AVStream? Currently time_base is copied.
> > 
> > whatever it is it belongs into a function in utils.c
> 
> Would a change like the attached one be ok? (The patch is against the 
> combined result of the patch series, but shows the new utility functions.)
> 
> For initializing the AVCodecContext, I'd say its best to leave it up to 
> each occasion of chained muxers - in this case simply referring to the 
> codec context of the master is the easiest, but in some other cases one 
> may want to copy most of it but change some fields. In that case, we'd 
> probably need some kind of avcodec_context_copy(), to copy/initialize the 
> fields correctly.

sounds like a scarily fragile mess
having a struct that sometimes is a copy that needs to be freed and sometimes
not
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_

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

and at the least, i guess AVMetadata AVChapters AVProgram copying is
missing but probably alot more

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100113/4861852c/attachment.pgp>



More information about the ffmpeg-devel mailing list