Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.10.10

* Adds API support query for image streaming.

## 0.10.9+17

* Updates annotations lib to 1.9.1.
Expand Down
3 changes: 3 additions & 0 deletions packages/camera/camera_android/lib/src/android_camera.dart
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ class AndroidCamera extends CameraPlatform {
Future<void> resumeVideoRecording(int cameraId) =>
_hostApi.resumeVideoRecording();

@override
bool supportsImageStreaming() => true;

@override
Stream<CameraImageData> onStreamedFrameAvailable(int cameraId,
{CameraImageStreamOptions? options}) {
Expand Down
4 changes: 2 additions & 2 deletions packages/camera/camera_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Android implementation of the camera plugin.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22

version: 0.10.9+17
version: 0.10.10

environment:
sdk: ^3.5.0
Expand All @@ -19,7 +19,7 @@ flutter:
dartPluginClass: AndroidCamera

dependencies:
camera_platform_interface: ^2.6.0
camera_platform_interface: ^2.9.0
flutter:
sdk: flutter
flutter_plugin_android_lifecycle: ^2.0.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,10 @@ void main() {
verify(mockCameraApi.resumePreview()).called(1);
});

test('Should report support for image streaming', () async {
expect(camera.supportsImageStreaming(), true);
});

test('Should start streaming', () async {
// Arrange
// Act
Expand Down
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.6.13

* Adds API support query for image streaming.

## 0.6.12

* Suppresses deprecation and removal warnings for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,9 @@ class AndroidCameraCameraX extends CameraPlatform {
}
}

@override
bool supportsImageStreaming() => true;

/// A new streamed frame is available.
///
/// Listening to this stream will start streaming, and canceling will stop.
Expand Down
4 changes: 2 additions & 2 deletions 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.6.12
version: 0.6.13

environment:
sdk: ^3.6.0
Expand All @@ -19,7 +19,7 @@ flutter:

dependencies:
async: ^2.5.0
camera_platform_interface: ^2.6.0
camera_platform_interface: ^2.9.0
flutter:
sdk: flutter
meta: ^1.7.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2165,6 +2165,11 @@ void main() {
verify(mockCameraControl.setZoomRatio(zoomRatio));
});

test('Should report support for image streaming', () async {
final AndroidCameraCameraX camera = AndroidCameraCameraX();
expect(camera.supportsImageStreaming(), true);
});

test(
'onStreamedFrameAvailable emits CameraImageData when picked up from CameraImageData stream controller',
() async {
Expand Down
4 changes: 4 additions & 0 deletions packages/camera/camera_avfoundation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.9.18

* Adds API support query for image streaming.

## 0.9.17+6

* Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ class AVFoundationCamera extends CameraPlatform {
await _hostApi.resumeVideoRecording();
}

@override
bool supportsImageStreaming() => true;

@override
Stream<CameraImageData> onStreamedFrameAvailable(int cameraId,
{CameraImageStreamOptions? options}) {
Expand Down
4 changes: 2 additions & 2 deletions packages/camera/camera_avfoundation/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: camera_avfoundation
description: iOS implementation of the camera plugin.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_avfoundation
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
version: 0.9.17+6
version: 0.9.18

environment:
sdk: ^3.4.0
Expand All @@ -17,7 +17,7 @@ flutter:
dartPluginClass: AVFoundationCamera

dependencies:
camera_platform_interface: ^2.7.0
camera_platform_interface: ^2.9.0
flutter:
sdk: flutter
stream_transform: ^2.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,10 @@ void main() {
verify(mockApi.resumePreview());
});

test('Should report support for image streaming', () async {
expect(camera.supportsImageStreaming(), true);
});

test('Should start streaming', () async {
final StreamSubscription<CameraImageData> subscription = camera
.onStreamedFrameAvailable(cameraId)
Expand Down
Loading