Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Robinson <jrobinsonmedia@gmail.com>2015-03-06 03:10:16 +0300
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2015-03-06 03:10:16 +0300
commit98d19ca8f18901b89aae66dc11c20f5a3a39d7b5 (patch)
tree7996de53c1f50ca7074dc254756d0e06db0e98f5 /libavdevice/avfoundation.m
parent23e483269d211fbbdb241b4868364a13e092ebfc (diff)
lavd/avfoundation: Add support for 24 and 32bit integer input.
Tested on Mac Mini soundflower and built-in line input. Reviewed-by: Thilo Borgmann
Diffstat (limited to 'libavdevice/avfoundation.m')
-rw-r--r--libavdevice/avfoundation.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
index 8b7c5473a7..954c8d5c2b 100644
--- a/libavdevice/avfoundation.m
+++ b/libavdevice/avfoundation.m
@@ -508,6 +508,16 @@ static int get_audio_config(AVFormatContext *s)
ctx->audio_bits_per_sample == 16 &&
ctx->audio_packed) {
stream->codec->codec_id = ctx->audio_be ? AV_CODEC_ID_PCM_S16BE : AV_CODEC_ID_PCM_S16LE;
+ } else if (basic_desc->mFormatID == kAudioFormatLinearPCM &&
+ ctx->audio_signed_integer &&
+ ctx->audio_bits_per_sample == 24 &&
+ ctx->audio_packed) {
+ stream->codec->codec_id = ctx->audio_be ? AV_CODEC_ID_PCM_S24BE : AV_CODEC_ID_PCM_S24LE;
+ } else if (basic_desc->mFormatID == kAudioFormatLinearPCM &&
+ ctx->audio_signed_integer &&
+ ctx->audio_bits_per_sample == 32 &&
+ ctx->audio_packed) {
+ stream->codec->codec_id = ctx->audio_be ? AV_CODEC_ID_PCM_S32BE : AV_CODEC_ID_PCM_S32LE;
} else {
av_log(s, AV_LOG_ERROR, "audio format is not supported\n");
return 1;