[Ffmpeg-devel] Re: [PATCH] file length handling
Ronald S. Bultje
rbultje
Tue Dec 26 18:43:29 CET 2006
Hi,
On Tue, 2006-12-26, Michael Niedermayer wrote:
> On Tue, Dec 26, 2006 at 11:25:01AM -0500, Ronald S. Bultje wrote:
> > So what is the purpose of is_streamed? Some demuxers use it to see if we
>
> is_streamd == you cannot seek back unless its within the buffer
[..]
> no, a URLProtocol cannot claim it can seek (is_streamed=0 after open) and
> then when a demuxer tries to seek it fails and is_streamed is changed to 1
> if you want to do this you would have to look at all demuxers and
> 1. figure out if they can fail fataly if is_streamed is wrongly set (true for
> avi at least but likey many more demuxers are affected)
> 2. ensure with a dummy seek that is_streamed is set correctly for the
> demuxers which depend on it
Ah, I now see where you're going, you basically do want is_streamed to
indicate whether seeking is possible *before* we attempt the first seek
from the demuxer. I think a good indication is whether the server gives
the Content-Range in the HTTP header reply. If it does, we can set
is_streamed to 0, else to 1. Would that meet your demands?
> > As for implementation, I sent the variable-in-AVFormatContext thingy
> > because it was easier (quicker) to implement. If you're worried about
> > this (b/c filesize can change), I wouldn't mind making them function
> > pointers in AVInputFormat, but then again, the patch would grow because
> > of this.
>
> s/AVInputFormat/ByteIOContext/ and yes i prefer a function pointer over a
> duplicated filesize variable with one practically inaccessable from
> URL*
So just so I do it right the first time, would you like the filesize in
URL* and then the function pointer in ByteIOContext, or function pointer
in both?
Thanks,
Ronald
More information about the ffmpeg-devel
mailing list