Commit Graph

406 Commits

Author SHA1 Message Date
Martin Storsjö
1dee0aca74 avio: add avio_open2, taking an interrupt callback and options
The interrupt callback has to be passed in during opening (setting it
after opening isn't enough), since a blocking open couldn't be
interrupted otherwise.

Options are passed down to procotols and also need to be available
during open() in most cases.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-13 13:17:04 +01:00
Anton Khirnov
ddffc2fdc3 avio: add support for passing options to protocols.
Not used anywhere yet, support for passing options from avio_open() will
follow.
2011-11-13 13:14:39 +01:00
Martin Storsjö
6f1b7b3944 avio: Add an AVIOInterruptCB parameter to ffurl_open/ffurl_alloc
Change all uses of these function to pass the relevant
callback on.
2011-11-13 13:12:17 +01:00
Michael Niedermayer
988f585fcb Merge remote-tracking branch 'qatar/master'
* qatar/master: (44 commits)
  replacement Indeo 3 decoder
  gsm demuxer: do not allocate packet twice.
  flvenc: use first packet delay as global delay.
  ac3enc: doxygen update.
  imc: return error codes instead of 0 for error conditions.
  imc: return meaningful error codes instead of -1
  imc: do not set channel layout for stereo
  imc: validate channel count
  imc: check for ff_fft_init() failure
  imc: check output buffer size before decoding
  imc: use DSPContext.bswap16_buf() to byte-swap packet data
  rtsp: add allowed_media_types option
  libgsm: add flush function to reset the decoder state when seeking
  libgsm: simplify decoding by using a loop
  gsm: log error message when packet is too small
  libgsmdec: do not needlessly set *data_size to 0
  gsmdec: do not needlessly set *data_size to 0
  gsmdec: add flush function to reset the decoder state when seeking
  libgsmdec: check output buffer size before decoding
  gsmdec: log error message when output buffer is too small.
  ...

Conflicts:
	Changelog
	ffplay.c
	libavcodec/indeo3.c
	libavcodec/mjpeg_parser.c
	libavcodec/vp3.c
	libavformat/cutils.c
	libavformat/id3v2.c
	libavutil/parseutils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-03 02:16:26 +01:00
Diego Biurrun
124e28847b Remove some stray unnecessary ffmpeg references. 2011-11-02 10:42:54 +01:00
Michael Niedermayer
fae714a9fb Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avconv: add presets
  rtsp: Expose the flag options via private AVOptions for sdp and rtp, too
  rtsp: Make the rtsp flags avoptions set via a define
  rtpenc: Set a default video codec
  avoptions: Fix av_opt_flag_is_set
  rtp: Fix ff_rtp_get_payload_type
  doc: Update the documentation on setting options for RTSP
  rtsp: Remove the separate filter_source variable
  rtsp: Accept options via private avoptions instead of URL options
  rtsp: Simplify AVOption definitions
  rtsp: Merge the AVOption lists
  lavfi: port libmpcodecs delogo filter
  lavfi: port boxblur filter from libmpcodecs
  lavfi: add negate filter
  lavfi: add LUT (LookUp Table) generic filters
  AVOptions: don't segfault on NULL parameter in av_set_options_string()
  avio: Check for invalid buffer length.
  mpegenc/mpegtsenc: add muxrate private options.
  lavf: deprecate AVFormatContext.file_size
  mov: add support for TV metadata atoms tves, tvsn and stik

Conflicts:
	Changelog
	doc/filters.texi
	doc/protocols.texi
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavfilter/avfilter.h
	libavfilter/formats.c
	libavfilter/internal.h
	libavfilter/vf_boxblur.c
	libavfilter/vf_delogo.c
	libavfilter/vf_lut.c
	libavformat/mpegtsenc.c
	libavformat/utils.c
	libavformat/version.h
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-18 01:54:40 +02:00
Alex Converse
ab2940691b avio: Check for invalid buffer length. 2011-10-16 23:56:21 -07:00
Nicolas George
247a1dc847 aviobuf: Replace av_realloc by av_realloc_f when relevant.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-28 18:13:52 +02:00
Michael Niedermayer
15285d8fc5 Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  arm: remove disabled function dct_unquantize_h263_inter_iwmmxt()
  Remove commented-out call to non-existing function print_pow1().
  Do not decode RV30 files if the extradata is too small
  flashsv: split flashsv_decode_block() off from flashsv_decode_frame().
  ppc: remove disabled code
  libspeexdec: Drop const qualifier to silence compiler warning.
  libopenjpeg: Drop const qualifier to silence compiler warning.
  alac: Remove unused dummy code.
  Remove unused structs and tables.
  vaapi: do not assert on value read from input bitstream
  flashsvenc: replace bitstream description by a link to the specification
  flashsvenc: drop unnecessary cast
  flashsvenc: improve some variable names and fix corresponding comments
  flashsvenc: merge two consecutive if-conditions
  flashsvenc: merge variable declarations and initializations
  flashsvenc: convert some debug av_log() to av_dlog()
  flashsvenc: whitespace cosmetics
  flashsvenc: drop some unnecessary parentheses
  flashsvenc: fix some comment typos
  aacps: skip some memcpy() if src and dst would be equal
  ...

Conflicts:
	libavcodec/vaapi_mpeg2.c
	libavformat/aviobuf.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-16 19:43:35 +02:00
Anton Khirnov
c3bec4cd13 avio: don't replicate avio_alloc_context functionality. 2011-07-15 20:04:46 +02:00
Michael Niedermayer
bf8bb94322 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ffmpeg: get rid of the -vglobal option.
  dct32: Add AVX implementation of 32-point DCT
  dct32: Change pass 6 permutation to allow for AVX implementation
  dct32: port SSE 32-point DCT to YASM
  multiple inclusion guard cleanup
  avio: document buffer must created with av_malloc() and friends
  avio: check AVIOContext malloc failure
  swscale: point out an alternative to sws_getContext
  svq3: Do initialization after parsing the extradata
  add changelog entries for 0.7_beta2
  mp3lame: add #include required for AV_RB32 macro.

Conflicts:
	Changelog
	libavcodec/svq3.c
	libavcodec/x86/dct32_sse.c
	libavfilter/vsrc_buffer.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-22 04:53:19 +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
Michael Niedermayer
a3ffe0eb76 Revert "Fix url_fopen() flag values."
No longer needed after martins change to the values.
Though this would have been nicer ABI wise but iam too lazy to maintain this difference

This reverts commit 183401b924.
2011-04-29 04:31:28 +02:00
Michael Niedermayer
183401b924 Fix url_fopen() flag values.
Reported by: Luca Abeni
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-28 13:20:03 +02:00
Michael Niedermayer
e3323a1cbd Fix some passing argument from incompatible pointer type warnings.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-24 17:46:50 +02:00
Michael Niedermayer
efb5fa79f5 Merge remote branch 'qatar/master'
* qatar/master: (37 commits)
  In avcodec_open(), set return code to an error value only when an error occurs instead of unconditionally at the start of the function.
  lavc: remove reference to opt.h from Makefile.
  prefer avio_check() over url_exist()
  avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
  lavu: remove misc disabled cruft
  lavu: remove FF_API_OLD_IMAGE_NAMES cruft
NOT PULLED  lavu: remove FF_API_OLD_EVAL_NAMES cruft
  lavc: remove misc disabled cruft.
  lavc: remove the FF_API_INOFFICIAL cruft.
  lavc: remove the FF_API_SET_STRING_OLD cruft.
  lavc: remove the FF_API_USE_LPC cruft.
  lavc: remove the FF_API_SUBTITLE_OLD cruft.
  lavc: remove the FF_API_VIDEO_OLD cruft.
  lavc: remove the FF_API_AUDIO_OLD cruft.
  lavc: remove the FF_API_OPT_SHOW cruft.
  lavc: remove the FF_API_MM_FLAGS cruft.
  lavf: remove misc disabled cruft.
  lavf: remove FF_API_INDEX_BUILT cruft
  lavf: remove FF_API_URL_CLASS cruft.
  lavf: remove FF_API_SYMVER cruft
  ...

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-20 04:48:23 +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
Michael Niedermayer
9891004ba9 Merge remote branch 'qatar/master'
* qatar/master:
Partially merged:flvdec: Allow parsing keyframes metadata without seeking in most cases
  Error out if vaapi is not found
  avio: undeprecate av_url_read_fseek/fpause under nicer names
  libvo-*: Don't use deprecated sample format names and enum names
DUPLICATE  flvdec: Fix support for flvtool2 "keyframes based" generated index
DUPLICATE  libavcodec: Use "const enum AVSampleFormat[]" in AVCodec initialization
  Fix the conversion of AV_SAMPLE_FMT_FLT and _DBL to AV_SAMPLE_FMT_S32.
  Convert some undefined 1<<31 shifts into 1U<<31.

Conflicts:
	configure
	libavcodec/libvo-aacenc.c
	libavcodec/libvo-amrwbenc.c
	libavformat/flvdec.c

Marged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-13 02:49:22 +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
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
11d78415ca Merge remote branch 'qatar/master'
* qatar/master:
  psymodel: extend API to include PE and bit allocation.
  avio: always compile dyn_buf functions
  Remove unnecessary parameter from ff_thread_init() and fix behavior
  Revert "aac_latm_dec: use aac context and aac m4ac"
  configure: tell user if libva is enabled like the rest of external libs.
  Add silence support for AV_SAMPLE_FMT_U8.
  avio: make URL_PROTOCOL_FLAG_NESTED_SCHEME internal
  avio: deprecate av_url_read_seek
  avio: deprecate av_url_read_pause
  ac3enc: NEON optimised extract_exponents

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-06 02:59:49 +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
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
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
Carl Eugen Hoyos
02fd687bbe Only make buffer smaller in fill_buffer() if read_packet() is set.
Fixes a possible invalid free().
2011-04-04 16:43:15 +02:00
Michael Niedermayer
2cae9809e2 Merge remote branch 'qatar/master'
* qatar/master:
  fate: fix partial run when no samples path is specified
  ARM: NEON fixed-point forward MDCT
  ARM: NEON fixed-point FFT
  lavf: bump minor version and add an APIChanges entry for avio changes
  avio: simplify url_open_dyn_buf_internal by using avio_alloc_context()
  avio: make url_fdopen internal.
  avio: make url_open_dyn_packet_buf internal.
  avio: avio_ prefix for url_close_dyn_buf
  avio: avio_ prefix for url_open_dyn_buf
  avio: introduce an AVIOContext.seekable field
  ac3enc: use generic fixed-point mdct
  lavfi: add fade filter
  Change yadif to not use out of picture lines.
  lavc: deprecate AVCodecContext.antialias_algo
  lavc: mark mb_qmin/mb_qmax for removal on next major bump.

Conflicts:
	doc/filters.texi
	libavcodec/ac3enc_fixed.h
	libavcodec/ac3enc_float.h
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavfilter/vf_fade.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-04 02:15:12 +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
Michael Niedermayer
1caa4123bd Merge remote-tracking branch 'newdev/master'
* newdev/master:
  rtsp: Use GET_PARAMETER for keep-alive for generic RTSP servers
  mlp_parse.c: set AVCodecContext channel_layout
  APIChanges: mark the place where 0.6 was branched.
  avio: make get_checksum() internal.
  avio: move ff_crc04C11DB7_update() from avio.h -> avio_internal.h
  avio: make init_checksum() internal.
NOT MERGED  Add MxPEG decoder
NOT MERGED  Add support for picture_ptr field in MJpegDecodeContext
NOT MERGED  Move MJPEG's input buffer preprocessing in separate public function
NOT MERGED  Support reference picture defined by bitmask in MJPEG's SOS decoder
  sndio bug fix

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-31 12:48:41 +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
Michael Niedermayer
4fa0e24736 Merge remote-tracking branch 'newdev/master'
* newdev/master: (33 commits)
  Fix an infinite loop when RoQ encoded generated a frame with a size greater than the maximum valid size.
  Add kbdwin.o to AC3 decoder
  Detect byte-swapped AC-3 and support decoding it directly.
  cosmetics: indentation
  Always copy input data for AC3 decoder.
  ac3enc: make sym_quant() branch-free
  cosmetics: indentation
  Add a CPU flag for the Atom processor.
  id3v2: skip broken tags with invalid size
  id3v2: don't explicitly skip padding
  Make sure kbhit() is in conio.h
  fate: update wmv8-drm reference
  vc1: make P-frame deblock filter bit-exact.
  configure: Add the -D parameter to the dlltool command
  amr: Set the AVFMT_GENERIC_INDEX flag
  amr: Set the pkt->pos field properly to the start of the packet
  amr: Set the codec->bit_rate field based on the last packet
  rtsp: Specify unicast for TCP interleaved streams, too
  Set the correct target for mingw64 dlltool
  applehttp: Change the variable for stream position in seconds into int64_t
  ...

Conflicts:
	ffmpeg.c
	ffplay.c
	libavcodec/ac3dec.c
	libavformat/avio.h
	libavformat/id3v2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-23 02:42:56 +01: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
Michael Niedermayer
0fecf2642b Merge remote-tracking branch 'newdev/master'
Conflicts:
	Changelog
	doc/APIchanges
	doc/optimization.txt
	libavformat/avio.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-17 17:22:52 +01: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
Michael Niedermayer
6947b0c42e Merge remote-tracking branch 'newdev/master'
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-15 16:48:42 +01: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
Michael Niedermayer
75a8e0f0ab Add avio_skip() 2011-03-11 12:25:44 +01:00
Michael Niedermayer
3bd624b4ee Fix url_feof() for file appendings.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-10 16:26:48 +01:00
Anton Khirnov
f8bc86d47e 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>
(cherry picked from commit f1ef2cd9ed)
2011-03-08 02:09:34 +01:00
Anton Khirnov
718975aa11 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>
(cherry picked from commit e8bb2e2439)
2011-03-08 02:09:33 +01:00
Anton Khirnov
db44ea960d avio: avio_ prefix for url_fsize
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 76aa876e69)
2011-03-08 02:09:21 +01:00
Anton Khirnov
1447dc59de avio: deprecate url_fgetc and remove all it uses
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit e51975392d)
2011-03-08 02:09:17 +01:00
Anton Khirnov
de3ef79250 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>
(cherry picked from commit 655e45e7df)
2011-03-08 02:09:16 +01: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
384c9c2fa7 avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit a2704c9712)
2011-03-05 02:29:31 +01:00
Anton Khirnov
773947ba76 lavf: deprecate get_strz() in favor of avio_get_str
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit e16ead0716)
2011-03-05 02:29:28 +01:00
Reimar Döffinger
3e1a8e1ec1 avio: add avio_get_str()
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 41d8555f72)
2011-03-05 02:29:28 +01: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ö
62d0a7453a 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>
(cherry picked from commit e360ada2d1)
2011-03-03 14:15:09 +01:00
Anton Khirnov
813cc7abaf avio: deprecate url_fskip
avio_seek should be used instead

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 0300db8ad7)
2011-03-03 14:15:09 +01:00
Anton Khirnov
f59d8ff8cd avio: avio_ prefix for url_fseek
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 6b4aa5dac8)
2011-03-03 14:15:03 +01: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
3308ddfb36 avio: deprecate put_tag
it's not used internally anymore and shouldn't be public.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 61840b4360)
2011-02-26 03:16:05 +01: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
ebb92e0768 avio: rename url_fopen/fclose -> avio_open/close.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 22a3212e32)
2011-02-23 18:22:03 +01: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
2df9d0008e avio: make put_nbyte internal.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 0ac8e2bf2b)
2011-02-22 02:44:38 +01:00
Anton Khirnov
e9eb8d0bce 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>
(cherry picked from commit 77eb5504d3)
2011-02-22 02:44:38 +01:00
Anton Khirnov
d4e321d9c2 avio: make get_partial_buffer internal.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit b3db9ceef1)
2011-02-22 02:44:37 +01:00
Anton Khirnov
e63a362857 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>
(cherry picked from commit b7effd4e83)
2011-02-22 02:44:37 +01:00
Anton Khirnov
90ed2776ea avio: rename av_alloc_put_byte -> avio_alloc_context for consistency
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 8d9ac969cb)
2011-02-22 02:44:36 +01: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
Anton Khirnov
8d9ac969cb avio: rename av_alloc_put_byte -> avio_alloc_context for consistency
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-21 10:23:44 -05:00
Anton Khirnov
ae99313aa5 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>
(cherry picked from commit e731b8d872)
2011-02-20 19:05:47 +01:00
Anton Khirnov
471fe57e1a avio: rename ByteIOContext to AVIOContext.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit ae628ec1fd)
2011-02-20 19:05:47 +01:00
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>
2011-02-20 08:37:31 -05:00
Anton Khirnov
ae628ec1fd avio: rename ByteIOContext to AVIOContext.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-20 08:37:15 -05:00
Anton Khirnov
f9d6b13a23 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>
(cherry picked from commit 93b78d1210)
2011-01-26 03:43:31 +01:00
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>
2011-01-25 21:48:03 +01:00
Anton Khirnov
6e89b61293 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>
(cherry picked from commit dccbd97d72)
2011-01-23 19:32:06 +01:00
Anton Khirnov
e910a77b0d avio: add av_put_str and deprecate put_strz in favor of it
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 4efd5cf34b)
2011-01-23 19:32:06 +01:00
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>
2011-01-21 20:21:51 +00:00
Anton Khirnov
4efd5cf34b avio: add av_put_str and deprecate put_strz in favor of it
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-21 20:21:03 +00:00
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
2011-01-13 06:22:43 +00:00
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
2011-01-12 07:06:27 +00:00
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
2011-01-02 10:45:07 +00:00
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
2010-08-19 21:28:43 +00:00
Reimar Döffinger
853a0fccce Cosmetics: fix indentation and remove a useless else.
Originally committed as revision 24495 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-25 14:35:12 +00:00
Reimar Döffinger
3aa13da970 Simplify get_byte and url_fgetc.
Originally committed as revision 24494 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-25 14:33:40 +00:00
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
2010-07-24 09:04:44 +00:00
Aurelien Jacobs
a43416a540 improve ff_get_line to return line length
Originally committed as revision 24400 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-21 21:40:10 +00:00
Aurelien Jacobs
7c89295145 move ff_get_line to aviobuf.c
Originally committed as revision 24399 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-21 21:39:01 +00:00
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
2010-07-20 09:58:30 +00:00
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
2010-07-17 05:26:30 +00:00
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
2010-07-16 23:20:03 +00:00
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
2010-07-09 12:14:33 +00:00
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
2010-07-05 09:11:45 +00:00
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
2010-07-01 20:15:49 +00:00
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
2010-04-21 21:19:25 +00:00
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
2010-04-18 17:37:21 +00:00
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
2010-04-12 15:03:30 +00:00
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
2010-04-08 09:47:32 +00:00
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
2010-04-08 09:02:27 +00:00
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
2010-03-24 10:41:58 +00:00
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
2010-03-18 00:22:58 +00:00
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
2010-03-15 22:54:22 +00:00
Stefano Sabatini
8757dc5e40 Remove duplicated empty line.
Originally committed as revision 21553 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-30 20:18:55 +00:00
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
2009-10-20 06:40:01 +00:00
Reimar Döffinger
90aa6ace63 Merge declaration and initialization
Originally committed as revision 20214 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-12 16:38:08 +00:00
Reimar Döffinger
098d8e0950 Simplify: use FFMIN
Originally committed as revision 20213 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-12 16:36:48 +00:00
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
2009-10-02 06:36:39 +00:00
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
2009-04-13 04:02:51 +00:00
Reimar Döffinger
0c5a43d648 Merge declaration and initialization of io_buffer_size
Originally committed as revision 16639 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-16 16:39:17 +00:00
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
2009-01-16 16:37:54 +00:00
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
2009-01-16 15:35:51 +00:00
Reimar Döffinger
aa805f94c5 Use AV_WB32 instead of reimplementing it.
Originally committed as revision 16635 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-16 15:34:37 +00:00
Reimar Döffinger
dc2c2eea41 Use av_mallocz instead of explicitly zeroing in url_open_dyn_buf_internal.
Originally committed as revision 16634 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-16 15:32:33 +00:00
Reimar Döffinger
7ce820efa0 Replace nonsense -1234 return value in dyn_buf_write by proper AVERROR(ENOMEM)
Originally committed as revision 16633 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-16 15:30:52 +00:00
Aurelien Jacobs
b250f9c66d Change semantic of CONFIG_*, HAVE_* and ARCH_*.
They are now always defined to either 0 or 1.

