[FFmpeg-devel] FW: pts/dts generation and index for mpegts (vob)
Erik Van Grunderbeeck
erik
Wed Jun 17 04:28:46 CEST 2009
<cutting a bit, I'll come up with a proposal based in your input (and others
if they chime in)>
>Demuxer or protocol internal elements need to be closed in the demuxer
>or protocol.
>Humm freeing per stream index you mean ? Possible.
>I think for this return AVERROR_EOS (End Of Stream) might be nice.
>After this, user can free everything through an API in libavformat if
>needed.
Yes. Closing at handler level works fine.
Consider this however: DVD playback starts with the "Don't copy DVD". Then
automatically goes to "intro/preview" and finally "movie". You don't want to
close everything (all streams, context's, etc).
What I do now is send a "reset" event through what is now the
CODEC_TYPE_DATA stream. This closes audio/video/sub codecs and flushes
streams. Decoding continues, and then any new streams are added by muxer and
re-opened at app level.
But; the index file isn't closed, neither are some timestamps reset. Since
that's at file context level. You can't close the file context, and re-open
it, since that closes down the protocol handles (and also the vm and any
states it is in).
>>> Make it generic _enough_ for what's _needed_.
>> <grin> that's like saying: "pray to all gods, and hope you picked the
right
>> one when the curtain falls"
>Just hope your API will work with Blu-ray :)
I have faith ;)
Erik
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
More information about the ffmpeg-devel
mailing list