diff options
author | Eric Laurent <elaurent@google.com> | 2009-11-02 05:38:12 -0800 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2009-11-11 10:53:05 -0800 |
commit | 5f4119973e138d4be02ebf7004da8f44610fb383 (patch) | |
tree | 96c144318b77cd259c541109e78e84f5e19782a1 /android | |
parent | 9816ec5242955fdf9226ff18f2e890df29a407e5 (diff) | |
download | opencore-5f4119973e138d4be02ebf7004da8f44610fb383.tar.gz |
Fix issue 2194140: [Passion] Support Audience chip.
Add method to AndroidAudioInput to change audio source.
Force AndroidAudioInput audio source to AUDIO_SOURCE_CAMCORDER if a video input is present.
Diffstat (limited to 'android')
-rw-r--r-- | android/author/android_audio_input.cpp | 8 | ||||
-rw-r--r-- | android/author/android_audio_input.h | 3 | ||||
-rw-r--r-- | android/author/authordriver.cpp | 8 |
3 files changed, 19 insertions, 0 deletions
diff --git a/android/author/android_audio_input.cpp b/android/author/android_audio_input.cpp index f7539cc3d..81e121e09 100644 --- a/android/author/android_audio_input.cpp +++ b/android/author/android_audio_input.cpp @@ -695,6 +695,14 @@ bool AndroidAudioInput::setAudioNumChannels(int32 iNumChannels) } //////////////////////////////////////////////////////////////////////////// +bool AndroidAudioInput::setAudioSource(uint32 iSource) +{ + iAudioSource = iSource; + LOGV("AndroidAudioInput::setAudioSource() iAudioSource %d set", iAudioSource); + return true; +} + +//////////////////////////////////////////////////////////////////////////// // Private methods //////////////////////////////////////////////////////////////////////////// diff --git a/android/author/android_audio_input.h b/android/author/android_audio_input.h index a410f2ab7..965022ec4 100644 --- a/android/author/android_audio_input.h +++ b/android/author/android_audio_input.h @@ -298,6 +298,9 @@ public: /* Set the input number of channels */ bool setAudioNumChannels(int32 iNumChannels); + /* Sets the audio input source */ + bool setAudioSource(uint32 iSource); + /* From PVMFMediaClockStateObserver and its base*/ void ClockStateUpdated(); void NotificationsInterfaceDestroyed(); diff --git a/android/author/authordriver.cpp b/android/author/authordriver.cpp index 7aada711a..13994d22f 100644 --- a/android/author/authordriver.cpp +++ b/android/author/authordriver.cpp @@ -313,6 +313,10 @@ void AuthorDriver::handleSetAudioSource(set_audio_source_command *ac) commandFailed(ac); return; } + // force audio source to camcorder when recording video + if (mVideoInputMIO != NULL) { + mAudioInputMIO->setAudioSource(AUDIO_SOURCE_CAMCORDER); + } } OSCL_TRY(error, mAuthor->AddDataSource(*mAudioNode, ac)); @@ -335,6 +339,10 @@ void AuthorDriver::handleSetVideoSource(set_video_source_command *ac) if (mCamera == 0 || (mCamera != 0 && cameraInput->SetCamera(mCamera) == PVMFSuccess)) { mVideoInputMIO = cameraInput; + // force audio source to camcorder when recording video + if (mAudioInputMIO != NULL) { + mAudioInputMIO->setAudioSource(AUDIO_SOURCE_CAMCORDER); + } break; } } |