Originally committed as revision 16590 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-13 23:44:16 +00:00
Aurelien Jacobs
9daa4ceaa3 Initialize s->opaque before calling url_resetbuf().
Fixes a regression test crash for icc 10.1 64 bit.

Patch by Aurelien.

Originally committed as revision 16271 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-22 11:23:00 +00:00
Diego Biurrun
7f37f5687d whitespace cosmetics
Originally committed as revision 16100 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-13 13:39:13 +00:00
Jindřich Makovička
f5edd874fa always use the whole buffer for reading w/ packetized sources to avoid packet truncation
Originally committed as revision 15799 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-11-10 21:41:35 +00:00
Michael Niedermayer
4589dc5c4d Append read data onto the buffer instead of overwriting, this ensures
that the whole buffer is available for seeking back.
Fixes issue480

Originally committed as revision 15634 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-10-18 17:30:37 +00:00
Reimar Döffinger
6bc03a695b Make size variables in dyn_buf_write unsigned so gcc will not optimize the
check away (due to assuming signed overflows do not happen).

Originally committed as revision 15555 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-10-04 21:11:58 +00:00
Diego Biurrun
bc5c918ea8 Remove offset_t typedef and use int64_t directly instead.
The name offset_t is easily confused with the standard off_t type and
*_t is POSIX reserved namespace if any POSIX header is included.

