Commit Graph

693 Commits

Author SHA1 Message Date
sean yu 03900dcb1b Add darwin runtime device observer support (#670)
* 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
v0.9.0
2025-12-28 13:33:36 -08:00
renovate[bot] 7d8cbdbf23 fix(deps): update module github.com/pion/webrtc/v4 to v4.1.8 (#673)
* fix examples/ tidy from actions bump

* fix(deps): update module github.com/pion/webrtc/v4 to v4.1.8

Generated by Renovate Bot

---------

Co-authored-by: philipch07 <philipch07@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-15 00:25:57 -05:00
Joe Turki 2f807f66f9 Add release workflow 2025-12-11 10:13:29 +02:00
sean yu 0e726eac75 Add context with timeout to darwin Read() calls (#674)
* Add timeout

* Clean
v0.8.0
2025-12-10 22:30:30 -05:00
renovate[bot] 7b76fa0ce4 chore(deps): update actions/checkout action to v6 (#669)
Generated by Renovate Bot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-25 10:03:37 +09:00
renovate[bot] 98fa96e863 fix(deps): update module github.com/pion/rtp to v1.8.25 (#664)
Generated by Renovate Bot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-10 10:27:10 +09:00
renovate[bot] d8fdd3e9da fix(deps): update module github.com/pion/webrtc/v4 to v4.1.6 (#665)
Generated by Renovate Bot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-10 09:57:56 +09:00
Atsushi Watanabe 810921d448 Add SVT-AV1 codec (#660) 2025-11-10 09:26:21 +09:00
Atsushi Watanabe 5aad703236 Tidy examples/go.mod (#663)
- Run go mod tidy under examples
- Automatically tidy examples/go.mod on Renovate PR
2025-10-23 13:46:16 +09:00
renovate[bot] e15e8f6880 fix(deps): update module github.com/pion/rtcp to v1.2.16 (#658)
Generated by Renovate Bot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-22 18:57:27 +09:00
renovate[bot] dd99235d6f fix(deps): update module github.com/pion/rtp to v1.8.24 (#659)
Generated by Renovate Bot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-22 18:51:47 +09:00
Haily Nguyen a5e2538787 Revert "Add VPX wrappers (#652)" (#662)
This reverts commit a68a5ba4a6.
2025-10-22 02:45:06 -07:00
Haily Nguyen a68a5ba4a6 Add VPX wrappers (#652)
* 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.
2025-10-09 16:15:33 -07:00
philipch07 5a0a5b00d4 Use isZero for reflection (#655) 2025-10-07 16:36:03 -04:00
renovate[bot] d864136608 fix(deps): update module github.com/gen2brain/malgo to v0.11.24 (#651)
Generated by Renovate Bot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-07 19:11:49 +03:00
Joe Turki 9a9a5631ed Update Go version in tests (#654) 2025-10-07 18:45:16 +03:00
renovate[bot] 799d1efb81 fix(deps): update module github.com/pion/webrtc/v4 to v4.1.5 (#642)
Generated by Renovate Bot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-07 18:17:41 +03:00
renovate[bot] 92dfa9bc75 fix(deps): update module github.com/pion/interceptor to v0.1.41 (#653)
Generated by Renovate Bot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-07 18:15:44 +03:00
renovate[bot] 077ff4c0f2 fix(deps): update module github.com/pion/rtp to v1.8.23 (#641)
Generated by Renovate Bot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-07 18:05:59 +03:00
renovate[bot] f5fbc53145 chore(deps): update actions/checkout action to v5 (#643)
Generated by Renovate Bot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-07 18:05:27 +03:00
Lei Kang cb394eb4c5 resolve comment v0.7.2 2025-09-17 16:50:52 -07:00
Atsushi Watanabe e9f3dc20b6 Fix reading multiple decoded frames 2025-09-17 16:50:52 -07:00
Lei Kang 0710906fc7 fix the test 2025-09-17 16:50:52 -07:00
Lei Kang 7fdafa9598 add codec decoder interface 2025-09-17 16:50:52 -07:00
Lei Kang 5a19127623 add return error code 2025-09-17 16:50:52 -07:00
Lei Kang 8ca6903676 add null pointer from C 2025-09-17 16:50:52 -07:00
Lei Kang de517d790b wrap vpx_image into a struct 2025-09-17 16:50:52 -07:00
Lei Kang 81cfc047d5 add vpx decoder 2025-09-17 16:50:52 -07:00
renovate[bot] 1406108fb2 fix(deps): update module github.com/stretchr/testify to v1.11.1
Generated by Renovate Bot
2025-09-14 22:46:53 -04:00
renovate[bot] a2a211857c chore(deps): update actions/setup-go action to v6
Generated by Renovate Bot
2025-09-14 22:41:32 -04:00
philipch07 c0721738c4 Apply go modernize (#650) 2025-09-14 21:55:37 -04:00
Leo (Lei) Kang 6047a32ea0 [VPX] vpx dynamic encoding (#647)
* Add vp8 decoder and dynamic vp8 decoding

* Add QPController

* change parameters into const

* move decoder into another PR

* use explicit parameter name
2025-09-04 14:33:07 -07:00
Leo (Lei) Kang 60bf158757 [CODEC] Add encoder bitrate tracker (#646)
add encoder bitrate tracker
2025-09-03 15:55:37 -07:00
renovate[bot] c4fd28c7df fix(deps): update github.com/kbinani/screenshot digest to 089614a (#640)
Generated by Renovate Bot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-30 11:33:19 +09:00
renovate[bot] c79e16706b fix(deps): update module github.com/pion/logging to v0.2.4 (#639)
Generated by Renovate Bot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-30 11:31:48 +09:00
renovate[bot] 89420ae84d fix(deps): update module github.com/pion/rtp to v1.8.19 (#632)
Generated by Renovate Bot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-30 11:31:16 +09:00
renovate[bot] 4db71e5b52 fix(deps): update module github.com/pion/webrtc/v4 to v4.1.2 (#637)
Generated by Renovate Bot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-16 10:38:39 +08:00
Jackie Li a45a5e50cd fix track.unbind panic (#634)
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?
2025-06-13 13:31:00 +08:00
renovate[bot] d90220699e fix(deps): update module github.com/pion/webrtc/v4 to v4.1.1 (#629)
Generated by Renovate Bot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-09 15:20:59 +08:00
renovate[bot] 71deb52047 fix(deps): update module github.com/pion/interceptor to v0.1.39 (#628)
Generated by Renovate Bot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-09 15:12:30 +08:00
Jingyang Kang 84ccb15157 Align H265 payloadType in NewRTPH265Codec with RegisterDefaultCodecs (#631) 2025-06-01 23:37:30 +08:00
renovate[bot] ec6a4b6925 fix(deps): update module github.com/pion/webrtc/v4 to v4.1.0 (#627)
Generated by Renovate Bot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 16:08:17 +08:00
renovate[bot] 551fb6afd8 fix(deps): update module github.com/pion/webrtc/v4 to v4.0.15 (#625)
Generated by Renovate Bot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-23 23:29:49 +08:00
Kyle 20e8c50735 Implement bitrate controller in vpx and h264 codecs (#467)
Add bitrate control to vpx and h264 encoders

Co-authored-by: Jingyang Kang <3drxkjy@gmail.com>
2025-04-11 12:05:01 +08:00
Jingyang Kang 7211d077ee Update social links (#620) 2025-04-07 01:07:14 +08:00
代码人生 cd5f8eb43a set bitrate for openh264 (#566)
* Added the set bitrate function for openh264

* add examples

* Format

---------

Co-authored-by: Jingyang Kang <3drxkjy@gmail.com>
2025-04-06 20:47:23 +08:00
renovate[bot] 2d7bdd4e24 fix(deps): update module github.com/pion/webrtc/v4 to v4.0.14 (#616)
Generated by Renovate Bot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-06 11:49:54 +08:00
Jingyang Kang 5cad3f1b41 Feat/add helper function for av1 and h265 codec (#611)
* bump deps version

* Add NewRTPAV1Codec

* fix comment

* Update SDPFmtpLine for RTPAV1Codec

* Add helper function for h265 as well
2025-03-10 07:25:25 -07:00
Jingyang Kang 9d5e9cb3ea Add EncoderController() codec.EncoderController in Track interface. (#614)
* Add EncoderController() codec.EncoderController in Track interface.

* Update test, add EncoderController in mockMediaStreamTrack.
2025-03-10 07:25:14 -07:00
Jingyang Kang 9a47a07eba Add EncoderController method to VideoTrack and AudioTrack. (#612)
* Add GetEncoderController method for VideoTrack and AudioTrack.

* Change the naming, remove unecessary private getter func.
2025-03-09 22:35:55 -07:00