diff --git a/pkg/avfoundation/AVFoundationBind/AVFoundationBind.h b/pkg/avfoundation/AVFoundationBind.h similarity index 100% rename from pkg/avfoundation/AVFoundationBind/AVFoundationBind.h rename to pkg/avfoundation/AVFoundationBind.h diff --git a/pkg/avfoundation/AVFoundationBind/AVFoundationBind.m b/pkg/avfoundation/AVFoundationBind.m similarity index 98% rename from pkg/avfoundation/AVFoundationBind/AVFoundationBind.m rename to pkg/avfoundation/AVFoundationBind.m index c317fe7..c4f9cd9 100644 --- a/pkg/avfoundation/AVFoundationBind/AVFoundationBind.m +++ b/pkg/avfoundation/AVFoundationBind.m @@ -30,12 +30,6 @@ #import "AVFoundationBind.h" #include -// AVFoundationBind.m is the entry point for cgo compilation (included by avfoundation_darwin.go). -// Including DeviceObserver.m here compiles both into a single compilation unit, -// making all symbols available to the linker. -#include "DeviceObserver.m" - - #define CHK(condition, status) \ do { \ if(!(condition)) { \ diff --git a/pkg/avfoundation/AVFoundationBind/DeviceObserver.h b/pkg/avfoundation/DeviceObserver.h similarity index 100% rename from pkg/avfoundation/AVFoundationBind/DeviceObserver.h rename to pkg/avfoundation/DeviceObserver.h diff --git a/pkg/avfoundation/AVFoundationBind/DeviceObserver.m b/pkg/avfoundation/DeviceObserver.m similarity index 100% rename from pkg/avfoundation/AVFoundationBind/DeviceObserver.m rename to pkg/avfoundation/DeviceObserver.m diff --git a/pkg/avfoundation/avfoundation_darwin.go b/pkg/avfoundation/avfoundation_darwin.go index c9c5155..8b34afc 100644 --- a/pkg/avfoundation/avfoundation_darwin.go +++ b/pkg/avfoundation/avfoundation_darwin.go @@ -3,8 +3,7 @@ package avfoundation // #cgo CFLAGS: -x objective-c // #cgo LDFLAGS: -framework AVFoundation -framework Foundation -framework CoreMedia -framework CoreVideo -// #include "AVFoundationBind/AVFoundationBind.h" -// #include "AVFoundationBind/AVFoundationBind.m" +// #include "AVFoundationBind.h" // extern void onData(void*, void*, int); // void onDataBridge(void *userData, void *buf, int len) { // onData(userData, buf, len); diff --git a/pkg/avfoundation/device_observer_darwin.go b/pkg/avfoundation/device_observer_darwin.go index 4f81a5d..81a5873 100644 --- a/pkg/avfoundation/device_observer_darwin.go +++ b/pkg/avfoundation/device_observer_darwin.go @@ -5,7 +5,7 @@ package avfoundation #cgo LDFLAGS: -framework AVFoundation -framework Foundation -framework CoreMedia -framework CoreVideo #include #include -#include "AVFoundationBind/DeviceObserver.h" +#include "DeviceObserver.h" extern void deviceEventBridge(void *userData, DeviceEventType eventType, DeviceInfo *device);