Originally committed as revision 15533 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-10-03 10:16:29 +00:00
Baptiste Coudurier
39a127bfbc Only reset buffer state if seeking is successful; update seek reg ref.
Originally committed as revision 14491 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-31 19:40:06 +00:00
Diego Biurrun
245976da2a Use full path for #includes from another directory.
Originally committed as revision 13098 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-09 11:56:36 +00:00
Aurelien Jacobs
3abe5fbdc4 improve CRC API
- don't export any global var
 - provide either generated or hardcoded tables

Originally committed as revision 11409 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-01-04 23:09:58 +00:00
Reimar Döffinger
1e0f346896 Add a av_alloc_put_byte function.
The name is in analogy to init_put_byte, but I would not mind it
being changed to something better.

Originally committed as revision 11305 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-12-22 16:18:07 +00:00
Michael Niedermayer
b075e52059 Make recently added and still unused read_seek functions return offset_t.
Originally committed as revision 11274 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-12-19 21:11:08 +00:00
Michael Niedermayer
502bdf6893 Merge recently added and still unused play and pause functions.
Originally committed as revision 11273 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-12-19 20:57:13 +00:00
Michael Niedermayer
004050eed7 Remove unneeded avio wrapper functions.
Originally committed as revision 11264 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-12-19 02:33:47 +00:00
Baptiste Coudurier
5cb4b82a17 return error when url_fseek could not read until desired offset in streamed mode
Originally committed as revision 11233 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-12-16 17:52:46 +00:00
Björn Axelsson
e7e4810aae Extend ByteIOContext and add the buffered IO functions:
av_url_read_fplay(), av_url_read_fpause() and av_url_read_fseek().

