diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/media/MediaPlayerInterface.h | 18 | ||||
| -rw-r--r-- | include/media/PVPlayer.h | 2 |
2 files changed, 18 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); } diff --git a/include/media/PVPlayer.h b/include/media/PVPlayer.h index d8a677f..40ccc14 100644 --- a/include/media/PVPlayer.h +++ b/include/media/PVPlayer.h @@ -53,6 +53,8 @@ public: virtual status_t setLooping(int loop); virtual player_type playerType() { return PV_PLAYER; } virtual status_t invoke(const Parcel& request, Parcel *reply); + virtual status_t getMetadata(const SortedVector<MetadataType>& ids, + Parcel *records); // make available to PlayerDriver void sendEvent(int msg, int ext1=0, int ext2=0) { MediaPlayerBase::sendEvent(msg, ext1, ext2); } |
