summaryrefslogtreecommitdiffstats
path: root/media/libmedia/AudioSystem.cpp
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2010-02-26 02:47:27 -0800
committerEric Laurent <elaurent@google.com>2010-03-02 08:20:13 -0800
commit05bca2fde53bfe3063d2a0a877f2b6bfdd6052cf (patch)
tree7f99a6ebacbc1f76b561b95a04808636486b48ba /media/libmedia/AudioSystem.cpp
parent949c5037a6e019ff575bd481d286908c2eaa1e34 (diff)
downloadframeworks_av-05bca2fde53bfe3063d2a0a877f2b6bfdd6052cf.zip
frameworks_av-05bca2fde53bfe3063d2a0a877f2b6bfdd6052cf.tar.gz
frameworks_av-05bca2fde53bfe3063d2a0a877f2b6bfdd6052cf.tar.bz2
Issue 2071329: audio track is shorter than video track for video capture on sholes
Add API to retrieve number of frames dropped by audio input kernel driver. Submitted on behalf of Masaki Sato <masaki.sato@motorola.com>
Diffstat (limited to 'media/libmedia/AudioSystem.cpp')
-rw-r--r--media/libmedia/AudioSystem.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index 3f9c6d6..4b364f2 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -354,6 +354,16 @@ status_t AudioSystem::getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames
return af->getRenderPosition(halFrames, dspFrames, getOutput((stream_type)stream));
}
+unsigned int AudioSystem::getInputFramesLost(audio_io_handle_t ioHandle) {
+ const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger();
+ unsigned int result = 0;
+ if (af == 0) return result;
+ if (ioHandle == NULL) return result;
+
+ result = af->getInputFramesLost(ioHandle);
+ return result;
+}
+
// ---------------------------------------------------------------------------
void AudioSystem::AudioFlingerClient::binderDied(const wp<IBinder>& who) {