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
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp
index 3adbfac..04aab81 100644
--- a/media/libmediaplayerservice/MediaPlayerService.cpp
+++ b/media/libmediaplayerservice/MediaPlayerService.cpp
@@ -846,6 +846,16 @@
return status;
}
+status_t MediaPlayerService::Client::getMetadata(bool update_only, bool apply_filter, Parcel *metadata)
+{
+ status_t status;
+ metadata->writeInt32(-1); // Placeholder for the return code
+
+ // FIXME: Implement, query the native player and do the optional filtering, etc...
+ status = OK;
+ return status;
+}
+
status_t MediaPlayerService::Client::prepareAsync()
{
LOGV("[%d] prepareAsync", mConnId);