forked from node-webrtc/node-webrtc
-
Notifications
You must be signed in to change notification settings - Fork 27
Get build/tests working for M114 #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kevindhanna
wants to merge
9
commits into
WonderInventions:develop
Choose a base branch
from
kevindhanna:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8128b7c
fix(test): update msid count expectation for M114 stream ID deduplica…
kevindhanna 33ceabf
fix: dispatch DataChannel close events before PeerConnection::Close()
kevindhanna 4d1e8e1
fix(build): patch libwebrtc for macOS 26 SDK compatibility
kevindhanna 8ebbaa9
refactor(test): rewrite multiconnect and custom-settings without simp…
kevindhanna ae0fa0d
fix(test): replace time-based audio sink assertions with event-count-…
kevindhanna 3dbb545
fix(build): link SimulcastEncoderAdapter for video encoding support
kevindhanna dee565c
fix: avoid double RegisterObserver on DataChannel to prevent message …
kevindhanna a764718
fix: use separate network thread in PeerConnectionFactory
kevindhanna ab7942a
chore: add nix.gni fallback for non-Nix builds and fix compiler warnings
kevindhanna File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- a/modules/desktop_capture/mac/screen_capturer_mac.mm | ||
| +++ b/modules/desktop_capture/mac/screen_capturer_mac.mm | ||
| @@ -24,6 +24,11 @@ | ||
| // These have the correct annotation. See https://crbug.com/1431897. | ||
| // TODO(thakis): Remove this once FB12109479 is fixed and we updated to an SDK | ||
| // with the fix. | ||
| +// NOTE: CG_AVAILABLE_BUT_DEPRECATED was removed in macOS 26 SDK. | ||
| +#ifndef CG_AVAILABLE_BUT_DEPRECATED | ||
| +#define CG_AVAILABLE_BUT_DEPRECATED(from, to, ...) \ | ||
| + API_DEPRECATED(__VA_ARGS__, macos(from, to)) | ||
| +#endif | ||
|
|
||
| static CGDisplayStreamRef __nullable | ||
| wrapCGDisplayStreamCreate(CGDirectDisplayID display, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| #!/bin/bash | ||
| # Apply patches to the downloaded WebRTC source. | ||
| # Skips patches that have already been applied (idempotent). | ||
| set -e | ||
|
|
||
| SOURCE_DIR="$1" | ||
| PATCHES_DIR="$2" | ||
|
|
||
| for patch in "$PATCHES_DIR"/webrtc-*.patch; do | ||
| [ -f "$patch" ] || continue | ||
| if git -C "$SOURCE_DIR" apply --check "$patch" 2>/dev/null; then | ||
| echo "Applying patch: $(basename "$patch")" | ||
| git -C "$SOURCE_DIR" apply "$patch" | ||
| else | ||
| echo "Skipping already-applied patch: $(basename "$patch")" | ||
| fi | ||
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,9 @@ DataChannelObserver::DataChannelObserver( | |
| PeerConnectionFactory *factory, | ||
| rtc::scoped_refptr<webrtc::DataChannelInterface> jingleDataChannel) | ||
| : _factory(factory), _jingleDataChannel(std::move(jingleDataChannel)) { | ||
| _jingleDataChannel->RegisterObserver(this); | ||
| // Don't register here. Registration happens in RTCDataChannel's constructor, | ||
| // which avoids a double RegisterObserver that causes message loss through | ||
| // M114's ObserverAdapter signaling thread relay. | ||
| } | ||
|
|
||
| void DataChannelObserver::OnStateChange() { | ||
|
|
@@ -72,9 +74,20 @@ RTCDataChannel::RTCDataChannel(const Napi::CallbackInfo &info) | |
| _jingleDataChannel = observer->_jingleDataChannel; | ||
| _jingleDataChannel->RegisterObserver(this); | ||
|
|
||
| // Re-queue cached observer events | ||
| // Re-queue any cached observer events (from the window between | ||
| // OnDataChannel and this constructor). | ||
| requeue(*observer, *this); | ||
|
|
||
| // If the channel already transitioned to open before we registered, | ||
| // dispatch the open event so JS onopen handlers fire. | ||
| auto state = _jingleDataChannel->state(); | ||
| if (state == webrtc::DataChannelInterface::kOpen) { | ||
| Dispatch( | ||
| Callback1<RTCDataChannel>::Create([state](RTCDataChannel &channel) { | ||
| RTCDataChannel::HandleStateChange(channel, state); | ||
| })); | ||
| } | ||
|
|
||
| delete observer; | ||
|
|
||
| // NOTE(mroberts): These doesn't actually matter yet. | ||
|
|
@@ -106,6 +119,8 @@ void RTCDataChannel::CleanupInternals() { | |
|
|
||
| void RTCDataChannel::OnPeerConnectionClosed() { | ||
| if (_jingleDataChannel != nullptr) { | ||
| CleanupInternals(); | ||
| HandleStateChange(*this, webrtc::DataChannelInterface::kClosed); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. re-added |
||
| Stop(); | ||
| } | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not crazy about having to patch, but there are some other patches I've had to apply on Windows, so overall this functionality is OK, so long as it stays minimal.