diff options
author | Dima Zavin <dima@android.com> | 2013-07-18 11:43:39 -0700 |
---|---|---|
committer | Dima Zavin <dima@android.com> | 2013-07-18 11:43:39 -0700 |
commit | 87eb285dca94b20dc5f0ff8e60a0d395a4ca3be9 (patch) | |
tree | 6a975fda24cf0b051ce4c856e49570cbe0c8ab7e /media/libstagefright/ACodec.cpp | |
parent | ee5e8d3e8dc61f8fb1fa725278d63802074c10c5 (diff) | |
download | frameworks_av-87eb285dca94b20dc5f0ff8e60a0d395a4ca3be9.zip frameworks_av-87eb285dca94b20dc5f0ff8e60a0d395a4ca3be9.tar.gz frameworks_av-87eb285dca94b20dc5f0ff8e60a0d395a4ca3be9.tar.bz2 |
stagefright: set scaling mode for blank frames in ACodec
Analogous to 1d5ac80d0c6d3deabcc9e9b4abc9e3ef536aeb27
(by jgennis), this sets the scaling mode for the ANativeWindow
to SCALE_TO_WINDOW prior to pushing the blank frames during
decoder tear down.
Without this, the window defaults to FREEZE and SF ignores the
new frames.
Bug: 9516405
Change-Id: I39ef30922d733034bf01100d7ff24ac9c0c33b7d
Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'media/libstagefright/ACodec.cpp')
-rw-r--r-- | media/libstagefright/ACodec.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index 6bc7718..9b24d44 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -2630,6 +2630,14 @@ status_t ACodec::pushBlankBuffersToNativeWindow() { goto error; } + err = native_window_set_scaling_mode(mNativeWindow.get(), + NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW); + if (err != NO_ERROR) { + ALOGE("error pushing blank_frames: set_scaling_mode failed: %s (%d)", + strerror(-err), -err); + goto error; + } + err = native_window_set_usage(mNativeWindow.get(), GRALLOC_USAGE_SW_WRITE_OFTEN); if (err != NO_ERROR) { |