Skip to content
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

feat: bitrate control with Twcc and Remb #265

Merged
merged 3 commits into from
Apr 26, 2024

Conversation

giangndm
Copy link
Contributor

@giangndm giangndm commented Apr 26, 2024

Pull Request

Description

This PR implement bitrate control with Twcc and Remb

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.

Summary by CodeRabbit

  • New Features

    • Introduced enhanced bitrate management for media streaming, including dynamic adjustments based on network conditions.
    • Added priority handling for video tracks to optimize quality for important streams.
    • Implemented new configurations for better control over media transmission rates.
  • Performance Improvements

    • Optimized media server responsiveness by reducing the worker task interval from 100 milliseconds to 1 millisecond.
  • Bug Fixes

    • Adjusted event handling in media transport to improve stability and performance under varying network conditions.

Copy link

coderabbitai bot commented Apr 26, 2024

Walkthrough

Walkthrough

The recent updates across multiple components focus on enhancing bitrate management and track prioritization in media handling systems. Key changes include the introduction of new structures and enums for handling track priorities and bitrate configurations, adjustments to method signatures, and improvements in bandwidth estimation processes.

Changes

File Path Change Summary
bin/src/.../media.rs Adjusted worker duration from 100ms to 1ms.
packages/media_core/src/... Added bitrate management features and configurations across endpoint and track modules.
packages/protocol/src/... Introduced TrackPriority and BitrateControlMode. Updated traits for MediaKind.
packages/transport_webrtc/src/... Enhanced handling of bandwidth estimation, added new structs and modules for bitrate management.

🐇
In the code's garden, changes bloom bright and new,
Bitrates and tracks, managed just right,
From tiny millis to bandwidth in view,
Hopping through code, from day until night.
Cheers to the updates, oh what a sight! 🌟
🐰


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 829ea8b and 1e699a6.
Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock, !**/*.lock
  • packages/transport_webrtc/Cargo.toml is excluded by !**/*.toml
Files selected for processing (14)
  • bin/src/server/media.rs (1 hunks)
  • packages/media_core/src/endpoint.rs (6 hunks)
  • packages/media_core/src/endpoint/internal.rs (7 hunks)
  • packages/media_core/src/endpoint/internal/bitrate_allocator.rs (1 hunks)
  • packages/media_core/src/endpoint/internal/local_track.rs (7 hunks)
  • packages/media_core/src/endpoint/internal/remote_track.rs (3 hunks)
  • packages/media_core/src/transport.rs (4 hunks)
  • packages/protocol/src/endpoint.rs (2 hunks)
  • packages/protocol/src/media.rs (1 hunks)
  • packages/transport_webrtc/src/transport.rs (7 hunks)
  • packages/transport_webrtc/src/transport/bwe_state.rs (1 hunks)
  • packages/transport_webrtc/src/transport/whep.rs (11 hunks)
  • packages/transport_webrtc/src/transport/whip.rs (2 hunks)
  • packages/transport_webrtc/src/worker.rs (3 hunks)
Additional Context Used
GitHub Check Runs (2)
codecov/patch success (30)

bin/src/server/media.rs: [warning] 42-42: bin/src/server/media.rs#L42
Added line #L42 was not covered by tests


packages/media_core/src/endpoint.rs: [warning] 131-131: packages/media_core/src/endpoint.rs#L131
Added line #L131 was not covered by tests


packages/media_core/src/endpoint.rs: [warning] 134-134: packages/media_core/src/endpoint.rs#L134
Added line #L134 was not covered by tests


packages/media_core/src/endpoint/internal.rs: [warning] 56-56: packages/media_core/src/endpoint/internal.rs#L56
Added line #L56 was not covered by tests


packages/media_core/src/endpoint/internal.rs: [warning] 58-58: packages/media_core/src/endpoint/internal.rs#L58
Added line #L58 was not covered by tests


packages/media_core/src/endpoint/internal.rs: [warning] 69-69: packages/media_core/src/endpoint/internal.rs#L69
Added line #L69 was not covered by tests


packages/media_core/src/endpoint/internal.rs: [warning] 74-83: packages/media_core/src/endpoint/internal.rs#L74-L83
Added lines #L74 - L83 were not covered by tests


packages/media_core/src/endpoint/internal.rs: [warning] 86-86: packages/media_core/src/endpoint/internal.rs#L86
Added line #L86 was not covered by tests