patch by: Björn Axelsson, bjorn d axelsson a intinor d se

Originally committed as revision 11110 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-11-28 19:46:49 +00:00
Björn Axelsson
899681cd1d Use dynamically allocated ByteIOContext in AVFormatContext
patch by: Björn Axelsson, bjorn d axelsson a intinor d se
thread: [PATCH] Remove static ByteIOContexts, 06 nov 2007

Originally committed as revision 11071 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-11-21 07:41:00 +00:00
Kostya Shishkov
7798b42df1 Add ff_ prefix to get_v()
Originally committed as revision 10912 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-11-03 18:29:16 +00:00
Kostya Shishkov
897d3eef4c Make get_v() available to the other demuxers
Originally committed as revision 10911 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-11-03 18:26:42 +00:00
Baptiste Coudurier
992e78f5f2 rename av_crc04C11DB7_update to ff_crc04C11DB7_update and move it to aviobuf.c so it can be reused by other (de)muxers
Originally committed as revision 10873 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-10-30 00:01:25 +00:00
Björn Axelsson
770d9dafa1 Add functionality to set the direction of a ByteIOContext buffer.
Patch by Björn Axelsson bjorn axelsson intinor se
Original thread: [FFmpeg-devel] [PATCH] MMS protocol support patch 1
Date: 09/19/2007 05:51 PM

