File tree 4 files changed +32
-1
lines changed
packages/camera/camera_android_camerax
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
+
1
5
## 0.6.4
2
6
3
7
* 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 {
867
867
}
868
868
}
869
869
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
+
870
879
/// Configures and starts a video recording. Returns silently without doing
871
880
/// anything if there is currently an active recording.
872
881
///
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: camera_android_camerax
2
2
description : Android implementation of the camera plugin using the CameraX library.
3
3
repository : https://github.com/flutter/packages/tree/main/packages/camera/camera_android_camerax
4
4
issue_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
6
6
7
7
environment :
8
8
sdk : ^3.1.0
Original file line number Diff line number Diff line change @@ -4040,4 +4040,22 @@ void main() {
4040
4040
verify (
4041
4041
camera.processCameraProvider! .unbind (< UseCase > [camera.imageAnalysis! ]));
4042
4042
});
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
+ });
4043
4061
}
You can’t perform that action at this time.
0 commit comments