summaryrefslogtreecommitdiff
path: root/media/libmedia/mediaplayer.cpp
diff options
context:
space:
mode:
author Nicolas Catania <niko@google.com> 2009-07-09 09:21:33 -0700
committer Nicolas Catania <niko@google.com> 2009-07-10 11:00:42 -0700
commit5d55c7119820ee9bb06fc072e416fe98ba77cd28 (patch)
tree4f461a51f26fc221f4e9c7c660c6b6680ff072d7 /media/libmedia/mediaplayer.cpp
parent2eedb2515b733aaba0a92944def8156ef379e0da (diff)
Basic plumbing to retrieve metadata from the native player.
IMediaPlayer.h Added a getMetadata method that mirrors the on in MediaPlayer.java. MediaPlayer.java Added a native method to get the metadata from the native player. Parse the parcel into a Metadata object. Metadata.java Added a stub to parse the Parcel returned by the native player into a set of metadata. android_media_MediaPlayer.cpp JNI call to forward the getMetadata call. MediaPlayerService.cpp MediaPlayerService::Client implements the new getMetadata method added in IMediaPlayer.h
Diffstat (limited to 'media/libmedia/mediaplayer.cpp')
-rw-r--r--media/libmedia/mediaplayer.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp
index d8c622f3781f..6b35fa7d9515 100644
--- a/media/libmedia/mediaplayer.cpp
+++ b/media/libmedia/mediaplayer.cpp
@@ -211,14 +211,23 @@ status_t MediaPlayer::invoke(const Parcel& request, Parcel *reply)
status_t MediaPlayer::setMetadataFilter(const Parcel& filter)
{
LOGD("setMetadataFilter");
- Mutex::Autolock _l(mLock);
- if (mPlayer == NULL)
- {
+ Mutex::Autolock lock(mLock);
+ if (mPlayer == NULL) {
return NO_INIT;
}
return mPlayer->setMetadataFilter(filter);
}
+status_t MediaPlayer::getMetadata(bool update_only, bool apply_filter, Parcel *metadata)
+{
+ LOGD("getMetadata");
+ Mutex::Autolock lock(mLock);
+ if (mPlayer == NULL) {
+ return NO_INIT;
+ }
+ return mPlayer->getMetadata(update_only, apply_filter, metadata);
+}
+
status_t MediaPlayer::setVideoSurface(const sp<Surface>& surface)
{
LOGV("setVideoSurface");