Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Sean McGovern
bf18abb2eb
Rename "AVClass class" as "AVClass component_class" for external codecs.
...
The aix header math.h defines "extern int class()" for C.
This fixes compilation on aix with external libraries enabled.
Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
12 years ago
Diego Biurrun
63d744e2be
av_log_missing_feature() ---> avpriv_report_missing_feature()
12 years ago
Clément Bœsch
1ec94b0f06
lavc: factorize ff_{thread_,re,}get_buffer error messages.
...
Coccinelle profile used:
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_get_buffer(ctx, f, flags)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str;
@@
-if ((r = ff_reget_buffer(ctx, f)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_reget_buffer(ctx, f)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0)
+ return r;
...along with some manual patches for the remaining ones.
12 years ago
Anton Khirnov
f073b1500e
lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruft
12 years ago
Yusuke Nakamura
19dd4017ab
libopencore-amr: Add the missing 3rd argument of ff_get_buffer()
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
James Zern
bcaf64b605
normalize calls to ff_alloc_packet2
...
- check ret < 0
- remove excessive error log
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
8837f4396a
libopencore-amrwb: Make AMR-WB ifdeffery more precise
...
The library might provide an encoder in the future, so it's better to
check for the presence of the decoder rather than just the library.
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Diego Biurrun
e6bda9a9fd
libopencore-amr: Conditionally compile decoder and encoder bits
...
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Diego Biurrun
56632fef65
libopencore-amrnb: cosmetics: Group all encoder-related code together
...
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Justin Ruggles
0cd08367dd
libopencore-amr: decode directly to the user-provided AVFrame
12 years ago
Michael Niedermayer
1d7ffd06e4
lavc: Fix assignments in if() when calling ff_af_queue_add
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
d6180aa297
libopencore-amr: Fix assignments in if()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
594d4d5df3
lavc: add a wrapper for AVCodecContext.get_buffer().
...
It will be useful in the upcoming transition to refcounted AVFrames.
12 years ago
Michael Niedermayer
34b6f1efa2
libopencore_amrwb: check packet size
...
Fix OOM
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
a903f8f087
Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
...
Also reorder some other #include when applicable.
12 years ago
Michael Niedermayer
4a28962454
libopencore-amr: fix av_log() argument
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Martin Storsjö
ad961726dc
libopencore-amr: Check the return value of amr_decode_fix_avctx
...
This allows getting rid of redundant checks later in the codec
specific init functions.
Move the check to before actually initializing the decoder lib,
to simplify error handling.
This fixes a case of returning a value from a void function, present since
d40dab907
.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Xidorn Quan
0ecef3a0ef
amr_decode_fix_avctx should not return value
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b30f4510d8
libopencore-amr: allow sampling rates other than 8khz
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
0aaf0a07d4
libopencore-amrdec: allow sampling rates other than 8khz
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
d40dab907a
libopencore-amr: set channel layout for amr-nb or if not set by the user
12 years ago
Martin Storsjö
e6153f173a
avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
13 years ago
Diego Biurrun
0177b7d23a
Improve descriptiveness of a number of codec and container long names
13 years ago
Martin Storsjö
00c3b67b8a
cosmetics: Align codec declarations
...
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Paul B Mahol
ae2c33b0c2
cosmetics: remove superfluous curly brackets
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
83fc7341a7
libopencore-amr: switch to ff_alloc_packet2().
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Justin Ruggles
8ccf545b95
libopencore-amrnbenc: use AVCodec.encode2()
13 years ago
Justin Ruggles
adbf61ff8a
libopencore-amr: do not set AVCodecContext.frame_size
...
It is not necessary
13 years ago
Justin Ruggles
fe78470a8b
libopencore-amrnbenc: fix end-of-stream handling
...
Use CODEC_CAP_DELAY and CODEC_CAP_SMALL_LAST_FRAME to properly pad and flush
the encoder at the end of encoding. This is needed in order to have all input
samples decoded.
13 years ago
Justin Ruggles
a8bdf2405c
check for coded_frame allocation failure in several audio encoders
13 years ago
Paul B Mahol
f913f3788a
libopencore-amr: fix memleak
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
766e160e87
libopencore-amr: check return value of avcodec_alloc_frame()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Justin Ruggles
0eea212943
Add avcodec_decode_audio4().
...
Deprecate avcodec_decode_audio3().
Implement audio support in avcodec_default_get_buffer().
Implement the new audio decoder API in all audio decoders.
13 years ago
Justin Ruggles
4a6a29a7fb
libopencore-amr: check output buffer size before decoding
13 years ago
Justin Ruggles
345d15d2f9
libopencore-amr: remove unneeded buf_size==0 check.
...
avcodec_decode_audio3() already checks it before sending the packet to the
decoder.
13 years ago
Justin Ruggles
402c98783d
libopencore-amr: remove unneeded frame_count field.
...
Use AVCodecContext.frame_number instead.
13 years ago
Anton Khirnov
145f741e11
AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*
13 years ago
Anton Khirnov
ec6402b7c5
lavc: use designated initialisers for all codecs.
...
It's more readable and less prone to breakage.
14 years ago
Diego Biurrun
8dd52d8202
opencore-amr: Add missing initializer braces to shut up gcc warning.
...
This fixes the warning:
libavcodec/libopencore-amr.c:91: warning: missing braces around initializer
14 years ago
Martin Storsjö
651b276ef7
libopencore-amr, libvo-amrwbenc: Allow enabling DTX via private AVOptions
...
DTX, discontinuous transmission, allows emitting frames with
comfort noise when no voice is detected in the input audio.
Signed-off-by: Martin Storsjö <martin@martin.st>
14 years ago
Martin Storsjö
3dd82afc74
libopencore-amr, libvo-amrwbenc: Only check the bitrate when changed
...
Also rename the incorrectly named enc_bitrate to enc_mode, use the
enc_bitrate variable for storing the last chosen bitrate.
This avoids continuous warning log messages if not using an
exactly matching bitrate, while still allowing changing bitrate
at any point.
Signed-off-by: Martin Storsjö <martin@martin.st>
14 years ago
Martin Storsjö
7073938121
libopencore-amr, libvo-amrwbenc: Find the closest matching bitrate
...
Dynamically print the supported bitrates from the local table,
instead of using a hardcoded log message.
Signed-off-by: Martin Storsjö <martin@martin.st>
14 years ago
Martin Storsjö
882221afde
libopencore-amr: Cosmetics: Rewrap and align
...
Signed-off-by: Martin Storsjö <martin@martin.st>
14 years ago
Martin Storsjö
02c63a109f
libopencore-amr, libvo-amrbwenc: Rename variables and functions
...
Avoid camelCase names for functions and variables.
Signed-off-by: Martin Storsjö <martin@martin.st>
14 years ago
Martin Storsjö
9b9c6405fd
libopencore-amr: Convert commented out debug logging into av_dlog
...
Also add the avctx as logging context.
Signed-off-by: Martin Storsjö <martin@martin.st>
14 years ago
Martin Storsjö
89e7e640f7
libopencore-amr: Remove an unused state variable
...
Signed-off-by: Martin Storsjö <martin@martin.st>
14 years ago