Loading media/libmedia/IMediaMetadataRetriever.cpp +16 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <binder/Parcel.h> #include <media/IMediaMetadataRetriever.h> #include <utils/String8.h> #include <utils/KeyedVector.h> // The binder is supposed to propagate the scheduler group across // the binder interface so that remote calls are executed with Loading Loading @@ -161,8 +162,22 @@ public: if (ret != NO_ERROR) { return NULL; } return reply.readCString(); const char* str = reply.readCString(); if (str != NULL) { String8 value(str); if (mMetadata.indexOfKey(keyCode) < 0) { mMetadata.add(keyCode, value); } else { mMetadata.replaceValueFor(keyCode, value); } return mMetadata.valueFor(keyCode).string(); } else { return NULL; } } private: KeyedVector<int, String8> mMetadata; }; IMPLEMENT_META_INTERFACE(MediaMetadataRetriever, "android.media.IMediaMetadataRetriever"); Loading Loading
media/libmedia/IMediaMetadataRetriever.cpp +16 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <binder/Parcel.h> #include <media/IMediaMetadataRetriever.h> #include <utils/String8.h> #include <utils/KeyedVector.h> // The binder is supposed to propagate the scheduler group across // the binder interface so that remote calls are executed with Loading Loading @@ -161,8 +162,22 @@ public: if (ret != NO_ERROR) { return NULL; } return reply.readCString(); const char* str = reply.readCString(); if (str != NULL) { String8 value(str); if (mMetadata.indexOfKey(keyCode) < 0) { mMetadata.add(keyCode, value); } else { mMetadata.replaceValueFor(keyCode, value); } return mMetadata.valueFor(keyCode).string(); } else { return NULL; } } private: KeyedVector<int, String8> mMetadata; }; IMPLEMENT_META_INTERFACE(MediaMetadataRetriever, "android.media.IMediaMetadataRetriever"); Loading