Anton Khirnov
b66752790a
AVOptions: make default_val a union, as proposed in AVOption2.
...
This breaks API and ABI.
2011-05-10 20:22:06 +02:00
Martin Storsjö
c60112f268
libavformat: Make protocols pass URLContext as log context where available
...
Since the libavformat major bump, URLContext contains an AVClass,
making it a usable log context.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-20 14:59:45 +03:00
Stefano Sabatini
59d96941f0
avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
...
Make AVIO_FLAG_ access constants work as flags, and in particular fix
the behavior of functions (such as avio_check()) which expect them to
be flags rather than modes.
This breaks API.
2011-04-19 19:47:58 +02:00
Anton Khirnov
f35ff97f2e
lavf: use designated initializers for all protocols
...
This is more readable and makes it easier to reorder URLProtocol
members.
2011-04-08 11:08:26 +02:00
Anton Khirnov
f87b1b373a
avio: AVIO_ prefixes for URL_ open flags.
2011-04-07 18:07:16 +02:00
Anton Khirnov
1869ea03b7
avio: make url_get_file_handle() internal.
2011-04-04 17:45:20 +02:00
Anton Khirnov
e52a9145c8
avio: make url_close() internal.
2011-04-04 17:45:20 +02:00
Anton Khirnov
925e908bc7
avio: make url_write() internal.
2011-04-04 17:45:20 +02:00
Anton Khirnov
bc371aca46
avio: make url_read() internal.
2011-04-04 17:45:20 +02:00
Anton Khirnov
0589da0aa5
avio: make url_open() internal.
2011-04-04 17:45:20 +02:00
Tyler
bc61920d89
http: header field names are case insensitive
...
Amazon S3 sends header field names all lowercase.
This is actually acceptable according to the HTTP standard.
http://tools.ietf.org/html/rfc2616#section-4.2
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-28 04:16:12 +02:00
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Luca Barbato
dfd2a005eb
Replace dprintf with av_dlog
...
dprintf clashes with POSIX.1-2008
2011-01-29 23:55:37 +01:00
Diego Elio Pettenò
c6610a216e
Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.
...
This also lists the objects from those two libraries as internal (by adding
the ff_ prefix) so that they can then be hidden via linker scripts.
2011-01-26 22:10:09 +00:00
Mike Edenfield
7e35d8596b
http: Handle 301/307 redirect requests, too
...
Patch by Mike Edenfield, kutulu at kutulu dot org
Originally committed as revision 25651 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 20:37:01 +00:00
Michael Niedermayer
6ed040408b
Move AVOptions from libavcodec to libavutil
...
Originally committed as revision 25210 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-26 14:25:22 +00:00
Martin Storsjö
e55ebcc3f6
Move the definition of the maximum url size for static buffers to internal.h
...
Originally committed as revision 24833 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-19 14:50:40 +00:00
Martin Storsjö
f240ed18ef
http: Return EOF at the end of the content even if the connection isn't closed
...
We do request Connection: close, but some servers ignore it.
Originally committed as revision 24746 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-09 08:14:48 +00:00
Martin Storsjö
db979afed2
http: Log a warning when receiving an error code
...
Originally committed as revision 24266 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-16 14:15:37 +00:00
Måns Rullgård
f3bfe388b5
Make ff_url_split() public
...
ff_url_split() is retained as an alias, as it was used by ffserver,
to avoid breaking ABI compatibility with it.
Originally committed as revision 23822 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-27 14:16:46 +00:00
Martin Storsjö
9290f15d00
Make the http protocol open the connection immediately in http_open again
...
Also make the RTSP protocol use url_alloc and url_connect instead of relying
on the delay open behaviour.
Originally committed as revision 23710 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-22 14:15:00 +00:00
Martin Storsjö
4167ba0bc8
Add an AVClass to the HTTPContext
...
Originally committed as revision 23709 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-22 14:13:55 +00:00
Martin Storsjö
a9a3364c31
Allocate the HTTPContext through URLProtocol.priv_data_size
...
Originally committed as revision 23708 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-22 14:12:34 +00:00
Martin Storsjö
db30234794
HTTP: Add a method for initializing the authentication state from another connection
...
Originally committed as revision 23685 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-21 19:40:30 +00:00
Martin Storsjö
17b1493f74
Reindent
...
Originally committed as revision 23684 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-21 19:02:35 +00:00
Martin Storsjö
ea02b593a1
HTTP: Compact the code for writing chunked post data
...
Originally committed as revision 23683 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-21 19:02:05 +00:00
Martin Storsjö
077026ccf3
HTTP: Get rid of the is_chunked variable, use the chunksize variable instead
...
Originally committed as revision 23682 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-21 19:01:32 +00:00
Martin Storsjö
a6a9158973
HTTP: Clarify a comment
...
Originally committed as revision 23681 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-21 18:40:53 +00:00
Ronald S. Bultje
45c611a95b
Reset chunksize back to zero (= no chunked encoding) after each new open
...
connection (e.g. a seek). This fixes the theoretical case where a server
sends a file first using chunked encoding, and then using non-chunked
encoding.
Originally committed as revision 23665 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-20 21:41:02 +00:00
Ronald S. Bultje
f37246952a
Use url_write(), not http_write(), for sending the HTTP headers. This prevents
...
them from being sent using chunked encoding (I don't think this ever happened,
but either way it would be wrong).
Originally committed as revision 23664 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-20 21:38:16 +00:00
Martin Storsjö
130b096aea
Make sure the http protocol handler returns errors if a delayed open had failed
...
Originally committed as revision 23548 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-09 09:19:36 +00:00
Martin Storsjö
bdb57a9198
Initialize the http connection in http_seek, too
...
This makes url_fsize return correct values for delay opened connections
that have not yet been initialized.
This fixes using the image2 demuxer with http sources.
Originally committed as revision 23546 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-09 08:29:51 +00:00
Martin Storsjö
e4f28e0890
Reindent
...
Originally committed as revision 23534 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-08 11:58:22 +00:00
Josh Allmann
f2b9b19fad
Add support for disabling chunked transfer encoding for the http protocol
...
Patch by Josh Allmann, josh dot allmann at gmail
Originally committed as revision 23531 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-08 11:48:03 +00:00
Martin Storsjö
701ea516ee
Fix handling of errors in the http protocol
...
If http_connect fails, we've already stored the new connection handle in s->hd,
so clear it so http_close won't double-free it.
10l to me for not spotting it during review
Originally committed as revision 23529 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-08 11:18:22 +00:00
Martin Storsjö
4ceb8b3460
Fix bugs in the http custom header handling
...
Initialize the buffer av_strlcatf writes into.
Add the dash at the end of the Range header.
10l to me for not spotting it earlier
Originally committed as revision 23528 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-08 11:06:36 +00:00
Josh Allmann
6964d510e8
Add the capability to write custom HTTP headers
...
Patch by Josh Allmann, joshua dot allmann at gmail
Originally committed as revision 23526 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-08 10:26:16 +00:00
Josh Allmann
0f3254b83d
Modify the behaviour of http_open to implicitly delay connection establishment
...
The connection is made on the first http_read, http_write or http_seek.
Patch by Josh Allmann, joshua dot allmann at gmail
Originally committed as revision 23525 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-08 10:04:39 +00:00
Martin Storsjö
dd798dcd11
http: Set http_code to 200 when doing a POST
...
This avoids reading and comparing uninitialized memory.
Originally committed as revision 23464 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-04 06:35:12 +00:00
Martin Storsjö
27241cbffe
Declare the url_write buffer parameter as const
...
Originally committed as revision 23401 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-01 07:46:23 +00:00
Martin Storsjö
9405f733d9
Split out http authentication handling into a separate file
...
This prepares for adding support for more authentication methods
Originally committed as revision 22660 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-24 22:32:05 +00:00
Aurelien Jacobs
e4a9e3cc7c
move ff_url_split() and ff_url_join() declarations to internal.h
...
those functions are not part of the public API
Originally committed as revision 22534 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-14 23:59:48 +00:00
Martin Storsjö
f984dcf6dd
Reindent
...
Originally committed as revision 22322 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 09:05:03 +00:00
Martin Storsjö
c5c6e67c28
Rename url_split to ff_url_split
...
Since this function isn't in the public API, it should have an ff_ prefix.
Originally committed as revision 22321 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 09:03:25 +00:00
Martin Storsjö
57b5555c91
Use ff_url_join for assembling URLs, instead of snprintf
...
This ensures proper escaping of numerical IPv6 addresses.
The RTSP (de)muxer needs its own network initialization, since it isn't
a protocol and url_open hasn't been called yet.
Originally committed as revision 22226 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-05 22:35:21 +00:00
Baptiste Coudurier
08c8e66a99
restore old buffer content when seek failed in http protocol, fix issue #1631
...
Originally committed as revision 21208 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 23:27:52 +00:00
Ronald S. Bultje
2edabfdfdb
Reindent after r21166.
...
Originally committed as revision 21167 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 16:36:23 +00:00
Tomas Härdin
08f7a8ac32
Use chunked encoding for HTTP uploads. Patch by Tomas Härdin
...
<$firstname.$lastname()codemill,se>.
Originally committed as revision 21166 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 16:36:00 +00:00
Peter Holik
7995ed8e69
Add support for "chunked" data blocks. Patch by Peter Holik (peter holik at).
...
Originally committed as revision 19256 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-23 15:38:53 +00:00
Peter Holik
a52dc730cf
Cosmetics : Use dprintf instead of printf.
...
Patch by Peter Holik < $firstname @ $lastname . at >
Originally committed as revision 19126 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-06 17:32:59 +00:00