diff options
author | Eric Laurent <elaurent@google.com> | 2010-10-07 18:23:03 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2010-10-07 18:23:03 -0700 |
commit | b3bdf3f0086f1d921720f6dc92cabc7b6f2ab63e (patch) | |
tree | 21f02868e4a39ef36117dc7e0724e0ad5adf1247 /media | |
parent | 36a182870527f1d71f482e9a280bc818a4609cb6 (diff) | |
download | frameworks_base-b3bdf3f0086f1d921720f6dc92cabc7b6f2ab63e.zip frameworks_base-b3bdf3f0086f1d921720f6dc92cabc7b6f2ab63e.tar.gz frameworks_base-b3bdf3f0086f1d921720f6dc92cabc7b6f2ab63e.tar.bz2 |
Added getter for session Id to AudioSink
Added a method to expose the audio session id at AudioSink interface
so that the AudioPlayer in stagefright can retrieve it.
Also:
- Fixed audio effect send level not being initialized in mediaplayer.
- Fixed compilation error when LOGV is enabled in mediaplayer JNI
Change-Id: I4bb55454fd63d646e0e677692d737c4843fb05fb
Diffstat (limited to 'media')
-rw-r--r-- | media/jni/android_media_MediaPlayer.cpp | 2 | ||||
-rw-r--r-- | media/libmedia/mediaplayer.cpp | 1 | ||||
-rw-r--r-- | media/libmediaplayerservice/MediaPlayerService.cpp | 10 | ||||
-rw-r--r-- | media/libmediaplayerservice/MediaPlayerService.h | 2 |
4 files changed, 14 insertions, 1 deletions
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp index 6f94e8b..49e5e89 100644 --- a/media/jni/android_media_MediaPlayer.cpp +++ b/media/jni/android_media_MediaPlayer.cpp @@ -727,7 +727,7 @@ android_media_MediaPlayer_setAuxEffectSendLevel(JNIEnv *env, jobject thiz, jfloa } static void android_media_MediaPlayer_attachAuxEffect(JNIEnv *env, jobject thiz, jint effectId) { - LOGV("attachAuxEffect(): %d", sessionId); + LOGV("attachAuxEffect(): %d", effectId); sp<MediaPlayer> mp = getMediaPlayer(env, thiz); if (mp == NULL ) { jniThrowException(env, "java/lang/IllegalStateException", NULL); diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp index c6b2efb..cc41e66 100644 --- a/media/libmedia/mediaplayer.cpp +++ b/media/libmedia/mediaplayer.cpp @@ -56,6 +56,7 @@ MediaPlayer::MediaPlayer() mVideoWidth = mVideoHeight = 0; mLockThreadId = 0; mAudioSessionId = AudioSystem::newAudioSessionId(); + mSendLevel = 0; } MediaPlayer::~MediaPlayer() diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index d975cb9..c43e9bb 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp @@ -1546,6 +1546,11 @@ void MediaPlayerService::AudioOutput::CallbackWrapper( } +int MediaPlayerService::AudioOutput::getSessionId() +{ + return mSessionId; +} + #undef LOG_TAG #define LOG_TAG "AudioCache" MediaPlayerService::AudioCache::AudioCache(const char* name) : @@ -1733,4 +1738,9 @@ void MediaPlayerService::AudioCache::notify(void* cookie, int msg, int ext1, int p->mSignal.signal(); } +int MediaPlayerService::AudioCache::getSessionId() +{ + return 0; +} + } // namespace android diff --git a/media/libmediaplayerservice/MediaPlayerService.h b/media/libmediaplayerservice/MediaPlayerService.h index a967ee2..4492e20 100644 --- a/media/libmediaplayerservice/MediaPlayerService.h +++ b/media/libmediaplayerservice/MediaPlayerService.h @@ -77,6 +77,7 @@ class MediaPlayerService : public BnMediaPlayerService virtual uint32_t latency() const; virtual float msecsPerFrame() const; virtual status_t getPosition(uint32_t *position); + virtual int getSessionId(); virtual status_t open( uint32_t sampleRate, int channelCount, @@ -133,6 +134,7 @@ class MediaPlayerService : public BnMediaPlayerService virtual uint32_t latency() const; virtual float msecsPerFrame() const; virtual status_t getPosition(uint32_t *position); + virtual int getSessionId(); virtual status_t open( uint32_t sampleRate, int channelCount, int format, |