summaryrefslogtreecommitdiffstats
path: root/include/media/MediaPlayerInterface.h
diff options
context:
space:
mode:
authorniko <niko@google.com>2009-07-16 16:39:53 -0700
committerniko <niko@google.com>2009-07-17 11:31:11 -0700
commitd608a813a9d2cbc6e2a5ea81d78d4a9044090c4c (patch)
treec6661ade3ceeacfd804236265d2bdc6a9f65cff7 /include/media/MediaPlayerInterface.h
parent919f7387f2eafc36223a5cd599fb46871f801b10 (diff)
downloadframeworks_av-d608a813a9d2cbc6e2a5ea81d78d4a9044090c4c.zip
frameworks_av-d608a813a9d2cbc6e2a5ea81d78d4a9044090c4c.tar.gz
frameworks_av-d608a813a9d2cbc6e2a5ea81d78d4a9044090c4c.tar.bz2
Added method to get metadata out of the player.
The method passes a list of metadata ids to be retrieved and a parcel where the metadata records should be appended. If the list of ids is empty, all the metadata should be returned.
Diffstat (limited to 'include/media/MediaPlayerInterface.h')
-rw-r--r--include/media/MediaPlayerInterface.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/media/MediaPlayerInterface.h b/include/media/MediaPlayerInterface.h
index 9102b40..97d55aa 100644
--- a/include/media/MediaPlayerInterface.h
+++ b/include/media/MediaPlayerInterface.h
@@ -29,7 +29,10 @@
namespace android {
+typedef int32_t MetadataType;
+
class Parcel;
+template<typename T> class SortedVector;
enum player_type {
PV_PLAYER = 1,
@@ -112,12 +115,23 @@ public:
mCookie = cookie; mNotify = notifyFunc; }
// Invoke a generic method on the player by using opaque parcels
// for the request and reply.
+ //
// @param request Parcel that is positioned at the start of the
// data sent by the java layer.
// @param[out] reply Parcel to hold the reply data. Cannot be null.
- // @return OK if the invocation was made successfully. A player
- // not supporting the direct API should return INVALID_OPERATION.
+ // @return OK if the call was successful.
virtual status_t invoke(const Parcel& request, Parcel *reply) = 0;
+
+ // The Client in the MetadataPlayerService calls this method on
+ // the native player to retrieve all or a subset of metadata.
+ //
+ // @param ids SortedList of metadata ID to be fetch. If empty, all
+ // the known metadata should be returned.
+ // @param[inout] records Parcel where the player appends its metadata.
+ // @return OK if the call was successful.
+ virtual status_t getMetadata(const SortedVector<MetadataType>& ids,
+ Parcel *records) = 0;
+
protected:
virtual void sendEvent(int msg, int ext1=0, int ext2=0) { if (mNotify) mNotify(mCookie, msg, ext1, ext2); }