riccardo-lomazzi / camera_macos

Flutter stub plugin for camera implementation for macOS
MIT License
11 stars 8 forks source link

Bug Fixes and Future developments #9

Closed Knightro63 closed 9 months ago

Knightro63 commented 10 months ago

There was a bug in the imagestream that did not output argb8888 data if the resolution was not max.

Added the ability to change the orientation of the camera. This feature is only available for macOS < 14.0 and swift < 5.8.1.

Added the ability to turn on and off a light if the camera has one.

Added the ability to change audio quality and codec.

setFocusPoint no longer requires an id. It looks at the current camera being used. Since it was so new I did not add a deprecated version of this.

Edited example file with new updates.

riccardo-lomazzi commented 9 months ago

Thank you so much for the input. I've corrected a few typos and published the update.

Currently, it seems that macOS doesn't support real time zooming on a AVCaptureDevice, so let's just not implement it for the time being.

Knightro63 commented 9 months ago

I ran the new pub.dev version, but did not work on my older macos due to:

  if #available(macOS 14.0, *), connection.isVideoRotationAngleSupported(self.orientation){
      connection.videoRotationAngle = self.orientation
  }

This will need to be added to let older versions of xcode to run the updated version.

#if compiler(<5.8.1)
  if #available(macOS 14.0, *), connection.isVideoRotationAngleSupported(self.orientation){
      connection.videoRotationAngle = self.orientation
  }
 #endif