Commit Graph

98 Commits

Author SHA1 Message Date
Michael Niedermayer d4d09329ee Merge remote branch 'qatar/master'
* qatar/master:
  lavf: bump minor and add an APIChanges entry for avformat cleanup
  lavf: get rid of ffm-specific stuff in avformat.h
Not pulled:  avio: deprecate av_protocol_next().
  avio: add a function for iterating though protocol names.
  lavf: rename a parameter of av_sdp_create from buff->buf
  lavf: rename avf_sdp_create to av_sdp_create.
  lavf: make av_guess_image2_codec internal
  avio: make URLProtocol internal.
  avio: make URLContext internal.
  lavf: mark av_pkt_dump(_log) for remove on $next+1 bump.
  lavf: use designated initializers for all protocols
  applehttp: don't use deprecated url_ functions.
  avio: move two ff_udp_* functions from avio_internal to url.h
  asfdec: remove a forgotten declaration of nonexistent function
  avio: deprecate the typedef for URLInterruptCB

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-09 03:17:07 +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
Michael Niedermayer c88caa522c Merge remote branch 'qatar/master'
* qatar/master:
  proto: include os_support.h in network.h
  matroskaenc: don't write an empty Cues element.
  lavc: add a FF_API_REQUEST_CHANNELS deprecation macro
  avio: move extern url_interrupt_cb declaration from avio.h to url.h
  avio: make av_register_protocol2 internal.
  avio: avio_ prefix for url_set_interrupt_cb.
  avio: AVIO_ prefixes for URL_ open flags.
  proto: introduce listen option in tcp
  doc: clarify configure features
  proto: factor ff_network_wait_fd and use it on udp

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-08 02:50:13 +02:00
Anton Khirnov f87b1b373a avio: AVIO_ prefixes for URL_ open flags. 2011-04-07 18:07:16 +02:00
Michael Niedermayer 434f248723 Merge remote branch 'qatar/master'
* qatar/master: (22 commits)
  ac3enc: move extract_exponents inner loop to ac3dsp
  avio: deprecate url_get_filename().
  avio: deprecate url_max_packet_size().
  avio: make url_get_file_handle() internal.
  avio: make url_filesize() internal.
  avio: make url_close() internal.
  avio: make url_seek() internal.
  avio: cosmetics, move AVSEEK_SIZE/FORCE declarations together
  avio: make url_write() internal.
  avio: make url_read_complete() internal.
  avio: make url_read() internal.
  avio: make url_open() internal.
  avio: make url_connect internal.
  avio: make url_alloc internal.
  applehttp: Merge two for loops
  applehttp: Restructure the demuxer to use a custom AVIOContext
  applehttp: Move finished and target_duration to the variant struct
  aacenc: reduce the number of loop index variables
  avio: deprecate url_open_protocol
  avio: deprecate url_poll and URLPollEntry
  ...

Conflicts:
	libavformat/applehttp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-05 02:31:56 +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
Michael Niedermayer 59bf303d68 Merge remote-tracking branch 'newdev/master'
* newdev/master:
  ac3enc: avoid memcpy() of exponents and baps in EXP_REUSE case by using exponent reference blocks.
  Chronomaster DFA decoder
DUPLICATE:  framebuffer device demuxer
NOT MERGED: cosmetics: fix dashed line length after 070c5d0
  http: header field names are case insensitive

Conflicts:
	LICENSE
	README
	doc/indevs.texi
	libavdevice/fbdev.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-29 02:46:11 +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 9ef5a9deaf Replace dprintf with av_dlog
dprintf clashes with POSIX.1-2008
(cherry picked from commit dfd2a005eb)
2011-01-30 03:41:48 +01: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ò 66355be3c3 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.
(cherry picked from commit c6610a216e)
2011-01-28 03:15:34 +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