[camera] Fix wrong orientation (#36)
* Fixed the bug. See: #6 (comment) * Also, I changed the camera type from back-camera to external-camera.
This commit is contained in:
@@ -1,2 +1,6 @@
|
|||||||
|
## 0.2.0
|
||||||
|
* Fix wrong orientation issue.
|
||||||
|
* Change the camera type from back to external.
|
||||||
|
|
||||||
## 0.1.0
|
## 0.1.0
|
||||||
* First draft version.
|
* First draft version.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ This plugin uses [GStreamer](https://gstreamer.freedesktop.org/) internally.
|
|||||||
```Shell
|
```Shell
|
||||||
$ sudo apt install libgstreamer1.0-dev
|
$ sudo apt install libgstreamer1.0-dev
|
||||||
# Install as needed.
|
# Install as needed.
|
||||||
$ sudo apt libgstreamer-plugins-base1.0-dev \
|
$ sudo apt install libgstreamer-plugins-base1.0-dev \
|
||||||
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
|
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
|
||||||
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav
|
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ void CameraPlugin::HandleAvailableCamerasCall(
|
|||||||
AvailableCamerasMessage camera;
|
AvailableCamerasMessage camera;
|
||||||
camera.SetName("camera" + std::to_string(i));
|
camera.SetName("camera" + std::to_string(i));
|
||||||
camera.SetSensorOrientation(0);
|
camera.SetSensorOrientation(0);
|
||||||
camera.SetLensFacing("back");
|
camera.SetLensFacing("external");
|
||||||
cameras.push_back(camera.ToMap());
|
cameras.push_back(camera.ToMap());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
constexpr char kChannelName[] = "flutter.io/cameraPlugin/device";
|
constexpr char kChannelName[] = "flutter.io/cameraPlugin/device";
|
||||||
constexpr char kChannelMethodInitialized[] = "initialized";
|
constexpr char kChannelMethodOrientationChanged[] = "orientation_changed";
|
||||||
|
|
||||||
constexpr char kOrientation[] = "orientation";
|
constexpr char kOrientation[] = "orientation";
|
||||||
}; // namespace
|
}; // namespace
|
||||||
@@ -27,7 +27,7 @@ void MethodChannelDevice::SendDeviceOrientationChangeEvent(
|
|||||||
flutter::EncodableValue(SerializeDeviceOrientation(orientation));
|
flutter::EncodableValue(SerializeDeviceOrientation(orientation));
|
||||||
auto value = std::make_unique<flutter::EncodableValue>(mp);
|
auto value = std::make_unique<flutter::EncodableValue>(mp);
|
||||||
|
|
||||||
Send(kChannelMethodInitialized, std::move(value));
|
Send(kChannelMethodOrientationChanged, std::move(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MethodChannelDevice::Send(
|
void MethodChannelDevice::Send(
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ name: camera_elinux
|
|||||||
description: A Flutter plugin for getting information about and controlling the
|
description: A Flutter plugin for getting information about and controlling the
|
||||||
camera on eLinux. Supports previewing the camera feed, capturing images, capturing video,
|
camera on eLinux. Supports previewing the camera feed, capturing images, capturing video,
|
||||||
and streaming image buffers to dart.
|
and streaming image buffers to dart.
|
||||||
version: 0.1.0
|
version: 0.2.0
|
||||||
homepage: https://github.com/sony/flutter-elinux-plugins
|
homepage: https://github.com/sony/flutter-elinux-plugins
|
||||||
repository: https://github.com/sony/flutter-elinux-plugins/tree/main/packages/camera
|
repository: https://github.com/sony/flutter-elinux-plugins/tree/main/packages/camera
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user