larryaasen / uvc

A Dart package for controlling UVC compliant webcams.
https://pub.dev/packages/uvc
MIT License
3 stars 0 forks source link

Cannot start example #2

Open azlekov opened 1 month ago

azlekov commented 1 month ago

In a newly created project I have added the dependency and copy uvc_example.dart, but when I start it, it gives me:

Syncing files to device macOS...
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: uvc: libusb dynamic library not found: Invalid argument(s): Failed to load dynamic library '/Users/azlekov/Library/Containers/app.dodi.uvcPoc/Data/libusb-1.0.27/libusb-1.0.0.dylib': dlopen(/Users/azlekov/Library/Containers/app.dodi.uvcPoc/Data/libusb-1.0.27/libusb-1.0.0.dylib, 0x0001): tried: '/Users/azlekov/Library/Containers/app.dodi.uvcPoc/Data/libusb-1.0.27/libusb-1.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/azlekov/Library/Containers/app.dodi.uvcPoc/Data/libusb-1.0.27/libusb-1.0.0.dylib' (no such file), '/Users/azlekov/Library/Containers/app.dodi.uvcPoc/Data/libusb-1.0.27/libusb-1.0.0.dylib' (no such file)
#0      UvcLib._loadLibrary (package:uvc/src/uvc_lib.dart:127:7)
#1      new UvcLib (package:uvc/src/uvc_lib.dart:22:19)
#2      main (package:uvc_poc/main.dart:4:15)
#3      _runMain.<anonymous closure> (dart:ui/hooks.dart:301:23)
#4      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:297:19)
#5      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)

I'm using Mac Studio M1

What I'm doing wrong?

And a question, is there a way to capture image from UVC camera with this library?

larryaasen commented 1 month ago

Thanks for trying out uvc. It does not support image capture at this time.

As for the error, I am not sure why it cannot find the libusb library. I will have to investigate this more.