From 31dc911aee2b50752c0eb7785176075cdaed139c Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Thu, 4 Nov 2010 11:50:27 -0700 Subject: Support post-decode video rotation. Change-Id: Ia371316e73a57e44610de86adce3eaa560afbf84 --- include/media/IOMX.h | 9 ++++++--- include/media/stagefright/HardwareAPI.h | 8 ++++++++ include/media/stagefright/MetaData.h | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/media/IOMX.h b/include/media/IOMX.h index 2f61cbe..f794766 100644 --- a/include/media/IOMX.h +++ b/include/media/IOMX.h @@ -115,7 +115,8 @@ public: const char *componentName, OMX_COLOR_FORMATTYPE colorFormat, size_t encodedWidth, size_t encodedHeight, - size_t displayWidth, size_t displayHeight) = 0; + size_t displayWidth, size_t displayHeight, + int32_t rotationDegrees) = 0; // Note: These methods are _not_ virtual, it exists as a wrapper around // the virtual "createRenderer" method above facilitating extraction @@ -125,14 +126,16 @@ public: const char *componentName, OMX_COLOR_FORMATTYPE colorFormat, size_t encodedWidth, size_t encodedHeight, - size_t displayWidth, size_t displayHeight); + size_t displayWidth, size_t displayHeight, + int32_t rotationDegrees); sp createRendererFromJavaSurface( JNIEnv *env, jobject javaSurface, const char *componentName, OMX_COLOR_FORMATTYPE colorFormat, size_t encodedWidth, size_t encodedHeight, - size_t displayWidth, size_t displayHeight); + size_t displayWidth, size_t displayHeight, + int32_t rotationDegrees); }; struct omx_message { diff --git a/include/media/stagefright/HardwareAPI.h b/include/media/stagefright/HardwareAPI.h index 221c679..63f11d1 100644 --- a/include/media/stagefright/HardwareAPI.h +++ b/include/media/stagefright/HardwareAPI.h @@ -32,6 +32,14 @@ extern android::VideoRenderer *createRenderer( size_t displayWidth, size_t displayHeight, size_t decodedWidth, size_t decodedHeight); +extern android::VideoRenderer *createRendererWithRotation( + const android::sp &surface, + const char *componentName, + OMX_COLOR_FORMATTYPE colorFormat, + size_t displayWidth, size_t displayHeight, + size_t decodedWidth, size_t decodedHeight, + int32_t rotationDegrees); + extern android::OMXPluginBase *createOMXPlugin(); #endif // HARDWARE_API_H_ diff --git a/include/media/stagefright/MetaData.h b/include/media/stagefright/MetaData.h index cffcef2..29bfc4a 100644 --- a/include/media/stagefright/MetaData.h +++ b/include/media/stagefright/MetaData.h @@ -32,6 +32,7 @@ enum { kKeyMIMEType = 'mime', // cstring kKeyWidth = 'widt', // int32_t kKeyHeight = 'heig', // int32_t + kKeyRotation = 'rotA', // int32_t (angle in degrees) kKeyIFramesInterval = 'ifiv', // int32_t kKeyStride = 'strd', // int32_t kKeySliceHeight = 'slht', // int32_t -- cgit v1.1