Anton Khirnov
a2704c9712
avio: add avio_tell macro as a replacement for url_ftell
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
e16ead0716
lavf: deprecate get_strz() in favor of avio_get_str
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Reimar Döffinger
41d8555f72
avio: add avio_get_str()
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
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>
14 years ago
Anton Khirnov
0300db8ad7
avio: deprecate url_fskip
...
avio_seek should be used instead
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
6b4aa5dac8
avio: avio_ prefix for url_fseek
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
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>
14 years ago
Anton Khirnov
22a3212e32
avio: rename url_fopen/fclose -> avio_open/close.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
0ac8e2bf2b
avio: make put_nbyte internal.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
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>
14 years ago
Anton Khirnov
b3db9ceef1
avio: make get_partial_buffer internal.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
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>
14 years ago
Anton Khirnov
8d9ac969cb
avio: rename av_alloc_put_byte -> avio_alloc_context for consistency
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
e731b8d872
avio: move init_put_byte() to a new private header and rename it
...
init_put_byte should never be used outside of lavf, since
sizeof(AVIOContext) isn't part of public ABI.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
ae628ec1fd
avio: rename ByteIOContext to AVIOContext.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
93b78d1210
lavf: make a variant of ff_get_str16_nolen public
...
It will be useful in mp3 demuxer and hopeful some other places.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
14 years ago
Anton Khirnov
dccbd97d72
lavf: move ff_put_str16_nolen from asf to avio and rename it
...
It will be useful in the mp3 muxer.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Anton Khirnov
4efd5cf34b
avio: add av_put_str and deprecate put_strz in favor of it
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Martin Storsjö
c66f53cf8b
Revert aviobuf: Retry if the read/write function returns AVERROR(EAGAIN)
...
This reverts SVN commit 26318, which broke MS-RTSP playback.
Originally committed as revision 26326 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Martin Storsjö
a6963f8304
aviobuf: Retry if the read/write function returns AVERROR(EAGAIN)
...
Originally committed as revision 26318 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Anssi Hannula
17ee8f669f
Add function put_nbyte() to speed up padding in SPDIF muxer.
...
Patch by Anssi Hannula, anssi d hannula a iki d fi
Originally committed as revision 26193 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Aurelien Jacobs
364cacc7c7
add FF_API_URL_RESETBUF define to disable the deprecated url_resetbuf()
...
public function
Originally committed as revision 24841 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Reimar Döffinger
853a0fccce
Cosmetics: fix indentation and remove a useless else.
...
Originally committed as revision 24495 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Reimar Döffinger
3aa13da970
Simplify get_byte and url_fgetc.
...
Originally committed as revision 24494 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Martin Storsjö
496c645d3b
Never shrink the ByteIOContext buffer in ff_rewind_with_probe_data
...
If there is little unread data in the ByteIOContext buffer, this may lead
to reducing the size of the ByteIOContext buffer to little more the probe
data size. This can lead to suboptimal aviobuf behaviour, e.g. making some
demuxers fail to do short seeks backwards (if the input isn't seekable).
Originally committed as revision 24478 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Aurelien Jacobs
a43416a540
improve ff_get_line to return line length
...
Originally committed as revision 24400 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Aurelien Jacobs
7c89295145
move ff_get_line to aviobuf.c
...
Originally committed as revision 24399 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Martin Storsjö
aff4137d5f
Remove an assert that was no longer correct nor relevant
...
Originally committed as revision 24344 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Martin Storsjö
7939d0edce
aviobuf: Do short seeks forward by reading and skipping data instead of a proper seek
...
This improves performance on e.g. seekable http.
Originally committed as revision 24280 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Martin Storsjö
d5e9ddeb73
url_fskip: Return an error code if the url_fseek failed
...
Originally committed as revision 24277 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Michael Chinen
603e5c0b71
move ff_get_v_length and ff_put_v from nutenc.c to internal.h/aviobuf.c
...
patch by Micheal Chinen < mchinen gmail >
Originally committed as revision 24140 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Eli Friedman
6fa197e277
Silence a warning when compiling aviobuf.c
...
Patch by Eli Friedman, eli d friedman a gmail
Originally committed as revision 24055 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Josh Allmann
de1807bbc4
Pad the buffer in url_close_dyn_buf, for buffers opened with url_open_dyn_buf
...
Patch by Josh Allmann, joshua dot allmann at gmail
Originally committed as revision 23942 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Stefano Sabatini
9d30e0682a
Do not initialize res in url_fseek(), in the case !s->seek directly
...
return AVERROR(EPIPE) rather than the pre-defined value of res.
Slightly improve readability.
Originally committed as revision 22939 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Stefano Sabatini
4c4ef3db4b
Make url_fsize() return AVERROR(ENOSYS) rather than AVERROR(EPIPE) if
...
the seek operation is not defined in the ByteIOContext.
Originally committed as revision 22902 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Howard Chu
c007c687c9
Do not set pos to an error value.
...
Patch by Howard Chu, hyc highlandsun com
Originally committed as revision 22853 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Tomas Härdin
7a6fe01f99
Seeking forward in non-seekable media by discarding data, regardless of how far to seek. Won't SEEK_END unless forced though.
...
Originally committed as revision 22822 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Tomas Härdin
01d91b9be9
Reusing the probe buffer to rewind the ByteIOContext in ff_probe_input_buffer() instead of seeking back to the start of the file. Once exhausted, the size of the buffer is reduced.
...
Originally committed as revision 22821 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Tomas Härdin
c6a5e087cf
Mask away AVSEEK_FORCE properly in some checks in url_fseek()
...
Patch by Tomas Härdin $(name).$(s/ä/a/ $(surname)) AT codemill DOT se
Originally committed as revision 22653 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Stefano Sabatini
8d5e638f04
Make url_fseek() return AVERROR_EOF rather than AVERROR(EPIPE) if end
...
of file is reached.
Originally committed as revision 22590 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Michael Niedermayer
493f54ada0
Add AVSEEK_FORCE flag to indicate that the code should attempt to seek
...
by any means.
Originally committed as revision 22557 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Stefano Sabatini
8757dc5e40
Remove duplicated empty line.
...
Originally committed as revision 21553 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Benoit Fouet
08580cb05a
Make url_resetbuf() assert on wrong flags passed and make it static on next
...
version bump.
See thread: [FFmpeg-devel] & vs. &&
Date: Mon, 12 Oct 2009 14:21:06 +0200
Originally committed as revision 20330 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Reimar Döffinger
90aa6ace63
Merge declaration and initialization
...
Originally committed as revision 20214 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Reimar Döffinger
098d8e0950
Simplify: use FFMIN
...
Originally committed as revision 20213 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Reimar Döffinger
7f7686dfb1
Make get_buffer and get_partial_buffer return url_ferror or AVERROR_EOF as
...
appropriate if it couldn't read any data at all.
This should make handling of EOF and error simpler or make it work right without
extra code in a few place (e.g. raw demuxer).
Originally committed as revision 20135 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Baptiste Coudurier
b3eab9fb64
seek inside buffer when offset is exactly at the end, fix seeking with memory ByteIOContext
...
Originally committed as revision 18487 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Reimar Döffinger
0c5a43d648
Merge declaration and initialization of io_buffer_size
...
Originally committed as revision 16639 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Reimar Döffinger
2bdaf78c52
Make io_buffer_size unsigned to avoid a warning about comparing
...
signed and unsigned values.
Originally committed as revision 16638 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Reimar Döffinger
0e7ceb2442
Return AVERROR(ENOMEM) instead of -1 when malloc fails in url_open_dyn_buf_internal
...
Originally committed as revision 16636 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago