diff --git a/packages/camera/CHANGELOG.md b/packages/camera/CHANGELOG.md index 30c14fa..56cecdf 100644 --- a/packages/camera/CHANGELOG.md +++ b/packages/camera/CHANGELOG.md @@ -1,2 +1,6 @@ +## 0.2.0 +* Fix wrong orientation issue. +* Change the camera type from back to external. + ## 0.1.0 * First draft version. diff --git a/packages/camera/README.md b/packages/camera/README.md index d29d66c..2072a75 100644 --- a/packages/camera/README.md +++ b/packages/camera/README.md @@ -9,7 +9,7 @@ This plugin uses [GStreamer](https://gstreamer.freedesktop.org/) internally. ```Shell $ sudo apt install libgstreamer1.0-dev # 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-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav ``` diff --git a/packages/camera/elinux/camera_elinux_plugin.cc b/packages/camera/elinux/camera_elinux_plugin.cc index 95b751c..992efac 100644 --- a/packages/camera/elinux/camera_elinux_plugin.cc +++ b/packages/camera/elinux/camera_elinux_plugin.cc @@ -208,7 +208,7 @@ void CameraPlugin::HandleAvailableCamerasCall( AvailableCamerasMessage camera; camera.SetName("camera" + std::to_string(i)); camera.SetSensorOrientation(0); - camera.SetLensFacing("back"); + camera.SetLensFacing("external"); cameras.push_back(camera.ToMap()); } diff --git a/packages/camera/elinux/channels/method_channel_device.cc b/packages/camera/elinux/channels/method_channel_device.cc index be12694..3e85557 100644 --- a/packages/camera/elinux/channels/method_channel_device.cc +++ b/packages/camera/elinux/channels/method_channel_device.cc @@ -9,7 +9,7 @@ namespace { constexpr char kChannelName[] = "flutter.io/cameraPlugin/device"; -constexpr char kChannelMethodInitialized[] = "initialized"; +constexpr char kChannelMethodOrientationChanged[] = "orientation_changed"; constexpr char kOrientation[] = "orientation"; }; // namespace @@ -27,7 +27,7 @@ void MethodChannelDevice::SendDeviceOrientationChangeEvent( flutter::EncodableValue(SerializeDeviceOrientation(orientation)); auto value = std::make_unique(mp); - Send(kChannelMethodInitialized, std::move(value)); + Send(kChannelMethodOrientationChanged, std::move(value)); } void MethodChannelDevice::Send( diff --git a/packages/camera/pubspec.yaml b/packages/camera/pubspec.yaml index 404a5a2..a526d5e 100644 --- a/packages/camera/pubspec.yaml +++ b/packages/camera/pubspec.yaml @@ -2,7 +2,7 @@ name: camera_elinux description: A Flutter plugin for getting information about and controlling the camera on eLinux. Supports previewing the camera feed, capturing images, capturing video, and streaming image buffers to dart. -version: 0.1.0 +version: 0.2.0 homepage: https://github.com/sony/flutter-elinux-plugins repository: https://github.com/sony/flutter-elinux-plugins/tree/main/packages/camera