On Thu, Mar 26, 2015 at 11:15 PM, Luca Barbato <[email protected]> wrote: > On 26/03/15 18:03, Mathieu Malaterre wrote: >> Hi there, >> >> I am trying to add a new format to libav. Long story short this is a >> format which encapsulate another format (either MPEG-2 or MPEG-4). So >> technically it should be sufficient to skip to the proper offset and >> call the regular MOV demuxer. >> >> I could not figure out to handle format-of-format in libav. >> Technically I would like to do: >> >> >> static int dicom_read_header(AVFormatContext *s) >> { >> [...]compute offset to start of MPEG-4 file + seek to offset[...] >> return mov_read_header(s); >> } >> >> `mov_read_header` is not exported, so I cannot do that. How should I >> handle format-of-format in libav ? > > An option is to add the format specific init in mov.c and reuse the rest > and add another AVInputFormat struct, as we do for other dialects.
In this case, I'll end up duplicating some code in `mpegvideo.c` and `mov.c` then, right ? DICOM containers can have either an mpegvideo format with mpeg2video stream, or MPEG (mov) with h264 video stream. Thanks for clarification, -- Mathieu _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
