diff options
author | StefanEkenberg <stefan.ekenberg@linaro.org> | 2011-12-11 23:42:20 +0100 |
---|---|---|
committer | Zach Pfeffer <zach.pfeffer@linaro.org> | 2011-12-14 16:19:15 -0600 |
commit | ea532f064e7ad949d0e31a83911bebc0ef7ab701 (patch) | |
tree | 619496f1c330043b0f1f922da060e8037cc310fc | |
parent | 3473d372b105d0749cd62abfbcc6e08fcb57f3a3 (diff) | |
download | base-ea532f064e7ad949d0e31a83911bebc0ef7ab701.tar.gz |
Stagefright: Provide crop info to native window
Moves the execution of native_window_set_crop() to after the execution
of native_window_set_buffers_geometry(). This is done since otherwise
the cropping information will be cleared by the call to
native_window_set_buffers_geometry() in when it arrives in
SurfaceTextureClient::setBuffersDimension().
Change-Id: I0e9ac4d2d65f82f6138b9e8773b0740da1e951bd
Signed-off-by: StefanEkenberg <stefan.ekenberg@linaro.org>
-rwxr-xr-x | media/libstagefright/OMXCodec.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index 4e7602f826ef..8a418778aa58 100755 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -1815,6 +1815,10 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() { return err; } + if (mNativeWindow != NULL) { + initNativeWindowCrop(); + } + err = applyRotation(); if (err != OK) { return err; @@ -2042,6 +2046,8 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { goto error; } + initNativeWindowCrop(); + err = native_window_set_usage(mNativeWindow.get(), GRALLOC_USAGE_SW_WRITE_OFTEN); if (err != NO_ERROR) { @@ -4560,10 +4566,6 @@ void OMXCodec::initOutputFormat(const sp<MetaData> &inputFormat) { video_def->nFrameWidth - 1, video_def->nFrameHeight - 1); } - - if (mNativeWindow != NULL) { - initNativeWindowCrop(); - } } break; } |