Commit Graph

7 Commits

Author SHA1 Message Date
Martin Storsjö fab8156b2f avio: Copy URLContext generic options into child URLContexts
Since all URLContexts have the same AVOptions, such AVOptions
will be applied on the outermost context only and removed from the
dict, while they probably make sense on all contexts.

This makes sure that rw_timeout gets propagated to the innermost
URLContext (to make sure it gets passed to the tcp protocol, when
opening a http connection for instance).

Alternatively, such matching options would be kept in the dict
and only removed after the ffurl_connect call.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-24 10:34:19 +02:00
Anton Khirnov 8c0ceafb0f urlprotocol: receive a list of protocols from the caller
This way, the decisions about which protocols are available for use in
any given situations can be delegated to the caller.
2016-02-22 11:45:31 +01:00
Anton Khirnov 2758cdedfb lavf: reorganize URLProtocols
Instead of a linked list constructed at av_register_all(), store them
in a constant array of pointers.

Since no registration is necessary now, this removes some global state
from lavf. This will also allow the urlprotocol layer caller to limit
the available protocols in a simple and flexible way in the following
commits.
2016-02-22 11:30:58 +01:00
Marvin Scholz 8562c1483b Icecast: Send content-type in all cases
This is needed because Icecast since version 2.4.1 doesn't default
to audio/mpeg anymore. AVOption default not used here, since a later
check if -content_type is set is performed and would break.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-11-15 09:15:39 +01:00
Marvin Scholz 3a6bb97350 Icecast: Send 100-continue header if possible
This allows for proper error reporting. Only do
this for non-legacy requests as only Icecast >2.4.0
will reply with a proper status.
Libav seems to accept both, 100 and 200 status codes, but
let's stay close to spec.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-11-15 09:14:04 +01:00
Mark McGough 76c70e33d2 icecast: Do not use chunked post
Icecast uses HTTP 1.0 while Libav uses HTTP 1.1 and enables by
default chunked post.

Icecast actually forwards the HTTP chunk headers to the listener
as part of the media stream (without the chunk encoding HTTP headers)
causing the players to lose sync.

Disabling the option is enough to feed icecast properly.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-10-12 19:54:07 +02:00
Marvin Scholz eb9244f202 Add Icecast protocol
Icecast is basically a convenience wrapper around the HTTP protocol.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-08-04 12:56:42 +03:00