diff options
author | Marco Nelissen <marcone@google.com> | 2014-05-07 23:02:56 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-05-07 23:02:56 +0000 |
commit | 36dae0a9ce8a1f2c7106aaf63b6d6c92300bfc8b (patch) | |
tree | d57abc3f90c22e65e20eaf3e2acb9ed836e78ded /include | |
parent | 0dd3c9cb0ed66888c224a97d817701df6c3b2655 (diff) | |
parent | 34d497283c66b5ef0f8855c007eaa20d7ac8b96d (diff) | |
download | frameworks_av-36dae0a9ce8a1f2c7106aaf63b6d6c92300bfc8b.zip frameworks_av-36dae0a9ce8a1f2c7106aaf63b6d6c92300bfc8b.tar.gz frameworks_av-36dae0a9ce8a1f2c7106aaf63b6d6c92300bfc8b.tar.bz2 |
Merge "Expand AMediaFormat"
Diffstat (limited to 'include')
-rw-r--r-- | include/ndk/NdkMediaFormat.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/include/ndk/NdkMediaFormat.h b/include/ndk/NdkMediaFormat.h index 4489b78..e0caeab 100644 --- a/include/ndk/NdkMediaFormat.h +++ b/include/ndk/NdkMediaFormat.h @@ -48,14 +48,32 @@ const char* AMediaFormat_toString(AMediaFormat*); bool AMediaFormat_getInt32(AMediaFormat*, const char *name, int32_t *out); bool AMediaFormat_getInt64(AMediaFormat*, const char *name, int64_t *out); bool AMediaFormat_getFloat(AMediaFormat*, const char *name, float *out); -bool AMediaFormat_getDouble(AMediaFormat*, const char *name, double *out); -bool AMediaFormat_getSize(AMediaFormat*, const char *name, size_t *out); +/** + * The returned data is owned by the format and remains valid as long as the named entry + * is part of the format. + */ +bool AMediaFormat_getBuffer(AMediaFormat*, const char *name, void** data, size_t *size); /** * The returned string is owned by the format, and remains valid until the next call to getString, * or until the format is deleted. */ bool AMediaFormat_getString(AMediaFormat*, const char *name, const char **out); + +void AMediaFormat_setInt32(AMediaFormat*, const char* name, int32_t value); +void AMediaFormat_setInt64(AMediaFormat*, const char* name, int64_t value); +void AMediaFormat_setFloat(AMediaFormat*, const char* name, float value); +/** + * The provided string is copied into the format. + */ +void AMediaFormat_setString(AMediaFormat*, const char* name, const char* value); +/** + * The provided data is copied into the format. + */ +void AMediaFormat_setBuffer(AMediaFormat*, const char* name, void* data, size_t size); + + + /** * XXX should these be ints/enums that we look up in a table as needed? */ |