From 5778822d86b0337407514b9372562b86edfa91cd Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Tue, 21 Feb 2012 11:47:18 -0800 Subject: Implementation of a java media codec interface and associated tools. Change-Id: I13e54062d4de584355c5d82bb027a68aeaf2923b --- media/libstagefright/foundation/AMessage.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'media/libstagefright/foundation/AMessage.cpp') diff --git a/media/libstagefright/foundation/AMessage.cpp b/media/libstagefright/foundation/AMessage.cpp index 0a6776e..0d6e07b 100644 --- a/media/libstagefright/foundation/AMessage.cpp +++ b/media/libstagefright/foundation/AMessage.cpp @@ -542,4 +542,20 @@ void AMessage::writeToParcel(Parcel *parcel) const { } } +size_t AMessage::countEntries() const { + return mNumItems; +} + +const char *AMessage::getEntryNameAt(size_t index, Type *type) const { + if (index >= mNumItems) { + *type = kTypeInt32; + + return NULL; + } + + *type = mItems[index].mType; + + return mItems[index].mName; +} + } // namespace android -- cgit v1.1