Merge "Added getter for session Id to AudioSink" into gingerbread
This commit is contained in:
@ -76,6 +76,7 @@ public:
|
||||
virtual uint32_t latency() const = 0;
|
||||
virtual float msecsPerFrame() const = 0;
|
||||
virtual status_t getPosition(uint32_t *position) = 0;
|
||||
virtual int getSessionId() = 0;
|
||||
|
||||
// If no callback is specified, use the "write" API below to submit
|
||||
// audio data.
|
||||
|
@ -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);
|
||||
|
@ -56,6 +56,7 @@ MediaPlayer::MediaPlayer()
|
||||
mVideoWidth = mVideoHeight = 0;
|
||||
mLockThreadId = 0;
|
||||
mAudioSessionId = AudioSystem::newAudioSessionId();
|
||||
mSendLevel = 0;
|
||||
}
|
||||
|
||||
MediaPlayer::~MediaPlayer()
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user