Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[camera] Export VideoCaptureOptions so that implementers can use it #6666

Merged
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_platform_interface/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.3.1

* Exports VideoCaptureOptions to allow dependencies to implement concurrent stream and record.

## 2.3.0

* Adds new capture method for a camera to allow concurrent streaming and recording.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import '../../camera_platform_interface.dart';
import '../method_channel/method_channel_camera.dart';
import '../types/video_capture_options.dart';

/// The interface that implementations of camera must implement.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ export 'flash_mode.dart';
export 'focus_mode.dart';
export 'image_format_group.dart';
export 'resolution_preset.dart';
export 'video_capture_options.dart';
2 changes: 1 addition & 1 deletion packages/camera/camera_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera_
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 2.3.0
version: 2.3.1

environment:
sdk: '>=2.12.0 <3.0.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,52 @@ void main() {
);
});
});

group('exports', () {
test('CameraDescription is exported', () {
const CameraDescription(
name: 'abc-123',
sensorOrientation: 1,
lensDirection: CameraLensDirection.external);
});

test('CameraException is exported', () {
CameraException('1', 'error');
});

test('CameraImageData is exported', () {
const CameraImageData(
width: 1,
height: 1,
format: CameraImageFormat(ImageFormatGroup.bgra8888, raw: 1),
planes: <CameraImagePlane>[],
);
});

test('ExposureMode is exported', () {
// ignore: unnecessary_statements
ExposureMode.auto;
});

test('FlashMode is exported', () {
// ignore: unnecessary_statements
FlashMode.auto;
});

test('FocusMode is exported', () {
// ignore: unnecessary_statements
FocusMode.auto;
});

test('ResolutionPreset is exported', () {
// ignore: unnecessary_statements
ResolutionPreset.high;
});

test('VideoCaptureOptions is exported', () {
const VideoCaptureOptions(123);
});
});
}

class ImplementsCameraPlatform implements CameraPlatform {
Expand Down