packages/media_core/src/endpoint/internal.rs: [warning] 146-150: packages/media_core/src/endpoint/internal.rs#L146-L150
Added lines #L146 - L150 were not covered by tests


packages/media_core/src/endpoint/internal.rs: [warning] 248-248: packages/media_core/src/endpoint/internal.rs#L248
Added line #L248 was not covered by tests


packages/media_core/src/endpoint/internal.rs: [warning] 251-251: packages/media_core/src/endpoint/internal.rs#L251
Added line #L251 was not covered by tests


packages/media_core/src/endpoint/internal.rs: [warning] 361-369: packages/media_core/src/endpoint/internal.rs#L361-L369
Added lines #L361 - L369 were not covered by tests


packages/media_core/src/endpoint/internal.rs: [warning] 371-375: packages/media_core/src/endpoint/internal.rs#L371-L375
Added lines #L371 - L375 were not covered by tests


packages/media_core/src/endpoint/internal/bitrate_allocator.rs: [warning] 30-33: packages/media_core/src/endpoint/internal/bitrate_allocator.rs#L30-L33
Added lines #L30 - L33 were not covered by tests


packages/media_core/src/endpoint/internal/bitrate_allocator.rs: [warning] 40-43: packages/media_core/src/endpoint/internal/bitrate_allocator.rs#L40-L43
Added lines #L40 - L43 were not covered by tests


packages/media_core/src/endpoint/internal/bitrate_allocator.rs: [warning] 51-51: packages/media_core/src/endpoint/internal/bitrate_allocator.rs#L51
Added line #L51 was not covered by tests


packages/media_core/src/endpoint/internal/bitrate_allocator.rs: [warning] 63-63: packages/media_core/src/endpoint/internal/bitrate_allocator.rs#L63
Added line #L63 was not covered by tests


packages/media_core/src/endpoint/internal/local_track.rs: [warning] 47-47: packages/media_core/src/endpoint/internal/local_track.rs#L47
Added line #L47 was not covered by tests


packages/media_core/src/endpoint/internal/local_track.rs: [warning] 49-49: packages/media_core/src/endpoint/internal/local_track.rs#L49
Added line #L49 was not covered by tests


packages/media_core/src/endpoint/internal/local_track.rs: [warning] 56-56: packages/media_core/src/endpoint/internal/local_track.rs#L56
Added line #L56 was not covered by tests


packages/media_core/src/endpoint/internal/local_track.rs: [warning] 89-89: packages/media_core/src/endpoint/internal/local_track.rs#L89
Added line #L89 was not covered by tests


packages/media_core/src/endpoint/internal/local_track.rs: [warning] 92-92: packages/media_core/src/endpoint/internal/local_track.rs#L92
Added line #L92 was not covered by tests


packages/media_core/src/endpoint/internal/local_track.rs: [warning] 101-101: packages/media_core/src/endpoint/internal/local_track.rs#L101
Added line #L101 was not covered by tests


packages/media_core/src/endpoint/internal/local_track.rs: [warning] 103-103: packages/media_core/src/endpoint/internal/local_track.rs#L103
Added line #L103 was not covered by tests


packages/media_core/src/endpoint/internal/local_track.rs: [warning] 106-110: packages/media_core/src/endpoint/internal/local_track.rs#L106-L110
Added lines #L106 - L110 were not covered by tests


packages/media_core/src/endpoint/internal/local_track.rs: [warning] 113-113: packages/media_core/src/endpoint/internal/local_track.rs#L113
Added line #L113 was not covered by tests


packages/media_core/src/endpoint/internal/local_track.rs: [warning] 124-124: packages/media_core/src/endpoint/internal/local_track.rs#L124
Added line #L124 was not covered by tests


packages/media_core/src/endpoint/internal/local_track.rs: [warning] 141-141: packages/media_core/src/endpoint/internal/local_track.rs#L141
Added line #L141 was not covered by tests


packages/media_core/src/endpoint/internal/local_track.rs: [warning] 152-155: packages/media_core/src/endpoint/internal/local_track.rs#L152-L155
Added lines #L152 - L155 were not covered by tests


packages/media_core/src/endpoint/internal/local_track.rs: [warning] 160-160: packages/media_core/src/endpoint/internal/local_track.rs#L160
Added line #L160 was not covered by tests

clippy success (3)

