-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[camera_windows] Support image streams on Windows platform (#7067)
Adds support to the windows camera implementation to allow streaming of frames. Fixes flutter/flutter#97542
- Loading branch information
1 parent
3d358d9
commit b31a279
Showing
15 changed files
with
609 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
## 0.2.5 | ||
|
||
* Adds support for streaming frames. | ||
|
||
## 0.2.4+1 | ||
|
||
* Updates to pigeon 21. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import 'dart:typed_data'; | ||
|
||
import 'package:camera_platform_interface/camera_platform_interface.dart'; | ||
|
||
/// Converts method channel call [data] for `receivedImageStreamData` to a | ||
/// [CameraImageData]. | ||
CameraImageData cameraImageFromPlatformData(Map<dynamic, dynamic> data) { | ||
return CameraImageData( | ||
format: const CameraImageFormat(ImageFormatGroup.bgra8888, raw: 0), | ||
height: data['height'] as int, | ||
width: data['width'] as int, | ||
lensAperture: data['lensAperture'] as double?, | ||
sensorExposureTime: data['sensorExposureTime'] as int?, | ||
sensorSensitivity: data['sensorSensitivity'] as double?, | ||
planes: <CameraImagePlane>[ | ||
CameraImagePlane( | ||
bytes: data['data'] as Uint8List, | ||
bytesPerRow: (data['width'] as int) * 4, | ||
) | ||
]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.