Originally committed as revision 10709 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-10-11 14:57:47 +00:00
Benoit Fouet
2d89f334f4 Indentation
Originally committed as revision 10589 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-09-26 11:33:30 +00:00
Benoit Fouet
602dd8f6c4 Check read_packet before using it.
Originally committed as revision 10588 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-09-26 11:32:51 +00:00
Panagiotis Issaris
6f3e0b2174 Replace all occurrences of AVERROR_IO with AVERROR(EIO).
Originally committed as revision 9760 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-19 15:23:32 +00:00
Alex Beregszaszi
5f09770382 cosmetics: fix indentation
Originally committed as revision 8998 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-05-11 19:07:40 +00:00
Panagiotis Issaris
a8c5ab2707 Move aviobuf.c comments to avio.h. By moving the aviobuf.c comments to avio.h,
these comments can be extracted by Doxygen by only accessing the installed
headers.

Originally committed as revision 8258 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-03-05 13:55:45 +00:00
François Revol
8fa36ae09d This fixes error handling for BeOS, removing the need for some ifdefs.
AVERROR_ defines are moved to avcodec.h as they are needed in there as well. Feel free to move that to avutil/common.h.
Bumped up avcodec/format version numbers as though it's binary compatible we will want to rebuild apps as error values changed.
Please from now on use return AVERROR(EFOO) instead of the ugly return -EFOO in your code.
This also removes the need for berrno.h.

