diff options
author | Gloria Wang <gwang@google.com> | 2011-04-25 17:28:22 -0700 |
---|---|---|
committer | Gloria Wang <gwang@google.com> | 2011-04-29 10:24:03 -0700 |
commit | d01ec6eab019e46398975202e9e4a198a603ad99 (patch) | |
tree | 0669d2f0f8a546de5ebaf135bec67086648f51fc /media/libmedia/mediaplayer.cpp | |
parent | 71a0dab1ca962c2827be0221a7fbcc065dc3cbb8 (diff) | |
download | frameworks_base-d01ec6eab019e46398975202e9e4a198a603ad99.zip frameworks_base-d01ec6eab019e46398975202e9e4a198a603ad99.tar.gz frameworks_base-d01ec6eab019e46398975202e9e4a198a603ad99.tar.bz2 |
Add setParameter/getParameter to MediaPlayer API.
for bug 1982947
Change-Id: If3f40e4f18cbba155af29944af38bdc627f8cd53
Diffstat (limited to 'media/libmedia/mediaplayer.cpp')
-rw-r--r-- | media/libmedia/mediaplayer.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp index 9daa80f..28e07ff 100644 --- a/media/libmedia/mediaplayer.cpp +++ b/media/libmedia/mediaplayer.cpp @@ -553,6 +553,28 @@ status_t MediaPlayer::attachAuxEffect(int effectId) return mPlayer->attachAuxEffect(effectId); } +status_t MediaPlayer::setParameter(int key, const Parcel& request) +{ + LOGV("MediaPlayer::setParameter(%d)", key); + Mutex::Autolock _l(mLock); + if (mPlayer != NULL) { + return mPlayer->setParameter(key, request); + } + LOGV("setParameter: no active player"); + return INVALID_OPERATION; +} + +status_t MediaPlayer::getParameter(int key, Parcel *reply) +{ + LOGV("MediaPlayer::getParameter(%d)", key); + Mutex::Autolock _l(mLock); + if (mPlayer != NULL) { + return mPlayer->getParameter(key, reply); + } + LOGV("getParameter: no active player"); + return INVALID_OPERATION; +} + void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) { LOGV("message received msg=%d, ext1=%d, ext2=%d", msg, ext1, ext2); |