File tree Expand file tree Collapse file tree 4 files changed +32
-1
lines changed
packages/camera/camera_android_camerax Expand file tree Collapse file tree 4 files changed +32
-1
lines changed Original file line number Diff line number Diff line change 1+ ## 0.6.4+1
2+
3+ * Adds empty implementation for ` prepareForVideoRecording ` since this optimization is not used on Android.
4+
15## 0.6.4
26
37* Prevents usage of unsupported concurrent ` UseCase ` s based on the capabiliites of the camera device.
Original file line number Diff line number Diff line change @@ -867,6 +867,15 @@ class AndroidCameraCameraX extends CameraPlatform {
867867 }
868868 }
869869
870+ /// Prepare the capture session for video recording.
871+ ///
872+ /// This optimization is not used on Android, so this implementation is a
873+ /// no-op.
874+ @override
875+ Future <void > prepareForVideoRecording () {
876+ return Future <void >.value ();
877+ }
878+
870879 /// Configures and starts a video recording. Returns silently without doing
871880 /// anything if there is currently an active recording.
872881 ///
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: camera_android_camerax
22description : Android implementation of the camera plugin using the CameraX library.
33repository : https://github.com/flutter/packages/tree/main/packages/camera/camera_android_camerax
44issue_tracker : https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
5- version : 0.6.4
5+ version : 0.6.4+1
66
77environment :
88 sdk : ^3.1.0
Original file line number Diff line number Diff line change @@ -4040,4 +4040,22 @@ void main() {
40404040 verify (
40414041 camera.processCameraProvider! .unbind (< UseCase > [camera.imageAnalysis! ]));
40424042 });
4043+
4044+ test (
4045+ 'prepareForVideoRecording does not make any calls involving starting video recording' ,
4046+ () async {
4047+ final AndroidCameraCameraX camera = AndroidCameraCameraX ();
4048+
4049+ // Set directly for test versus calling createCamera.
4050+ camera.processCameraProvider = MockProcessCameraProvider ();
4051+ camera.recorder = MockRecorder ();
4052+ camera.videoCapture = MockVideoCapture ();
4053+ camera.camera = MockCamera ();
4054+
4055+ await camera.prepareForVideoRecording ();
4056+ verifyNoMoreInteractions (camera.processCameraProvider);
4057+ verifyNoMoreInteractions (camera.recorder);
4058+ verifyNoMoreInteractions (camera.videoCapture);
4059+ verifyNoMoreInteractions (camera.camera);
4060+ });
40434061}
You can’t perform that action at this time.
0 commit comments