[Ffmpeg-devel] Re: [PATCH] file length handling

Michael Niedermayer michaelni
Wed Dec 27 22:15:19 CET 2006


Hi

On Tue, Dec 26, 2006 at 12:43:29PM -0500, Ronald S. Bultje wrote:
> 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?

yes, if that works in practice


> 
> > > 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?

in principle whichever needs less changes, but theres yet another problem,
the AVFrac removial patch has been found to not work by baptiste -> no 
guranteed big compatibility break anytime soon -> the addition of filesize
or a pointer would be delayed by an unpredictable amount of time

maybe simply adding slow http support into svn and then thinking about
improving its speed by avoiding the filesize finding seeks after that
would be better?

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

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20061227/bf964d11/attachment.pgp>



More information about the ffmpeg-devel mailing list