mirror of
https://github.com/pion/mediadevices.git
synced 2026-04-22 15:57:27 +08:00
3d4fceab3d
* Import wmcodecdsp and try to use their nv12 const * Remove ifndef * Enhance getCameraName function to retrieve friendly name from IPropertyBag, with fallback to display name. Update LDFLAGS in camera_windows.go to include oleaut32 library. * Don't mistake label for friendly name * Initialize COM for thread safety in Open and VideoRecord methods of camera_windows.go * Refactor camera handling in camera_windows.go and camera_windows.cpp - Introduced mutex for thread safety in camera struct to protect shared resources. - Updated Open method to initialize done channel and manage camera state. - Enhanced Close method to ensure proper cleanup and prevent double closing. - Improved resolution listing logic in camera_windows.cpp by ensuring media types are freed correctly. - Changed memory deletion from single to array deletion for camera properties. * Fix issues post-rebase * Refactor Close method * Transfer golang buffer management to c to avoid gc * Fix race condition in imageCallback by fixing unlock code location