* 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
* Suppress noisy x264 [info] log messages and expose LogLevel param
x264's default log level (X264_LOG_INFO) causes it to write encoder
stats, CPU capabilities, and profile info to stderr. When used with
viam-server, these appear as warn-level logs and create noise.
Default to LogWarning to suppress info messages while preserving
actual warnings and errors. Expose a LogLevel field on Params so
consumers can control the verbosity themselves.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Default to info to avoid breaking change; Fix comment
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Add NV12 support
* Fix camera resolution listing by supporting FORMAT_VideoInfo2 in addition to FORMAT_VideoInfo. This change allows for better compatibility with various video formats by correctly retrieving width, height, and compression details from both format types (NV12 and YUY2)
* Add support for configuring video capture pin format in open method
* Import wmcodecdsp and try to use their nv12 const
* Remove ifndef
* Use subtype.Data1 instead of biCompression
* 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
* Improve camera device name handling and memory management in Windows driver. Added checks for valid device names and initialized camera lists to prevent memory issues. Enhanced resolution listing by ensuring proper media type handling and freeing resources appropriately.
* Add NV12 support
* Fix camera resolution listing by supporting FORMAT_VideoInfo2 in addition to FORMAT_VideoInfo. This change allows for better compatibility with various video formats by correctly retrieving width, height, and compression details from both format types (NV12 and YUY2)
* Add support for configuring video capture pin format in open method
* Import wmcodecdsp and try to use their nv12 const
* Remove ifndef
* Add tag
* Add nomicrophone build tag for optional microphone support
- Changed from platform-specific (!windows) to opt-out build tag (!nomicrophone)
- Microphone support included by default (non-breaking)
- Use -tags nomicrophone to exclude when malgo deps unavailable
- Useful for cross-compilation and minimal builds
- Renamed microphone_windows.go to microphone_stub.go for clarity
* Update README
* wip
* wip
* Organize
* Remove unnecessary change in camera_darwin.go filtering
* wip
* Make observer stop safe during startup
* wip IsAvailable impl
* Fix non-darwin builds
* Lock bg loop to main thread and add comment
* Remove fmt prints
* Simplify isAvailable; Add timeout for Read darwin
* Match comment with code
* Change to singleton pattern; Add clearer safer state machine states; Change language from Stop to Destroy; Add new error for when observer is unavailable;
* Add stubs for linux
* Move cancel() up so its not dead code sometimes
* Add stubs for Windows too
* Remove StopObserver usage
* Add camera tests
* Add device observer tests
* Fix multiple destroy calls bug; Call setup in start
* Improve isAvailable
* Improve string handling in device observer c
* Add error handling in example
* Add comment about setup vs start
* Rename and organize device observer darwin
* Explicitly case initial state for setup
* Fix potential destroy goroutine leak; Use only modern build tag; Return err not nil for stubs; Improve comments
* Close startDone channel on device observer stop not wait
* Add VPX improvements from pion-mediadevices
- Add vpx_image.go: VpxImage wrapper for vpx_image_t with convenient methods
- Move BitrateTracker to vpx package: More specific to VPX codec usage
- Add bitrate_tracker_test.go: Test coverage for VPX-specific bitrate tracking
- Remove generic codec-level BitrateTracker: Replaced by VPX-specific version
These changes improve VPX codec functionality and organization by:
1. Adding image handling utilities specific to VPX
2. Providing better bitrate tracking for VPX codecs
3. Improving code organization by moving VPX-specific code to VPX package
* Revert bitrate tracker changes
- Remove vpx-specific bitrate tracker files
- Restore original codec-level bitrate tracker and test
- Keep only the vpx_image.go addition from pion-mediadevices
* Add comprehensive unit tests for VpxImage
- Add vpx_image_test.go with full test coverage for VpxImage wrapper
- Test interface compliance and constructor behavior
- Test nil pointer handling (documents expected panic behavior)
- Test common video format constants and plane indices
- All tests pass and integrate with existing VPX test suite
This improves test coverage for the new VpxImage utility from pion-mediadevices.
* Add comprehensive unit tests for VpxImage
- Add vpx_image_test.go with full test coverage for VpxImage wrapper
- Test interface compliance and constructor behavior
- Test nil pointer handling (documents expected panic behavior)
- Test common video format constants and plane indices
- All tests pass and integrate with existing VPX test suite
This improves test coverage for the new VpxImage utility from pion-mediadevices.
* Add vp8 decoder and dynamic vp8 decoding
* Add QPController
* change parameters into const
* move decoder into another PR
* use explicit parameter name
Fix#633
Here the signalCh could have been closed by another goroutine, we should
use returned signalCh from `track.removeActivePeerConnection()` to close
the channel.
Actually, I don't know why we need to close the signalCh, we're using it
to send over the doneCh, why ever close it?