forked from flutter/packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "[camera_windows] Revert: Support image streams on Windows pla…
…tform (flutter#7951)" This reverts commit b3a5e33.
- Loading branch information
Showing
13 changed files
with
604 additions
and
1 deletion.
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
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
Oops, something went wrong.