summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/StagefrightRecorder.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-02-10 15:04:31 -0800
committerAndreas Huber <andih@google.com>2010-02-10 15:04:31 -0800
commitb45c62c8e9b05c2703bdae18cc298ae55550db8a (patch)
treef5df3f64485d2fc0876ad4d0b583ace386385309 /media/libmediaplayerservice/StagefrightRecorder.cpp
parentcb5b4896ebc1ee36b254866f6c9a3f376d68d0ac (diff)
downloadframeworks_av-b45c62c8e9b05c2703bdae18cc298ae55550db8a.zip
frameworks_av-b45c62c8e9b05c2703bdae18cc298ae55550db8a.tar.gz
frameworks_av-b45c62c8e9b05c2703bdae18cc298ae55550db8a.tar.bz2
Fixing AMR recording code.
Diffstat (limited to 'media/libmediaplayerservice/StagefrightRecorder.cpp')
-rw-r--r--media/libmediaplayerservice/StagefrightRecorder.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp
index 6383f0c..1a8109c 100644
--- a/media/libmediaplayerservice/StagefrightRecorder.cpp
+++ b/media/libmediaplayerservice/StagefrightRecorder.cpp
@@ -185,6 +185,11 @@ sp<MediaSource> StagefrightRecorder::createAMRAudioSource() {
mAudioEncoder == AUDIO_ENCODER_AMR_NB
? MEDIA_MIMETYPE_AUDIO_AMR_NB : MEDIA_MIMETYPE_AUDIO_AMR_WB);
+ int32_t maxInputSize;
+ CHECK(audioSource->getFormat()->findInt32(
+ kKeyMaxInputSize, &maxInputSize));
+
+ encMeta->setInt32(kKeyMaxInputSize, maxInputSize);
encMeta->setInt32(kKeyChannelCount, 1);
encMeta->setInt32(kKeySampleRate, sampleRate);