Originally committed as revision 7965 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-02-13 18:26:14 +00:00
Ronald S. Bultje
68fcdbf1e5 Fix misbehaviour in url_fseek() when seeking fails.
The return value of the seek function is -1 on error, not -EPIPE (the return value in url_seek() if no seek function pointer is set)
Patch by Ronald S. Bultje % rbultje A ronald P bitfreak P net %
Original thread:
date: Dec 31, 2006 9:25 PM
subject: [Ffmpeg-devel] Re: [PATCH] file length handling

Originally committed as revision 7766 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-01-30 10:48:39 +00:00
Ronald S. Bultje
8f42f5238e proper error handling in file size retrieval, patch by Ronald S. Bultje rbultje at ronald bitfreak net
Originally committed as revision 7736 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-01-28 02:38:02 +00:00
Michael Niedermayer
1ae2c5f2e7 fix indention of previous commit
Originally committed as revision 7396 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-01-01 21:49:50 +00:00
Michael Niedermayer
8e287af090 seekless filesize retrieving support in 7 lines of code, also doesnt break compatibility
Originally committed as revision 7395 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-01-01 21:49:09 +00:00
Aurelien Jacobs
3b61ab0b03 put_*() are not only useful to muxers and protocol
fix compilation of matroska demuxer with --disable-muxers --disable-protocols

