[FFmpeg-devel] [PATCH v2] Option to prevent probing for HTTP seekability
michaelni at gmx.at
Fri Sep 28 13:51:29 CEST 2012
On Wed, Sep 26, 2012 at 10:48:41PM +0100, Duncan Salerno wrote:
> On Wed, Sep 26, 2012 at 9:18 PM, Reimar Döffinger
> <Reimar.Doeffinger at gmx.de> wrote:
> > On Wed, Sep 26, 2012 at 09:09:34PM +0100, Duncan Salerno wrote:
> >> On Wed, Sep 26, 2012 at 8:25 PM, Reimar Döffinger
> >> <Reimar.Doeffinger at gmx.de> wrote:
> >> > On Wed, Sep 26, 2012 at 07:56:19PM +0100, Duncan Salerno wrote:
> >> >> Some HLS servers return 403 when the Range header is present. Add an option to HTTP to control sending the range header (default on). HLS sets this option to disabled.
> >> >>
> >> >> Updated with feedback from Clément Bœsch. I'd prefer not to overload the meaning of is_streamed as I think its less clear whats going on.
> >> >
> >> > IMHO your approach has two disadvantages
> >> > 1) It only works with HTTP
> >> > 2) It doesn't work to do the opposite thing (forcing seeking enabled
> >> > without probing).
> >> >
> >> > If API is/was not an issue, my suggestion would be to make
> >> > the default of AVIOContext.seekablea new AVIO_SEEKABLE_PROBE by not
> >> > setting probe you could force it to a specific value.
> >> > I suspect this would be possible with keeping API compatibility by
> >> > setting it like that in the avio_alloc_context function.
> >> > I guess there's still going to be a few more open questions like how
> >> > to get it on into the URLContext after that though.
> >> What other protocols does this problem apply to? Should the code be
> >> adapted if/when it turns out to be a problem for others too? IHMO this
> >> is just a caller working round some quirks in HTTP.
> > Well, the problem definitely exists the other way (us not detection
> > that some HTTP in fact does support seeking).
> > I suspect that several other protocols where seeking is optional like
> > FTP or MMS could make use of it, too.
> If you can let me know what I need to do with this patch that would be
> great (Is API an issue, how to get it into the URLContext etc).
I think changing it to tri-state (seek, non seek, automatic detection)
for http and maybe trying to reduce changes in hls. It seems the patch
is a bit bigger than needed, should be ok (for me, dunno about reimar)
about moving this to generic code, i dont think its a good idea.
its work but i dont think it makes the code better, just different
If the field is added to protocols that support the setting then its
possible to list this information (that is for which protocols does
autodetection exist, where can it be forced) while otherwise one could
force it for any but it would not work for most cases.
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel