Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/camera/camera_android_camerax/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.7.3

* Fixes `videoBitrate` configuration being ignored during video recording.

## 0.7.2+1

* Migrates to Built-in Kotlin to support AGP 9.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,10 @@ class AndroidCameraCameraX extends CameraPlatform {
);

// Configure VideoCapture and Recorder instances.
recorder = Recorder(qualitySelector: presetQualitySelector);
recorder = Recorder(
qualitySelector: presetQualitySelector,
targetVideoEncodingBitRate: mediaSettings?.videoBitrate,
);
videoCapture = VideoCapture.withOutput(videoOutput: recorder!, targetFpsRange: _targetFpsRange);

// Retrieve info required for correcting the rotation of the camera preview
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_android_camerax/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: camera_android_camerax
description: Android implementation of the camera plugin using the CameraX library.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android_camerax
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
version: 0.7.2+1
version: 0.7.3

environment:
sdk: ^3.12.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,10 @@ void main() {
}) {
return mockImageCapture;
};
int? recorderTargetVideoEncodingBitRate;
PigeonOverrides.recorder_new =
({int? aspectRatio, int? targetVideoEncodingBitRate, QualitySelector? qualitySelector}) {
recorderTargetVideoEncodingBitRate = targetVideoEncodingBitRate;
return mockRecorder;
};
PigeonOverrides.videoCapture_withOutput =
Expand Down Expand Up @@ -658,6 +660,7 @@ void main() {

// Verify the camera's Recorder and VideoCapture instances are instantiated properly.
expect(camera.recorder, equals(mockRecorder));
expect(recorderTargetVideoEncodingBitRate, equals(200000));
expect(camera.videoCapture, equals(mockVideoCapture));

// Verify the camera's Preview instance has its surface provider set.
Expand Down