summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNicolas Catania <niko@google.com>2009-07-09 09:21:33 -0700
committerNicolas Catania <niko@google.com>2009-07-10 11:00:42 -0700
commit8e1b6cce24574b9ecd5b0300155776bd0b4ef756 (patch)
treeb0bc11d197c1f234a845a64c34b357d9b3120632 /include
parenta920ee99dc97b54b661d1238d8c26ac07c875bed (diff)
downloadframeworks_av-8e1b6cce24574b9ecd5b0300155776bd0b4ef756.zip
frameworks_av-8e1b6cce24574b9ecd5b0300155776bd0b4ef756.tar.gz
frameworks_av-8e1b6cce24574b9ecd5b0300155776bd0b4ef756.tar.bz2
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 'include')
-rw-r--r--include/media/IMediaPlayer.h17
-rw-r--r--include/media/mediaplayer.h1
2 files changed, 18 insertions, 0 deletions
diff --git a/include/media/IMediaPlayer.h b/include/media/IMediaPlayer.h
index 074125f..b6f654f 100644
--- a/include/media/IMediaPlayer.h
+++ b/include/media/IMediaPlayer.h
@@ -59,6 +59,23 @@ public:
// @param filter A set of allow and drop rules serialized in a Parcel.
// @return OK if the invocation was made successfully.
virtual status_t setMetadataFilter(const Parcel& filter) = 0;
+
+ // Retrieve a set of metadata.
+ // @param update_only Include only the metadata that have changed
+ // since the last invocation of getMetadata.
+ // The set is built using the unfiltered
+ // notifications the native player sent to the
+ // MediaPlayerService during that period of
+ // time. If false, all the metadatas are considered.
+ // @param apply_filter If true, once the metadata set has been built based
+ // on the value update_only, the current filter is
+ // applied.
+ // @param[out] metadata On exit contains a set (possibly empty) of metadata.
+ // Valid only if the call returned OK.
+ // @return OK if the invocation was made successfully.
+ virtual status_t getMetadata(bool update_only,
+ bool apply_filter,
+ Parcel *metadata) = 0;
};
// ----------------------------------------------------------------------------
diff --git a/include/media/mediaplayer.h b/include/media/mediaplayer.h
index 8326a21..26b054b 100644
--- a/include/media/mediaplayer.h
+++ b/include/media/mediaplayer.h
@@ -155,6 +155,7 @@ public:
static sp<IMemory> decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat);
status_t invoke(const Parcel& request, Parcel *reply);
status_t setMetadataFilter(const Parcel& filter);
+ status_t getMetadata(bool update_only, bool apply_filter, Parcel *metadata);
private:
void clear_l();
status_t seekTo_l(int msec);