summaryrefslogtreecommitdiffstats
path: root/libavcodec/audiotoolboxenc.c
Commit message (Collapse)AuthorAgeFilesLines
* lavc/audiotoolboxenc: fix noise in encoded audioJiejun Zhang2018-01-031-0/+15
| | | | | | | | | | | | | | This fixes #6940 Although undocumented, AudioToolbox seems to require the data supplied by the callback (i.e. ffat_encode_callback) being unchanged until the next time the callback is called. In the old implementation, the AVBuffer backing the frame is recycled after the frame is freed, and somebody else (maybe the decoder) will write into the AVBuffer and change the data. AudioToolbox then encodes some wrong data and noise is produced. Retaining a frame reference solves this problem. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: add metadata to identify wrappers and hardware decoderswm42017-12-141-0/+1
| | | | | | | | | | | | | | | | | | | | | Explicitly identify decoder/encoder wrappers with a common name. This saves API users from guessing by the name suffix. For example, they don't have to guess that "h264_qsv" is the h264 QSV implementation, and instead they can just check the AVCodec .codec and .wrapper_name fields. Explicitly mark AVCodec entries that are hardware decoders or most likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing API users listing hardware decoders in a more generic way. The proposed AVCodecHWConfig does not provide this information fully, because it's concerned with decoder configuration, not information about the fact whether the hardware is used or not. AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software implementations in case the hardware is not capable. Based on a patch by Philip Langdale <philipl@overt.org>. Merges Libav commit 47687a2f8aca3f65b6fdd117b1cb66a7409a7fd1.
* lavc/audiotoolboxenc: fix dropped frames on iOSRick Kern2016-06-161-27/+50
| | | | | | | AudioConverterFillComplexBuffer() doesn't always call its callback. A frame queue is used to prevent skipped audio samples. Signed-off-by: Rick Kern <kernrj@gmail.com>
* lavc/audiotoolboxenc: allow setting maxrate with pre-10.9 deployment targetsRodger Combs2016-04-021-1/+1
| | | | | | | The build failure here is caused by the enum value not being defined, but as long as we're on a newer SDK that has it, it's safe to use it even when our deployment target is older. Setting the property will error, but we're not failing on errors there.
* lavc/audiotoolboxenc: fix iOS buildRodger Combs2016-04-021-1/+6
|
* lavc/audiotoolboxenc: fix a number of config issuesRodger Combs2016-04-021-22/+176
| | | | | | | | - size variables were used in a confusing way - incorrect size var use led to channel layouts not being set properly - channel layouts were incorrectly mapped for >2-channel AAC - bitrates not accepted by the encoder were discarded instead of being clamped - some minor style/indentation fixes
* lavc/audiotoolboxenc: remove unneeded packet metadataRodger Combs2016-04-021-13/+3
| | | | | This isn't necessary here, and for some reason broke only multichannel AAC encoding when a channel layout tag was set.
* avcodec/audiotoolboxenc: Fix compile error on OS X 10.8.Dan Dennedy2016-03-261-0/+2
| | | | | | | | | | Fixes error "libavcodec/audiotoolboxenc.c:294:50: error: use of undeclared identifier 'kAudioCodecPropertyPacketSizeLimitForVBR'." That was added to 10.9: https://developer.apple.com/library/mac/releasenotes/General/APIDiffsMacOSX10_9/AudioUnit.html Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc: add AudioToolbox encodersRodger Combs2016-03-221-0/+471
Fixes trac #4828
OpenPOWER on IntegriCloud