Originally committed as revision 7323 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-12-16 20:40:09 +00:00
Loïc Le Loarer
8fa641f8e8 Fix compile with --disable-muxers, patch by Loïc Le Loarer, lll+ffmpeg m4x org.
Originally committed as revision 7185 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-11-30 01:00:12 +00:00
Michael Niedermayer
942f3bb528 move memory reading ByteIOContext init from mov.c to avobuf.c
Originally committed as revision 6744 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-20 09:32:48 +00:00
Diego Biurrun
b78e7197a8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
and fix GPL/LGPL version mismatches.

Originally committed as revision 6577 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-10-07 15:30:46 +00:00
Michael Niedermayer
398f5d3f1d support forward seeking in non seekable streams
Originally committed as revision 6340 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-09-26 17:09:03 +00:00
Michael Niedermayer
3b9a913db4 simplify seek() failure check
Originally committed as revision 6339 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-09-26 16:09:56 +00:00
Michael Niedermayer
f40d17398d simplify url_fseek()
Originally committed as revision 6316 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-09-22 10:03:04 +00:00
Michael Niedermayer
ccb159940b fix regression failure after adler simplification
Originally committed as revision 5803 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-07-20 10:22:07 +00:00
Aurelien Jacobs
ea395e8c6c add a Creative VOC (de)muxer
Originally committed as revision 4967 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-02-09 22:52:23 +00:00
Gildas Bazin
04f46ced8c Add --disable-protocols option to configure to disable I/O protocol from
libavformat.  Also fix build with --disable-muxers and --disable-ffserver.
patch by Gildas Bazin < gbazin **@** altern **.** org >

Originally committed as revision 4879 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-01-21 18:36:32 +00:00
Diego Biurrun
5509bffa88 Update licensing information: The FSF changed postal address.
Originally committed as revision 4842 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-01-12 22:43:26 +00:00
Diego Biurrun
bb270c0896 COSMETICS: tabs --> spaces, some prettyprinting
Originally committed as revision 4764 to svn://svn.ffmpeg.org/ffmpeg/trunk
2005-12-22 01:10:11 +00:00
Diego Biurrun
115329f160 COSMETICS: Remove all trailing whitespace.
Originally committed as revision 4749 to svn://svn.ffmpeg.org/ffmpeg/trunk
2005-12-17 18:14:38 +00:00
Diego Biurrun
a9e3509529 Replace CONFIG_ENCODERS/CONFIG_DECODERS with CONFIG_MUXERS/CONFIG_DEMUXERS
in libavformat to allow building (de)coders and (de)muxers independently at
some point + support for this option in configure.

