Added native metadata support.
Metadata.java:
Fixed typo 8k != 8092. The comment was correct though.
In Metadata.h, the new Metadata class is declared in the ns android::media
to limit the chances of conflict with other packages.
The MetadataType in MediaPlayerInterface is gone and moved to Metadata as
an inner typedef.
Similarly the SortedVector<MetadataType> instance have been replace by a
new type Metadata::Filter.
All the keys declared in the java counterpart are also in Metadata.h.
Metadata.cpp:
Contains the implementation of the native metadata packing.
There an associated change in the opencore package that should go in
at the same time as this one.
diff --git a/include/media/MediaPlayerInterface.h b/include/media/MediaPlayerInterface.h
index 97d55aa..f723cfd 100644
--- a/include/media/MediaPlayerInterface.h
+++ b/include/media/MediaPlayerInterface.h
@@ -26,11 +26,10 @@
#include <media/mediaplayer.h>
#include <media/AudioSystem.h>
+#include <media/Metadata.h>
namespace android {
-typedef int32_t MetadataType;
-
class Parcel;
template<typename T> class SortedVector;
@@ -129,8 +128,10 @@
// 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;
+ virtual status_t getMetadata(const media::Metadata::Filter& ids,
+ Parcel *records) {
+ return INVALID_OPERATION;
+ };
protected:
virtual void sendEvent(int msg, int ext1=0, int ext2=0) { if (mNotify) mNotify(mCookie, msg, ext1, ext2); }