diff options
author | zhuw <zhuw@codeaurora.org> | 2018-06-13 15:08:58 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-06-13 00:11:06 -0700 |
commit | d8c97a077b705d87d2ea5a834023f26f045f7834 (patch) | |
tree | 8dc4de1d32c47ef2727552106540782a77a8ac9f /src/com/android/camera/imageprocessor/FrameProcessor.java | |
parent | 24a4a56411b7c0c1276db521a98c8169adacf767 (diff) | |
download | android_packages_apps_Snap-d8c97a077b705d87d2ea5a834023f26f045f7834.tar.gz android_packages_apps_Snap-d8c97a077b705d87d2ea5a834023f26f045f7834.tar.bz2 android_packages_apps_Snap-d8c97a077b705d87d2ea5a834023f26f045f7834.zip |
SDCamera: Fix thumbnail is black when filter enabled
start mediaRecorder after progressing image is available
Change-Id: If251d3b4a347852a70baf14cac2945b0c09e7cd8
Diffstat (limited to 'src/com/android/camera/imageprocessor/FrameProcessor.java')
-rwxr-xr-x | src/com/android/camera/imageprocessor/FrameProcessor.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/camera/imageprocessor/FrameProcessor.java b/src/com/android/camera/imageprocessor/FrameProcessor.java index 4eaf7f7ad..6397229f0 100755 --- a/src/com/android/camera/imageprocessor/FrameProcessor.java +++ b/src/com/android/camera/imageprocessor/FrameProcessor.java @@ -97,6 +97,7 @@ public class FrameProcessor { public static final int FILTER_DEEP_PORTRAIT = 3; private CaptureModule mModule; private boolean mIsVideoOn = false; + private boolean mIsFirstIn = true; private boolean mIsDeepPortrait = false; private DeepPortraitFilter mDeepPortraitFilter = null; @@ -377,6 +378,7 @@ public class FrameProcessor { } mVideoSurfaceAsItIs = surface; mIsVideoOn = true; + mIsFirstIn = true; if (mFinalFilters.size() != 0) { synchronized (mAllocationLock) { if (mVideoOutputAllocation == null) { @@ -463,6 +465,10 @@ public class FrameProcessor { bY.rewind(); bVU.rewind(); } + if (mIsFirstIn && mIsVideoOn && isFrameListnerEnabled()) { + mIsFirstIn = false; + mModule.startMediaRecording(); + } //End processing yvu buf if (needToFeedSurface) { bY.get(yvuBytes, 0, bY.remaining()); |