Originally committed as revision 4611 to svn://svn.ffmpeg.org/ffmpeg/trunk
2005-09-23 00:25:41 +00:00
Michael Niedermayer
7cb8f314db remove non portable get/put_be64_double()
Originally committed as revision 4461 to svn://svn.ffmpeg.org/ffmpeg/trunk
2005-07-19 14:50:22 +00:00
Michael Niedermayer
a254c5745b kill duplicated get/put_be24()
Originally committed as revision 4460 to svn://svn.ffmpeg.org/ffmpeg/trunk
2005-07-19 14:41:08 +00:00
Michael Niedermayer
0f0680c553 10l (segfault fix)
Originally committed as revision 4341 to svn://svn.ffmpeg.org/ffmpeg/trunk
2005-06-03 08:48:10 +00:00
Wolfram Gloger
536ffa59e9 Fix url_fsize for large files patch by (Wolfram Gloger: wmglo, dent med uni-muenchen de)
Originally committed as revision 4322 to svn://svn.ffmpeg.org/ffmpeg/trunk
2005-05-30 16:45:08 +00:00
Aurelien Jacobs
a965c478b2 drop most url_fileno() calls (allows to use ByteIOContext directly in caller apps instead of URLProtocol)
Originally committed as revision 4275 to svn://svn.ffmpeg.org/ffmpeg/trunk
2005-05-19 00:06:27 +00:00
Michael Niedermayer
3e2b6358e0 bypass internal buffer for "large" packets
Originally committed as revision 4080 to svn://svn.ffmpeg.org/ffmpeg/trunk
2005-03-24 22:07:54 +00:00
Michael Niedermayer
0ecca7a49f various security fixes and precautionary checks
Originally committed as revision 3822 to svn://svn.ffmpeg.org/ffmpeg/trunk
2005-01-12 00:16:25 +00:00
Michael Niedermayer
568e18b15e integer overflows, heap corruption
possible arbitrary code execution cannot be ruled out in some cases
precautionary checks

Originally committed as revision 3813 to svn://svn.ffmpeg.org/ffmpeg/trunk
2005-01-08 14:21:33 +00:00
Michael Niedermayer
576ae256a4 write error handling
Originally committed as revision 3572 to svn://svn.ffmpeg.org/ffmpeg/trunk
2004-10-08 20:09:52 +00:00
Michael Niedermayer
53e2f9caf8 ffserver fixes by (Koos Vriezen <koos.vriezen at xs4all dot nl>)
Originally committed as revision 3340 to svn://svn.ffmpeg.org/ffmpeg/trunk
2004-07-25 11:59:34 +00:00
Mike Melanson
0bd586c50d sweeping change from -EIO -> AVERROR_IO
Originally committed as revision 3239 to svn://svn.ffmpeg.org/ffmpeg/trunk
2004-06-19 03:59:34 +00:00
Michael Niedermayer
465e1dadbe 10l (bytes_left() -> url_feof())
10l (updating LRU delta pts for type 1/2 frames)
ensure that checksumming isnt enabled if its not needed
search for next startcode and then search backward to the next valid frame if an inconsistancy is detected
deal with non-frame startcodes in the middle of the stream

Originally committed as revision 2972 to svn://svn.ffmpeg.org/ffmpeg/trunk
2004-04-06 17:40:17 +00:00
Michael Niedermayer
ee9f36a88e checksuming for nut & nice checksum API for libavformat
Originally committed as revision 2969 to svn://svn.ffmpeg.org/ffmpeg/trunk
2004-04-05 12:02:10 +00:00
Leon van Stuivenberg
e15dec10d5 decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
Originally committed as revision 2896 to svn://svn.ffmpeg.org/ffmpeg/trunk
2004-03-15 03:29:32 +00:00
Gildas Bazin
ac9fe33d0e avio patch by (Gildas Bazin <gbazin at altern dot org>)
Originally committed as revision 2783 to svn://svn.ffmpeg.org/ffmpeg/trunk
2004-02-14 16:25:32 +00:00
Mike Melanson
764ef40015 disable encoders where appropriate (patch courtesy of BERO
<bero -at- geocities.co.jp>)

Originally committed as revision 2375 to svn://svn.ffmpeg.org/ffmpeg/trunk
2003-10-14 04:15:53 +00:00
Zdenek Kabelac
546031ee86 * keeping compiler happy and quiet
Originally committed as revision 1817 to svn://svn.ffmpeg.org/ffmpeg/trunk
2003-04-23 18:38:34 +00:00
Mark Hills
b88ba82315 ffserver deallocate ctx->streams on closing patch by (Mark Hills <mark at pogo dot org dot uk>)
Originally committed as revision 1704 to svn://svn.ffmpeg.org/ffmpeg/trunk
2003-03-26 10:30:08 +00:00
Zdenek Kabelac
0c1a9edad4 * UINTX -> uintx_t INTX -> intx_t
Originally committed as revision 1578 to svn://svn.ffmpeg.org/ffmpeg/trunk
2003-02-11 16:35:48 +00:00
Zdenek Kabelac
5c91a6755b * static,const,compiler warning cleanup
Originally committed as revision 1567 to svn://svn.ffmpeg.org/ffmpeg/trunk
2003-02-10 09:35:32 +00:00
Fabrice Bellard
abac617591 renamed libav to libavformat
Originally committed as revision 1276 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-11-25 19:07:40 +00:00