You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds lens type information. The goal is to identify whether the lens type is wide, ultra-wide, telephoto, etc., as discussed in flutter/flutter#119908. The iOS implementation is complete, so lens data will now be populated on iOS.
- Introduces a new CameraLensType enum to provide lens type information about the camera (e.g.: ultra-wide, telephoto, ...)
- Adds lensType in the PlatformCameraDescription and CameraDescription classes
- Implements utility functions to convert between PlatformCameraLensType and CameraLensType.
- Updates auto-generated code (using Pigeon) to reflect these changes.
**Current CameraDescription for iPhone 11**
```
[
CameraDescription(
com.apple.avfoundation.avcapturedevice.built-in_video:0,
CameraLensDirection.back,
90
),
CameraDescription(
com.apple.avfoundation.avcapturedevice.built-in_video:1,
CameraLensDirection.front,
90
),
CameraDescription(
com.apple.avfoundation.avcapturedevice.built-in_video:5,
CameraLensDirection.back,
90
)
]
```
**New CameraDescription for iPhone 11**
```
[
CameraDescription(
com.apple.avfoundation.avcapturedevice.built-in_video:0,
CameraLensDirection.back,
90,
CameraLensType.wide
),
CameraDescription(
com.apple.avfoundation.avcapturedevice.built-in_video:1,
CameraLensDirection.front,
90,
CameraLensType.wide
),
CameraDescription(
com.apple.avfoundation.avcapturedevice.built-in_video:5,
CameraLensDirection.back,
90,
CameraLensType.ultraWide
)
]
```
Fixesflutter/flutter#174390
Copy file name to clipboardExpand all lines: packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation/CameraPlugin.swift
Copy file name to clipboardExpand all lines: packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation_objc/FLTCaptureDevice.m
Copy file name to clipboardExpand all lines: packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation_objc/include/camera_avfoundation/FLTCaptureDevice.h
Copy file name to clipboardExpand all lines: packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation_objc/include/camera_avfoundation/messages.g.h
+22-2Lines changed: 22 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
// Copyright 2013 The Flutter Authors
2
2
// Use of this source code is governed by a BSD-style license that can be
3
3
// found in the LICENSE file.
4
-
// Autogenerated from Pigeon (v22.4.2), do not edit directly.
4
+
// Autogenerated from Pigeon (v22.7.4), do not edit directly.
0 commit comments