[FFmpeg-devel] [PATCH] support for ordered chapters/segment linking in Matroska

Anton Khirnov wyskas
Tue Aug 26 09:23:07 CEST 2008


On Sun, Aug 24, 2008 at 5:36 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>
> matroska_* should be in matroska*.c :)
>
> a
> AVFMT_FLAG_IGN_EXTERNS
> similar to
> AVFMT_FLAG_IGNIDX
> would probably be ok if that makes sense, als it could be used for mov.
>

well these flags can't be set until after av_open_input_stream, can they.

On Sun, Aug 24, 2008 at 6:15 PM, Aurelien Jacobs <aurel at gnuage.org> wrote:
>
> No I don't. The matroska demuxer already has it's own private chapter struct
> and chapter list. Any chapter related private data can be stored here.
>
you're right, now that i look at it, it's just a relic from ancient
times before you rewrote matroska demuxer :)
i'll remove it.

On Sun, Aug 24, 2008 at 6:15 PM, Aurelien Jacobs <aurel at gnuage.org> wrote:
>
> There are many more things I don't like in this patch. One of them being that
> the demuxer try to parse a directory and open files itself. I think the
> demuxer should only deal with ByteIOContext that the generic framework (utils.c)
> passes to it. That's up to the generic framework to find and open files
> (or network streams of whatever...). That could also be useful for other
> demuxer.
>
> I will try to have a deeper look at it in the next few days, but a potential
> idea would be:
>
> 1) the demuxer set AVFormatContext.flags |= AVFMT_FLAG_LINKED
> 2) utils.c check this flag and search for potential linked files,
>   open them with av_open_input_file() and then pass the resulting
>   context to the demuxer of step 1, by the mean of a new
>   AVInputFormat.check_linked() function.
> 3) the check_linked() function of the demuxer verify if this new
>  context is the linked one we are searching for, and return the
>  result of this check
> 4) utils.c can then build a composite AVFormatContext containing
>   all the context linked to the original file
> 5) utils.c can abstract this composite context as if it was a real
>   context, reading or seeking in the appropriate segment
>
i don't think just a flag will be enough, demuxer should give some
more hints about where to search for linked streams and what kinds of
formats/extensions it wants etc.

how do you like the attached version?

Anton
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01_lavf_external_streams.diff
Type: text/x-patch
Size: 7034 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080826/6b71683e/attachment.bin>



More information about the ffmpeg-devel mailing list