summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/Utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/Utils.cpp')
-rw-r--r--media/libstagefright/Utils.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/media/libstagefright/Utils.cpp b/media/libstagefright/Utils.cpp
index 8506e37..dfe8ad1 100644
--- a/media/libstagefright/Utils.cpp
+++ b/media/libstagefright/Utils.cpp
@@ -166,6 +166,16 @@ status_t convertMetaDataToMessage(
msg->setInt32("max-input-size", maxInputSize);
}
+ int32_t maxWidth;
+ if (meta->findInt32(kKeyMaxWidth, &maxWidth)) {
+ msg->setInt32("max-width", maxWidth);
+ }
+
+ int32_t maxHeight;
+ if (meta->findInt32(kKeyMaxHeight, &maxHeight)) {
+ msg->setInt32("max-height", maxHeight);
+ }
+
int32_t rotationDegrees;
if (meta->findInt32(kKeyRotation, &rotationDegrees)) {
msg->setInt32("rotation-degrees", rotationDegrees);
@@ -568,6 +578,16 @@ void convertMessageToMetaData(const sp<AMessage> &msg, sp<MetaData> &meta) {
meta->setInt32(kKeyMaxInputSize, maxInputSize);
}
+ int32_t maxWidth;
+ if (msg->findInt32("max-width", &maxWidth)) {
+ meta->setInt32(kKeyMaxWidth, maxWidth);
+ }
+
+ int32_t maxHeight;
+ if (msg->findInt32("max-height", &maxHeight)) {
+ meta->setInt32(kKeyMaxHeight, maxHeight);
+ }
+
// reassemble the csd data into its original form
sp<ABuffer> csd0;
if (msg->findBuffer("csd-0", &csd0)) {