summaryrefslogtreecommitdiffstats
path: root/libvideoeditor
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-04-13 16:50:19 -0700
committerEric Laurent <elaurent@google.com>2012-04-20 14:17:02 -0700
commit1948eb3ea6eee336e8cdab9b0c693f93f5f19993 (patch)
tree448eed49a4ba18fb1ab4f2fb1b2c0d5cef6d242f /libvideoeditor
parent21e8c50bd13ebe44f3088e26c9c6df0e163c469c (diff)
downloadframeworks_av-1948eb3ea6eee336e8cdab9b0c693f93f5f19993.zip
frameworks_av-1948eb3ea6eee336e8cdab9b0c693f93f5f19993.tar.gz
frameworks_av-1948eb3ea6eee336e8cdab9b0c693f93f5f19993.tar.bz2
Add support for deep audio buffers
Allow AudioSink to use deep audio buffering when the source is audio only and its duration is more than a certain threshold. This helps improve battery life but implies higher audio latency. Change-Id: Ie79915b61c370292f05aabda9779356570e03cbb
Diffstat (limited to 'libvideoeditor')
-rwxr-xr-xlibvideoeditor/lvpp/VideoEditorPlayer.cpp7
-rwxr-xr-xlibvideoeditor/lvpp/VideoEditorPlayer.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/libvideoeditor/lvpp/VideoEditorPlayer.cpp b/libvideoeditor/lvpp/VideoEditorPlayer.cpp
index c9cff81..fc9fb49 100755
--- a/libvideoeditor/lvpp/VideoEditorPlayer.cpp
+++ b/libvideoeditor/lvpp/VideoEditorPlayer.cpp
@@ -392,7 +392,7 @@ status_t VideoEditorPlayer::VeAudioOutput::getFramesWritten(uint32_t *written) c
status_t VideoEditorPlayer::VeAudioOutput::open(
uint32_t sampleRate, int channelCount, audio_channel_mask_t channelMask,
audio_format_t format, int bufferCount,
- AudioCallback cb, void *cookie) {
+ AudioCallback cb, void *cookie, audio_output_flags_t flags) {
mCallback = cb;
mCallbackCookie = cookie;
@@ -442,7 +442,7 @@ status_t VideoEditorPlayer::VeAudioOutput::open(
format,
channelMask,
frameCount,
- AUDIO_OUTPUT_FLAG_NONE,
+ flags,
CallbackWrapper,
this);
} else {
@@ -451,7 +451,8 @@ status_t VideoEditorPlayer::VeAudioOutput::open(
sampleRate,
format,
channelMask,
- frameCount);
+ frameCount,
+ flags);
}
if ((t == 0) || (t->initCheck() != NO_ERROR)) {
diff --git a/libvideoeditor/lvpp/VideoEditorPlayer.h b/libvideoeditor/lvpp/VideoEditorPlayer.h
index 350b384..2ab4eef 100755
--- a/libvideoeditor/lvpp/VideoEditorPlayer.h
+++ b/libvideoeditor/lvpp/VideoEditorPlayer.h
@@ -52,7 +52,7 @@ class VideoEditorPlayer : public MediaPlayerInterface {
virtual status_t open(
uint32_t sampleRate, int channelCount, audio_channel_mask_t channelMask,
audio_format_t format, int bufferCount,
- AudioCallback cb, void *cookie);
+ AudioCallback cb, void *cookie, audio_output_flags_t flags);
virtual void start();
virtual ssize_t write(const void* buffer, size_t size);