From 09fe4a9a6e2006ca6c62669abea531fbea377ebe Mon Sep 17 00:00:00 2001 From: David von Wrangel <49842806+wrangelvid@users.noreply.github.com> Date: Thu, 8 Jan 2026 18:36:41 +0100 Subject: [PATCH] Move AVFoundation to parent directory (#677) --- pkg/avfoundation/{AVFoundationBind => }/AVFoundationBind.h | 0 pkg/avfoundation/{AVFoundationBind => }/AVFoundationBind.m | 6 ------ pkg/avfoundation/{AVFoundationBind => }/DeviceObserver.h | 0 pkg/avfoundation/{AVFoundationBind => }/DeviceObserver.m | 0 pkg/avfoundation/avfoundation_darwin.go | 3 +-- pkg/avfoundation/device_observer_darwin.go | 2 +- 6 files changed, 2 insertions(+), 9 deletions(-) rename pkg/avfoundation/{AVFoundationBind => }/AVFoundationBind.h (100%) rename pkg/avfoundation/{AVFoundationBind => }/AVFoundationBind.m (98%) rename pkg/avfoundation/{AVFoundationBind => }/DeviceObserver.h (100%) rename pkg/avfoundation/{AVFoundationBind => }/DeviceObserver.m (100%) 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);