Commit Graph

157 Commits

Author SHA1 Message Date
Anton Khirnov c3bec4cd13 avio: don't replicate avio_alloc_context functionality. 2011-07-15 20:04:46 +02:00
Can Wu 9e2dabed4a avio: check AVIOContext malloc failure
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-21 13:42:50 +02: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 468644f6c1 lavf: remove FF_API_URL_RESETBUF cruft 2011-04-19 18:28:38 +02:00
Anton Khirnov ff1ec0c3f8 avio: undeprecate av_url_read_fseek/fpause under nicer names
It seems their replacements won't be ready anytime soon.
2011-04-12 19:17:05 +02:00
Anton Khirnov f87b1b373a avio: AVIO_ prefixes for URL_ open flags. 2011-04-07 18:07:16 +02:00
Anton Khirnov 668438a31e avio: always compile dyn_buf functions
Fixes build with --disable-muxers --disable-network.

Thanks to Hendrik Leppkes for noticing.
2011-04-05 19:32:14 +02:00
Anton Khirnov 5958df341d avio: deprecate url_max_packet_size().
URLContext.max_packet_size should be used directly.
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 58a48c6511 avio: make url_seek() 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
Anton Khirnov 8bea72f7eb avio: simplify url_open_dyn_buf_internal by using avio_alloc_context() 2011-04-03 23:33:51 +02:00
Anton Khirnov 724f6a0fa4 avio: make url_fdopen internal.
The unbuffered URLContext API will be made private, so there's no point
in this function being public.
2011-04-03 22:47:39 +02:00
Anton Khirnov 403ee835e7 avio: make url_open_dyn_packet_buf internal.
It doesn't look fit to be a part of the public API.

Adding a temporary hack to ffserver to be able to use it, should be
cleaned up when somebody is up for it.
2011-04-03 22:47:32 +02:00
Anton Khirnov 6dc7d80de7 avio: avio_ prefix for url_close_dyn_buf 2011-04-03 22:47:05 +02:00
Anton Khirnov b92c545282 avio: avio_ prefix for url_open_dyn_buf 2011-04-03 22:46:56 +02:00
Anton Khirnov 8978fedaee avio: introduce an AVIOContext.seekable field
Use it instead of url_is_streamed and AVIOContext.is_streamed.
2011-04-03 22:46:40 +02:00
Anton Khirnov b64030f26d avio: make get_checksum() internal. 2011-03-30 07:48:55 +02:00
Anton Khirnov 4c4427a75d avio: make init_checksum() internal. 2011-03-30 07:47:08 +02:00
Anton Khirnov 933e90a69a avio: make av_url_read_fseek/fpause internal.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-21 14:54:52 -04:00
Anton Khirnov 8d9769a77b avio: deprecate url_fileno
It's an evil hack that assumes an AVIOContext is always based on top of
an URLContext.
It's also not used anywhere.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-20 20:33:05 -04: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
Anton Khirnov b7f2fdde74 avio: rename put_flush_packet -> avio_flush
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:59:39 -04:00
Anton Khirnov 35f1023592 avio: deprecate url_close_buf
It's not used anywhere and its return value looks broken.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:59:39 -04:00
Anton Khirnov 83fddaeb81 avio: deprecate url_open_buf
It's only used in one place and does the same thing as
avio_alloc_context.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:59:39 -04:00
Anton Khirnov eda4cf92d7 avio: always compile avio_printf, rather than on CONFIG_MUXERS
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:59:39 -04:00
Anton Khirnov d9d86e00b2 avio: avio_ prefix for url_fprintf
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:59:39 -04:00
Anton Khirnov 59f65d9579 avio: make url_setbufsize internal.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:59:38 -04:00
Anton Khirnov 4839c192de lavf: move ff_get_v from avio.h to avio_internal.h
And rename it to ffio_read_varlen.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:59:38 -04:00
Anton Khirnov 3e68b3ba7b avio: deprecate url_ferror
AVIOContext.error should be used directly instead.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-15 08:04:28 -04:00
Anton Khirnov 66e5b1df36 avio: deprecate url_feof
AVIOContext.eof_reached should be used directly instead.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 17:20:31 -05:00
Anton Khirnov f1ef2cd9ed avio: move ff_rewind_with_probe_data from avio.h to avio_internal.h
also change its prefix to ffio

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 12:25:36 -05:00
Anton Khirnov e8bb2e2439 avio: deprecate url_fget_max_packet_size
AVIOContext.max_packet_size should be used directly instead.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 12:25:36 -05:00
Anton Khirnov 76aa876e69 avio: avio_ prefix for url_fsize
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 11:03:39 -05:00
Anton Khirnov e51975392d avio: deprecate url_fgetc and remove all it uses
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 10:51:21 -05:00
Anton Khirnov 655e45e7df avio: deprecate url_fgets
It's not used anywhere and doesn't look ver useful to be public.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 10:19:46 -05:00
Anton Khirnov a2704c9712 avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-04 11:26:57 -05:00
Anton Khirnov e16ead0716 lavf: deprecate get_strz() in favor of avio_get_str
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-04 11:26:02 -05:00
Reimar Döffinger 41d8555f72 avio: add avio_get_str()
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-04 11:24:58 -05:00
Martin Storsjö e360ada2d1 aviobuf: Write new data at s->buf_end in fill_buffer
In most cases, s->buf_ptr will be equal to s->buf_end when
fill_buffer is called, but this may not always be the case, if
we're seeking forward by reading (permitted by the short seek
threshold).

If fill_buffer is writing to s->buf_ptr instead of s->buf_end (when
they aren't equal and s->buf_ptr is ahead of s->buffer), the data
between s->buf_ptr and s->buf_end is overwritten, leading to
inconsistent buffer content. This could return incorrect data if
later seeking back into the area before the current s->buf_ptr.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-02 11:16:17 +01:00
Anton Khirnov 0300db8ad7 avio: deprecate url_fskip
avio_seek should be used instead

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-01 12:27:08 -05:00
Anton Khirnov 6b4aa5dac8 avio: avio_ prefix for url_fseek
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-01 12:12:33 -05:00
Anton Khirnov 61840b4360 avio: deprecate put_tag
it's not used internally anymore and shouldn't be public.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 14:38:57 -05:00
Anton Khirnov 22a3212e32 avio: rename url_fopen/fclose -> avio_open/close.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 10:18:55 -05:00
Anton Khirnov 0ac8e2bf2b avio: make put_nbyte internal.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-21 14:25:17 -05:00
Anton Khirnov 77eb5504d3 avio: avio: avio_ prefixes for put_* functions
In the name of consistency:
put_byte           -> avio_w8
put_<type>         -> avio_w<type>
put_buffer         -> avio_write

put_nbyte will be made private
put_tag will be merged with avio_put_str

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-21 14:25:15 -05:00
Anton Khirnov b3db9ceef1 avio: make get_partial_buffer internal.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-21 13:40:28 -05:00
Anton Khirnov b7effd4e83 avio: avio_ prefixes for get_* functions
In the name of consistency:
get_byte           -> avio_r8
get_<type>         -> avio_r<type>
get_buffer         -> avio_read

get_partial_buffer will be made private later

get_strz is left out becase I want to change it later to return
something useful.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-21 11:23:22 -05:00