packages/media_core/src/endpoint/internal.rs: [warning] 363-363:
this operation has no effect


packages/media_core/src/endpoint/internal/bitrate_allocator.rs: [warning] 56-56:
manual implementation of an assign operation


packages/transport_webrtc/src/transport/bwe_state.rs: [warning] 49-49:
unneeded return statement

Additional comments not posted (19)
packages/protocol/src/media.rs (1)

4-4: The addition of Clone and Copy traits to MediaKind enhances usability and performance by avoiding unnecessary cloning.

packages/media_core/src/endpoint/internal/bitrate_allocator.rs (4)

30-33: The method set_egress_bitrate modifies the bitrate and marks the allocator as changed. Consider adding unit tests to cover this functionality.


40-43: The method del_video_track modifies the internal state by removing a track. It is crucial to have tests covering this to ensure tracks are correctly removed.


51-51: The early return in process when changed is false is not covered by tests. Adding a test to verify that no processing occurs when not needed would be beneficial.


63-63: The calculation of individual track bitrates in process is not covered by tests. This is a critical piece of functionality that should be thoroughly tested.

packages/media_core/src/transport.rs (1)

99-99: The addition of EgressBitrateEstimate to TransportEvent enables dynamic handling of bitrate estimates, enhancing the system's adaptability to network conditions.

packages/media_core/src/endpoint/internal/remote_track.rs (1)

39-47: The methods on_join_room and on_leave_room effectively manage the state of remote tracks when joining or leaving rooms, enhancing traceability with detailed logging.

packages/transport_webrtc/src/worker.rs (1)

58-70: The spawn method effectively handles different endpoint configurations based on the variant, ensuring that each endpoint is appropriately configured for its specific use case.

packages/protocol/src/endpoint.rs (1)

Line range hint 151-200: The additions of TrackPriority and BitrateControlMode enhance the system's capability to manage and control bitrate effectively, providing more granular control over media track handling.

packages/media_core/src/endpoint/internal/local_track.rs (5)

47-49: The constructor new initializes an EndpointLocalTrack with a specified media kind and optional room. Consider adding unit tests to cover this initialization process.


56-56: The method on_join_room handles a track joining a room but lacks test coverage. It's crucial to test this to ensure the track is correctly associated with a room.


89-92: The handling of LocalTrackEvent events in on_transport_event is critical but not covered by tests. Testing this would ensure that track events are processed correctly.


Line range hint 101-124: The RPC request handling in on_rpc_req, particularly for track switching, is complex and involves multiple state changes. This should be covered by tests to ensure it behaves as expected under various conditions.


Line range hint 141-156: The on_tick and LimitBitrate handling methods modify the state of EndpointLocalTrack but are not covered by tests. These are important for ensuring the track's bitrate is managed correctly and should be tested.

packages/media_core/src/endpoint.rs (1)

118-121: The EndpointCfg struct is well-defined. Ensure that the configuration is used consistently across the system and that the values provided are validated.

packages/transport_webrtc/src/transport/bwe_state.rs (1)

72-87: The method on_send_video transitions the state correctly based on video packet reception. Ensure that the timing and state transitions are tested to handle edge cases.

packages/transport_webrtc/src/transport.rs (2)

72-74: The configuration for TransportWebrtcCfg is clear and concise. Ensure that the max_ingress_bitrate is used consistently across the system.


Line range hint 85-108: The method TransportWebrtc::new is well-implemented with clear error handling and configuration setup. Ensure that all possible errors from the SDP offer and response handling are appropriately managed.

packages/transport_webrtc/src/transport/whep.rs (1)

188-192: The method on_str0m_event handles bitrate estimates correctly. Ensure that the filtering logic aligns with the expected system behavior and that edge cases are tested.


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?

Share
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 @coderabbitai in 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 @coderabbitai in 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 pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to 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.yaml file 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.

