atm0s-media-server
atm0s-media-server copied to clipboard
Feat webrtc sdk
Pull Request
Description
This PR implement Webrtc SDK Protocol based on RFC-0005.
SDK Implement: https://github.com/8xFF/atm0s-media-sdk-ts/pull/2
Features:
- [ ] Session restart-ice
- [ ] Session restore new server
- [x] Join room first
- [x] Join room lazy
- [x] Room info: peers
- [x] Room info: tracks
- [x] Remote Track: first create
- [x] Remote Track: lazy create
- [x] Remote Track: share with simple stream
- [x] Remote Track: share with simulcast/SVC
- [x] Remote Track: attach, detach source in-air
- [x] Remote Track: config on-air
- [ ] Remote Track: multi tracks with multi connections
- [x] Local Track: first create
- [x] Local Track: lazy create
- [x] Local Track: attach, detach
- [x] Local Track: config on air
Related Issue
If this pull request is related to any issue, please mention it here.
Checklist
- [ ] I have tested the changes locally.
- [ ] I have reviewed the code changes.
- [ ] I have updated the documentation, if necessary.
- [ ] I have added appropriate tests, if applicable.
Screenshots
If applicable, add screenshots to help explain the changes made.
Additional Notes
Add any additional notes or context about the pull request here.
[!NOTE] Currently processing new changes in this PR. This may take a few minutes, please wait...
Commits
Files that changed from the base of the PR and between bfffca68de6795bae5c442638c918af624f50d73 and 516759b200938a1f8a3560f13bd8b1573d302480.Files ignored due to path filters (6)
Cargo.lockis excluded by!**/*.lock,!**/*.lockCargo.tomlis excluded by!**/*.tomlbin/Cargo.tomlis excluded by!**/*.tomlpackages/media_runner/Cargo.tomlis excluded by!**/*.tomlpackages/protocol/Cargo.tomlis excluded by!**/*.tomlpackages/transport_webrtc/Cargo.tomlis excluded by!**/*.tomlFiles selected for processing (57)
- .github/workflows/release.yml (2 hunks)
- .github/workflows/rust.yml (1 hunks)
- README.md (1 hunks)
- bin/node1.sh (1 hunks)
- bin/node2.sh (1 hunks)
- bin/src/http/api_media.rs (8 hunks)
- bin/src/http/utils/mod.rs (1 hunks)
- bin/src/http/utils/payload_protobuf.rs (1 hunks)
- bin/src/http/utils/user_agent.rs (1 hunks)
- bin/src/server/media.rs (3 hunks)
- bin/src/server/media/runtime_worker.rs (7 hunks)
- packages/media_core/src/cluster.rs (10 hunks)
- packages/media_core/src/cluster/room.rs (3 hunks)
- packages/media_core/src/cluster/room/channel_pub.rs (4 hunks)
- packages/media_core/src/cluster/room/channel_sub.rs (10 hunks)
- packages/media_core/src/cluster/room/metadata.rs (21 hunks)
- packages/media_core/src/endpoint.rs (6 hunks)
- packages/media_core/src/endpoint/internal.rs (5 hunks)
- packages/media_core/src/endpoint/internal/bitrate_allocator.rs (3 hunks)
- packages/media_core/src/endpoint/internal/local_track.rs (6 hunks)
- packages/media_core/src/endpoint/internal/local_track/packet_selector.rs (11 hunks)
- packages/media_core/src/endpoint/internal/local_track/packet_selector/video_h264_sim.rs (5 hunks)
- packages/media_core/src/endpoint/internal/local_track/packet_selector/video_single.rs (1 hunks)
- packages/media_core/src/endpoint/internal/local_track/packet_selector/video_vp8_sim.rs (5 hunks)
- packages/media_core/src/endpoint/internal/local_track/packet_selector/video_vp9_svc.rs (4 hunks)
- packages/media_core/src/endpoint/internal/remote_track.rs (4 hunks)
- packages/media_core/src/errors.rs (1 hunks)
- packages/media_core/src/transport.rs (7 hunks)
- packages/media_runner/src/worker.rs (8 hunks)
- packages/protocol/build.rs (1 hunks)
- packages/protocol/proto/conn.proto (1 hunks)
- packages/protocol/proto/features.proto (1 hunks)
- packages/protocol/proto/features_mix_minus.proto (1 hunks)
- packages/protocol/proto/gateway.proto (1 hunks)
- packages/protocol/proto/shared.proto (1 hunks)
- packages/protocol/src/endpoint.rs (5 hunks)
- packages/protocol/src/lib.rs (1 hunks)
- packages/protocol/src/media.rs (5 hunks)
- packages/protocol/src/protobuf/conn.rs (1 hunks)
- packages/protocol/src/protobuf/features.rs (1 hunks)
- packages/protocol/src/protobuf/gateway.rs (1 hunks)
- packages/protocol/src/protobuf/mix_minus.rs (1 hunks)
- packages/protocol/src/protobuf/mod.rs (1 hunks)
- packages/protocol/src/protobuf/shared.rs (1 hunks)
- packages/protocol/src/transport.rs (5 hunks)
- packages/protocol/src/transport/webrtc.rs (1 hunks)
- packages/transport_webrtc/src/lib.rs (1 hunks)
- packages/transport_webrtc/src/media/h264.rs (1 hunks)
- packages/transport_webrtc/src/media/mod.rs (3 hunks)
- packages/transport_webrtc/src/shared_port.rs (2 hunks)
- packages/transport_webrtc/src/transport.rs (7 hunks)
- packages/transport_webrtc/src/transport/bwe_state.rs (11 hunks)
- packages/transport_webrtc/src/transport/webrtc.rs (1 hunks)
- packages/transport_webrtc/src/transport/webrtc/local_track.rs (1 hunks)
- packages/transport_webrtc/src/transport/webrtc/remote_track.rs (1 hunks)
- packages/transport_webrtc/src/transport/whep.rs (5 hunks)
- packages/transport_webrtc/src/transport/whip.rs (6 hunks)
______________________________________________________________ < How would you like your code review? Scrambled or over-easy? > -------------------------------------------------------------- \ \ (\__/) (•ㅅ•) / づ
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai generate interesting stats about this repository and render them as a table.@coderabbitai show all the console.log statements in this repository.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (invoked as PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger a review. This is useful when automatic reviews are disabled for the repository.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai helpto get help.
Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
Codecov Report
Attention: Patch coverage is 26.48084% with 1688 lines in your changes are missing coverage. Please review.
Project coverage is 46.70%. Comparing base (
5855b17) to head (516759b). Report is 1 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #283 +/- ##
==========================================
- Coverage 51.22% 46.70% -4.52%
==========================================
Files 53 63 +10
Lines 5808 7012 +1204
==========================================
+ Hits 2975 3275 +300
- Misses 2833 3737 +904
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Currently webrtc dont send media with mid when we restart-ice to new server if the stream is simulcast. It will be move to separated ticket.