summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoModule.java
Commit message (Collapse)AuthorAgeFilesLines
* Snap: Fix crash switching from back to front cam in video modeArne Coucheron2017-05-081-0/+1
| | | | | | | | | | | | | | | | | | | | E CAM_VideoModule: startPreview paused=false device=false params=false E CAM_VideoModule: java.lang.Throwable E CAM_VideoModule: at com.android.camera.VideoModule.startPreview(VideoModule.java:1324) E CAM_VideoModule: at com.android.camera.VideoModule.switchCamera(VideoModule.java:3067) E CAM_VideoModule: at com.android.camera.VideoModule.onCameraPickerClicked(VideoModule.java:3251) E CAM_VideoModule: at com.android.camera.VideoMenu$4.onClick(VideoMenu.java:504) E CAM_VideoModule: at android.view.View.performClick(View.java:5637) E CAM_VideoModule: at android.view.View$PerformClick.run(View.java:22433) E CAM_VideoModule: at android.os.Handler.handleCallback(Handler.java:751) E CAM_VideoModule: at android.os.Handler.dispatchMessage(Handler.java:95) E CAM_VideoModule: at android.os.Looper.loop(Looper.java:154) E CAM_VideoModule: at android.app.ActivityThread.main(ActivityThread.java:6186) E CAM_VideoModule: at java.lang.reflect.Method.invoke(Native Method) E CAM_VideoModule: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) E CAM_VideoModule: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779) Change-Id: I2005b09737fd4d739e1415a457b05d575da95582
* Snap: Replace noisy debug linestaging/cm-14.1-cafrebaseGabriele M2017-02-111-1/+1
| | | | | Change-Id: I378fc4d5fc102ec1c23995532114355b1dcdb3d6 (cherry picked from commit 75de9ea72239a662f5070be38d231a8602877d05)
* Snap: VideoModule: Restore check on mPreferenceReadGabriele M2017-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following crash when switching from picture mode to video mode for the first time: FATAL EXCEPTION: main Process: org.cyanogenmod.snap, PID: 4243 java.lang.NullPointerException: Attempt to read from field 'int android.media.CamcorderProfile.videoFrameWidth' on a null object reference at com.android.camera.VideoModule.updateCameraParametersInitialize(VideoModule.java:2778) at com.android.camera.VideoModule.setCameraParameters(VideoModule.java:2822) at com.android.camera.VideoModule.startPreview(VideoModule.java:1353) at com.android.camera.VideoModule.onPreviewUIReady(VideoModule.java:3260) at com.android.camera.VideoUI.surfaceCreated(VideoUI.java:956) at android.view.SurfaceView.updateWindow(SurfaceView.java:618) at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:161) at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2205) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6343) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874) at android.view.Choreographer.doCallbacks(Choreographer.java:686) at android.view.Choreographer.doFrame(Choreographer.java:621) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6126) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) Change-Id: I8f449aaa943636a9b3ce590425e8611def8df590 (cherry picked from commit 342b6177119011ecfa2a7f97fceb4027186944e1)
* Snap: VideoModule: Update flash status on preference changeGabriele M2017-02-111-0/+2
| | | | | | | | The flash preference was read only during initialization. Do it whenever the preferences change. Change-Id: I32c0d96f6c71dca98953a7bb29dbfa2f59ac4b07 (cherry picked from commit 84752f915ee31ee5f2426474eb58ee4e05874dc6)
* Snap: VideoModule: properly update focus settings when switching between camerasFlex19112017-02-111-0/+1
| | | | | Change-Id: I4c769bb4f080b8144b2571d218807bf197187a54 (cherry picked from commit 8613b0502046742d80cb9eee7cd5e9eea2ee356f)
* Snap: Fix zoom in video modeGabriele M2017-02-111-1/+1
| | | | | | | The zoom parameter was changed but never applied. Change-Id: Ibed445179835e7b6ed146058320ab5c2db0d8179 (cherry picked from commit 8c64fae391fff390bac978c6bd639434bc1b19a5)
* Correctly return to film strip after editing a picture.Danny Baumann2017-01-241-1/+3
| | | | | Change-Id: Icd4e47474f871d427d10ab2575e0d9622f1b4369 (cherry picked from commit e0a3c03cf912c6b437dd2bf96f486b88c699fb9c)
* Initialize focus manager in onResume().Danny Baumann2017-01-041-0/+1
| | | | | | | | | | | Since commit 87b4a40d588a7ae8a61cb353c4cff8df37f7b483 moved camera initialization (and focus manager initialization with it) to a background thread, the focus manager initialization now races against the onPreviewRectChanged() call triggered by SurfaceView initialization in the main thread, potentially leaving the focus manager in an uninitialized state that prevented taking pictures. Change-Id: I8cf650d6a67768acd131b3cddad175ed198e0838
* Grant read URI permission for playback of video captureAlan Newberger2017-01-041-0/+1
| | | | | | | | | | | Current implementation of video capture UI configured MediaRecorder to output directly into supplied URI, which per recommendation should be a content: URI. We pass this URI to another app to play back the video, and should pass along the read permission. Bug: 19675889 Change-Id: Idfc0ee42422dde5d921e81f098d4697e652ac689
* Remove unused menu indicators code.Danny Baumann2017-01-041-3/+0
| | | | Change-Id: I0ce48da277a532b46fdde15027f636de4d7585b7
* snap: Improve transitionsSteve Kondik2017-01-041-15/+4
| | | | | | | | * Synchronize animation to filmstrip with input * More code cleanups, introduce BaseModule * Animations are hard Change-Id: Ie664bb2059a28b3a9f3957fb491ec28fede521e5
* snap: Use new widgets for CaptureUISteve Kondik2017-01-041-7/+1
| | | | Change-Id: I1d142d60af3f51c71ce3711642d074faf7b456c2
* snap: UI checkpoint #2Steve Kondik2017-01-041-459/+473
| | | | | | | | | | * Fix bugs from previous commit * Factor out recording controls * Clean up layouts * Asynchronous control for video module * Performance improvements Change-Id: I9d5833cecbd9280845b740ee8a3c47f023470625
* snap: Use reveal animation when switching modesSteve Kondik2017-01-041-1/+3
| | | | Change-Id: I7a4b4fe2c29426b57020e3a5102d89b62d46c241
* snap: Better capture animationSteve Kondik2017-01-041-5/+2
| | | | | | | * Modified version from Camera2 * Also adjust the callbacks for better response Change-Id: I85ac23cdf35d9e2625799dd64b9f86aef103be7b
* snap: UX improvements v1Steve Kondik2017-01-041-8/+3
| | | | | | | | | | | | | * Make the camera controls do sane things- get rid of the manual placement of every widget and use layouts * Animate everything correctly * Show ripples when clicking the shutter * Clean up a metric ton of dead code * Moved more code into BaseUI * Make setting up the camera controls less verbose and magical * Fixed up panorama layout Change-Id: Iaed44ca0201a2e2641e1c2460d3ff9ec3eae2d85
* Reenable left swipe for FilmstripSteve Kondik2017-01-041-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * These commits are from the CameraNext application in COS. * Credits: Ed Carrigan, Ed Mancebo, Wilhelm Fitzpatrick Revert "SnapdragonCamera: Fix preview broken when coming back from gallery" This reverts commit 5b8948f83a65e8f9bd1b419bd11511e48dc34887. Revert "SnapdragonCamera: fix crash after photo deletion" This reverts commit 171d2b253a752ca104ccf4a58f4e9d6d82bd7b28. CameraNext: Fix camera crash on device unlock This patch from the plugin branch also fixes CYNGNOS-1878 Due to the bug below, when the camera is fore-grounded when device is unlocked, the SurfaceView is getting recreated, which caused it to be in a weird state when we were trying to reattach the preview to it. ----- Fixed Black Screen On Back. The issue was that mCameraView was not being populated when it should have been (after it had been added to the view hierarchy). The problem was the SurfaceView was being removed from the hierarchy when it shouldn't have been. Issue-Id: CP-129 (cherry picked from commit 4010462fe0b4cf1c15624cfca7d6a3d4d380613a) CameraNext: avoid scaling camera preview in filmstrip (cherry picked from commit 823ed983c4dccac3959635f1a14fcfe47cd7b120) CameraNext: fade camera preview to black during film strip transition Instead of scaling and translating the camera preview to make room for film strip images, we leave the preview in place and cover it gradually with the black preview cover. CameraNext : Add offset calculation for left navbar Also prevent preview from translating while hidden - was causing occasional glimpses of it in filmstrip. CameraNext : Ensure vertical/horizontal swipes don't conflict Ensure that the user can't swipe horizontally while trying to delete the image. Avoids all sorts of synching issues between mViewItem and the data adapter since the buffer is trying to constantly keep its center to be the current visible item CYNGNOS-1069 CameraNext: fix crash on entering filmstrip via thumbnail tap mVerticalViewId was getting initialized in onUp, but if filmstrip was entered without a swipe, no onUp occurred. Fixed by directly initializing the field on object creation. CameraNext: Fix ZoomView in the filmstrip The ZoomView was getting covered in the Z axis while scrolling. issue-id: SAMBAR-862 Revert "SnapdragonCamera: fix camera preview broken when resume from gallery" This reverts commit 0acc1f027637c4f0126883be68f97817d7306032. Change-Id: If4dd591c5c752a7fa33c669c15875c0077446a37
* Snap: Update comment to reflect audio focus changesMichael Bestas2017-01-041-4/+2
| | | | Change-Id: I60655aa3a42be218dac5062932692a49a596bedf
* Snap: Add support for focus distanceSteve Kondik2017-01-041-0/+16
| | | | | | * Hook up available metadata to the new focus manager. Change-Id: I793df67a2682d8bb2dee994193111227dd8c8d5a
* SnapdragonCamera: Scale up bitrate for HSR recordingsSultanxda2017-01-041-1/+2
| | | | | | | | | | Currently, bitrate is only scaled up for HFR (slow-mo) recordings, not HSR (full high-speed) recordings. Scale up the bitrate for HSR to prevent video-quality degradation. Change-Id: Icc009ad4b22d990cc6df6773d965579a7d9cb091 Signed-off-by: Sultanxda <sultanxda@gmail.com>
* Snap: Fix crash when set infinite touch-focus durationMichael Bestas2017-01-041-1/+1
| | | | | | | * java.lang.Integer.valueOf(string) method can't parse hexadecimal values Change-Id: I42706db72fc9c1093a7aa16440af449f731e5176
* Snap: Separate default focus time between camera/videoSultanxda2017-01-041-1/+1
| | | | | | | | | | | | | | For the camera, the user expects a default tap-to-focus duration of 3 seconds with exposure locking. For the camcorder, however, the user expects a tap-to-focus duration of 0 seconds with no exposure locking, as the rapid change in exposure while recording would negatively impact the video. Separate the tap-to-focus option to reflect the recommended defaults. [mikeioannina]: Adapted to Snap Change-Id: I75bc0610f5d301c9728b4bc104b86e0fab5493fb Signed-off-by: Sultanxda <sultanxda@gmail.com>
* Snap: Add focus time support in camcorderMichael Bestas2017-01-041-0/+5
| | | | Change-Id: I5432554a40d7375ed7893c38cb2741a12cc8cc80
* SnapdragonCamera: Lock AE and AWB for tap-to-focus in camcorderSultanxda2017-01-041-0/+20
| | | | | | | | Lock the auto exposure (AE) and auto white balance (AWB) when tap-to-focus is used in the camcorder. Change-Id: Ieb24e04b74a06b2390eb9302e74b4f69b1486951 Signed-off-by: Sultanxda <sultanxda@gmail.com>
* SnapdragonCamera: Add focus-mode option to camcorderSultanxda2017-01-041-2/+5
| | | | | | | User can now control the focus mode used while recording video. Change-Id: I340c01a3f88314de67ca024279672276eff453ed Signed-off-by: Sultanxda <sultanxda@gmail.com>
* Drop new focus indicator into Camera2.Paul Rohde2017-01-041-9/+1
| | | | | | | * Create a new custom focus view that interacts with physical lens diopter changes. * Replace all occurances of the old focus indicator with the new one. Change-Id: Ia02646ce4d1eb059ecb8a1dfccc15dfc9c167e1b
* Snap: Actually select the highest quality video by defaultChristopher R. Palmer2017-01-041-1/+1
| | | | | | | | | | | Prior to this commit Snap assumes that the HAL returns the list of supported video sizes in descending order of quality and simply picks the first one from the list as the default quality. Instead, find the first matching entry of pref_video_quality_entryvalues that the HAL indicated was supported. Change-Id: Ifea79e0e16a9015557539e098317536a32b9ff1f
* Snap: Fall back to default quality instead of 352x288Michael Bestas2017-01-041-9/+2
| | | | | | * Not all devices support this resolution Change-Id: I42d2037b4e32c7f5c88a60b5da1895dcb761d176
* Snap: Set parameters before starting previewlion07382017-01-041-6/+7
| | | | | | | Old parameters are used when grabbing focus mode. Camera parameters should be set to FocusOverlayManager before starting preview. Change-Id: I908559e1c2003be47b486996b0ec016b78107468
* SnapdragonCamera: fix screen flash on resumingLikai Ding2017-01-041-0/+7
| | | | | | | | | Currently preview cover will be hidden shortly after preview started, but if the actual first frame comes late, the main screen will flash. Register a oneshot preview callback to hide preview cover. Change-Id: I81fabf2d97c32fc2112cf4fceef4edd0872439e2 CRs-Fixed: 889021
* Snap: add fallback for invalid video qualitiescodeworkx2017-01-041-0/+7
| | | | | | Might happen when updating from previous versions of Snap Change-Id: Ib52a2daff5a45c33ede1effd7cb7bed2fe61e5cc
* Camera2: Prevent propogating CancelAutoFocus during Video RecordingDheeraj CVR2017-01-041-1/+0
| | | | | | | | | | When AutoFocus is started during Video Recording, CancelAutoFocus is called after KEY_FOCUS_TIME seconds. CancelAutoFocus has the side effect of resetting the sensor AF position and will result in instant loss of focus which is not a desired event when AF is manually triggered in case of Video Recording. Change-Id: Icee7f6dfd4ad083c9b383ee2a4df6a34e4668de6
* Camera2: Prevent autofocus when video snapshot is in progressDheeraj CVR2017-01-041-1/+1
| | | | | | | | | During video recording if screen is tapped repeatedly, autofocus is started while the snapshot is taken. This would either result in an out of focus snapshot which would also disturb the focus in the recorded video or crash the sensors that can't handle autofocus during snapshot. Change-Id: If2763094f5ab7536e4409469276de54580e803c8
* camera: Touch focus support for camcorderSteve Kondik2017-01-041-9/+135
| | | | | | | | | * Available when video snapshots are not supported. * Original from CodeAurora Forum. Sultanxda: Adapted to Snapdragon Camera Change-Id: I232c178430db08e7366aa9f91b4926d07e7c225d
* Camera2: Add option to set max screen brightnessMichael Bestas2017-01-041-0/+4
| | | | | | * Set maximum screen brightness while the user is inside the camera app Change-Id: I8b16ba47a933bc7d6b0c1cd62bfd6ca54875ce1e
* Camera2: Headset shutter modeDave Daynard2017-01-041-0/+6
| | | | | | | Use play button on headset to take a picture/video/panorama Use media next/previous for zoom Change-Id: I25c22646b041e5e0941fbe361eccfe77a2a1e42f
* Camera: Cleanup hardware key handlingMichael Bestas2017-01-041-9/+32
| | | | | | | | | | | | | | | | | * Fix power shutter behaviour in camcorder mode * Disable volume change while in panorama mode, volume buttons should only handle camera operations while in the camera * Add camera/power/volume key shutter handling in panorama mode On devices with a hardware camera key: * Disable power & volume shutter features * Volume buttons control the zoom On devices without a hardware camera key: * When power shutter is disabled, volume buttons control the shutter (like AOSP) * When power shutter is enabled, volume buttons control the zoom Change-Id: I141946d5b6f5aec8b1e9a9f99270d30295596079
* Camera: Powerkey shutter (2/2)Michael Bestas2017-01-041-0/+10
| | | | | | | | | | | | | | Ported from cm-10.1 Including cm-10.1 camera commit: aa4ae80a41fbab763891c5ef6d67a9e5b4bb981b Don't mess around with pref local ID for power shutter initialization. Includes http://review.cyanogenmod.org/56986 [mikeioannina]: Updates for L Signed-off-by: Michael Bestas <mikeioannina@gmail.com> Change-Id: I0992baa558eefd306d00fbece59cb5c512d9448b
* Camera2: implement volume key zoom in video modejt11342017-01-041-0/+9
| | | | Change-Id: I140e8cfb3e39700f60e40c35b38e92c83a3c26de
* Camera: separate settings for color effectsjt11342017-01-041-1/+1
| | | | | | | Store color effect settings for the camera and video camera in their own separate preferences. Change-Id: I8faa59b8663154737910b338906d27f9736d5ad9
* Camera2: implement exposure compensation settings in video modejt11342017-01-041-0/+23
| | | | Change-Id: I83a2675e109dc7924cdd9240b26051ac218f532a
* Camera2: Remove CAF video duration codeMichael Bestas2017-01-041-20/+1
| | | | Change-Id: I583e212f3c43a5ddf80fdb16557b3ddd9e3161c2
* camera: Cleanup and compatibility fixesSteve Kondik2017-01-041-1/+3
| | | | | | | * Don't crash for unavailable integer parameters * Kill logspam Change-Id: I6dbcf5560f96ce6173a847501721f589766889bc
* camera: Add parameter debugging supportSteve Kondik2017-01-041-0/+3
| | | | Change-Id: Ifc1653f0046af169ba36d94796b4d9a3055c6798
* Snapdragon Camera: Use consistent API for preview fps resetEmilian Peev2017-01-041-5/+3
| | | | | | | | | | Instead of using preview fps range API during preview framerate reset use the fixed fps API. This is to avoid any inconsistent behavior that can be triggered when using both APIs from MediaRecorder and Snapdragon application side. Change-Id: Ib5251d8ea4d697db9bdea4e5ebf20606b286f54f
* Camera: Set preview fps after recording.Suman Mukherjee2017-01-041-0/+12
| | | | | | | | 4k DCI recorded FPS is getting picked up from profile and not getting reset to preview FPS after stop recording. Fix made to set the preview FPS range after stop recording. Change-Id: I4892e6fcee3eefbcbd6ca9426e56e2303cdad844
* Merge "SnapdragonCamera: Fix camera flash blink after unlock device" into ↵Camera Software Integration2016-09-131-5/+16
|\ | | | | | | camera.lnx.1.0.c7-dev
| * SnapdragonCamera: Fix camera flash blink after unlock devicemingwax2016-09-041-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RootCause: when lock the screen and unlock the screen quickly,the system could show the last recent app when the lockscreen is not ready.when the lockscreen is ready now,system could dismiss the last recent app.When camera show,run onResume method,flash could be opened.And when camera run onPause method,flash could be closed,it caused flash blink. Add delay time avoid when camera be opened and closed quickly caused flash blink Change-Id: Id32eaf5186020edd1c835315efa9a2671db9f952 CRs-Fixed: 1034366
* | SnapdragonCamera:Fix Camera GTS failture issue.junjiez2016-08-311-0/+1
|/ | | | | | | | | | GTS test will fail if use permission activity to return the result, so set FLAG_ACTIVITY_FORWARD_RESULT flag for the intent and let CameraActivity return the result directly. And add URI read permission to the return intent Change-Id: I224789bbd430d977234d2bcbea4e38e957b81142 CRs-Fixed: 1059964
* SnapdragonCamera: Fix crash when switching between camera1, camera2Byunghun Jeon2016-08-161-1/+5
| | | | | | | | | | | | | Camera1 uses CameraHolder for opening/releasing camera and it does not release right away when closing camera. This is done to optimize opening/closing but since Camera2 does not use CameraHolder, state is not proper when switching between camera1 and camera2. So ignore the timer and release right away when going from camera1 to camera2. Change-Id: Ibc40297817ebfca04e19097bd463f78aec4d75cd CRs-Fixed: 1019338