packages/media_core/src/endpoint/internal.rs Fixed Show fixed Hide fixed
if now.duration_since(*last_video_pkt).as_millis() >= TIMEOUT_MS {
log::info!("[BweState] switched from WarmUp to Inactive after {:?} not received video pkt", now.duration_since(*last_video_pkt));
*self = Self::Inactive;
return None;

Check warning

Code scanning / clippy

unneeded return statement Warning

unneeded return statement
Copy link

codecov bot commented Apr 26, 2024

Codecov Report

Attention: Patch coverage is 50.31447% with 158 lines in your changes are missing coverage. Please review.

Project coverage is 37.93%. Comparing base (829ea8b) to head (1e699a6).

Files Patch % Lines
packages/media_core/src/endpoint/internal.rs 0.00% 35 Missing ⚠️
packages/transport_webrtc/src/transport/whep.rs 0.00% 29 Missing ⚠️
packages/transport_webrtc/src/transport.rs 0.00% 22 Missing ⚠️
...es/media_core/src/endpoint/internal/local_track.rs 0.00% 21 Missing ⚠️
packages/transport_webrtc/src/worker.rs 0.00% 13 Missing ⚠️
...ia_core/src/endpoint/internal/bitrate_allocator.rs 80.00% 10 Missing ⚠️
packages/transport_webrtc/src/transport/whip.rs 0.00% 9 Missing ⚠️
packages/media_core/src/transport.rs 0.00% 7 Missing ⚠️
...s/media_core/src/endpoint/internal/remote_track.rs 0.00% 5 Missing ⚠️
...ckages/transport_webrtc/src/transport/bwe_state.rs 97.52% 3 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #265      +/-   ##
==========================================
+ Coverage   36.16%   37.93%   +1.76%     
==========================================
  Files          37       39       +2     
  Lines        3058     3335     +277     
==========================================
+ Hits         1106     1265     +159     
- Misses       1952     2070     +118     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

self.changed = false;
let mut sum = TrackPriority(0);
for (_track, priority) in self.tracks.iter() {
sum = sum + *priority;

Check warning

Code scanning / clippy

manual implementation of an assign operation Warning

manual implementation of an assign operation
@@ -333,6 +358,22 @@
local_track::Output::Event(event) => Some(InternalOutput::Event(EndpointEvent::LocalMediaTrack(id, event))),
local_track::Output::Cluster(room, control) => Some(InternalOutput::Cluster(room, ClusterEndpointControl::LocalTrack(id, control))),
local_track::Output::RpcRes(req_id, res) => Some(InternalOutput::RpcRes(req_id, EndpointRes::LocalTrack(id, res))),
local_track::Output::DesiredBitrate(bitrate) => Some(InternalOutput::Event(EndpointEvent::BweConfig {
current: bitrate,
desired: bitrate + 100_000.max(bitrate * 1 / 5),

Check warning

Code scanning / clippy

this operation has no effect Warning

this operation has no effect
@giangndm giangndm marked this pull request as ready for review April 26, 2024 16:00
@giangndm giangndm merged commit 1736970 into 8xFF:master Apr 26, 2024
10 checks passed
@github-actions github-actions bot mentioned this pull request Apr 24, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

Out of diff range and nitpick comments (6)
bin/src/server/media.rs (1)

42-42: Reducing the worker polling interval to 1 millisecond increases responsiveness but could impact CPU usage. It's recommended to monitor performance metrics to ensure there are no adverse effects.

packages/media_core/src/endpoint.rs (3)

34-34: Consider adding documentation for the Switch variant to explain its parameters and usage.


71-71: Add documentation for DesiredBitrate to clarify its purpose and how it should be used in bitrate control.


88-91: Ensure that the fields current and desired in BweConfig are adequately documented to explain their roles in bandwidth estimation.

packages/media_core/src/endpoint/internal.rs (2)

18-22: Consider organizing imports and module declarations at the top of the file for better readability.


Line range hint 56-69: The constructor new for EndpointInternal lacks unit tests for its logic, especially the initialization of bitrate_allocator.

Do you want me to help by writing some unit tests for this constructor?

Comment on lines +74 to +86
self.bitrate_allocator.on_tick();
if let Some(out) = self.bitrate_allocator.pop_output() {
match out {
bitrate_allocator::Output::SetTrackBitrate(track, bitrate) => {
if let Some(index) = self.local_tracks_id.get1(&track) {
let out = self.local_tracks.on_event(now, *index, local_track::Input::LimitBitrate(bitrate))?;
if let Some(out) = self.convert_local_track_output(now, track, out) {
return Some(out);
}
}
}
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method on_tick modifies the state based on bitrate_allocator outputs but lacks unit tests covering these changes.

Consider adding tests to cover the scenarios where bitrate adjustments are made based on the allocator's output.

Comment on lines +146 to +150
TransportEvent::EgressBitrateEstimate(bitrate) => {
let bitrate2 = bitrate.min(self.cfg.max_egress_bitrate as u64);
log::debug!("[EndpointInternal] limit egress bitrate {bitrate2}, rewrite from {bitrate}");
self.bitrate_allocator.set_egress_bitrate(bitrate2);
None
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The handling of EgressBitrateEstimate in on_transport_event is not covered by tests, which is crucial for ensuring the bitrate control behaves as expected under different network conditions.

Would you like assistance in creating test cases for this event handling?

Comment on lines +248 to +251
if let Some(kind) = event.need_create() {
log::info!("[EndpointInternal] create local track {:?}", track);
let room = self.joined.as_ref().map(|j| j.0.clone());
let index = self.local_tracks.add_task(EndpointLocalTrack::new(room));
let index = self.local_tracks.add_task(EndpointLocalTrack::new(kind, room));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method on_transport_local_track creates a new local track but is not covered by unit tests, particularly the track creation logic.

It's important to ensure that track creation is handled correctly. Shall I help by adding some tests for this functionality?

Comment on lines +361 to +376
local_track::Output::DesiredBitrate(bitrate) => Some(InternalOutput::Event(EndpointEvent::BweConfig {
current: bitrate,
desired: bitrate + 100_000.max(bitrate * 1 / 5),
})),
local_track::Output::Started(kind, priority) => {
if kind.is_video() {
self.bitrate_allocator.set_video_track(id, priority);
}
None
}
local_track::Output::Stopped(kind) => {
if kind.is_video() {
self.bitrate_allocator.del_video_track(id);
}
None
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method convert_local_track_output handles various track events. However, the calculation in line 363 has no effect, which might be an oversight.

- desired: bitrate + 100_000.max(bitrate * 1 / 5),
+ desired: bitrate + 100_000.max(bitrate / 5),

This change ensures that the desired bitrate calculation is meaningful by correcting the division operation.


Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
local_track::Output::DesiredBitrate(bitrate) => Some(InternalOutput::Event(EndpointEvent::BweConfig {
current: bitrate,
desired: bitrate + 100_000.max(bitrate * 1 / 5),
})),
local_track::Output::Started(kind, priority) => {
if kind.is_video() {
self.bitrate_allocator.set_video_track(id, priority);
}
None
}
local_track::Output::Stopped(kind) => {
if kind.is_video() {
self.bitrate_allocator.del_video_track(id);
}
None
}
local_track::Output::DesiredBitrate(bitrate) => Some(InternalOutput::Event(EndpointEvent::BweConfig {
current: bitrate,
desired: bitrate + 100_000.max(bitrate / 5),
})),
local_track::Output::Started(kind, priority) => {
if kind.is_video() {
self.bitrate_allocator.set_video_track(id, priority);
}
None
}
local_track::Output::Stopped(kind) => {
if kind.is_video() {
self.bitrate_allocator.del_video_track(id);
}
None
}

Comment on lines +131 to +134
pub fn new(cfg: EndpointCfg, transport: T) -> Self {
Self {
transport,
internal: EndpointInternal::new(),
internal: EndpointInternal::new(cfg),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The constructor for Endpoint is not covered by unit tests. Consider adding tests to cover this critical initialization logic.

Would you like me to help by writing some unit tests for this method?

if now.duration_since(*last_video_pkt).as_millis() >= TIMEOUT_MS {
log::info!("[BweState] switched from WarmUp to Inactive after {:?} not received video pkt", now.duration_since(*last_video_pkt));
*self = Self::Inactive;
return None;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the unnecessary return statement for cleaner code.

- return None;
+ None;

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
return None;
None;

@@ -150,6 +151,15 @@
RemoteTrackEvent::Media(pkt),
))))
}
Str0mEvent::PeerStats(_stats) => None,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable stats is unused. Consider removing it if it's not needed, or ensure it's used if intended.

- Str0mEvent::PeerStats(_stats) => None,
+ Str0mEvent::PeerStats(_) => None,

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
Str0mEvent::PeerStats(_stats) => None,
Str0mEvent::PeerStats(_) => None,

@giangndm giangndm deleted the feat-bitrate-control branch June 6, 2024 00:44
giangndm added a commit to giangndm/8xFF-decentralized-media-server that referenced this pull request Nov 26, 2024
* feat: bitrate control with Twcc and Remb

* feat: added simple bitrate allocator based on track priority

* chore: fix warns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant