Skip to content

Commit

Permalink
bump sfu to v0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
yngrtc committed Mar 8, 2024
1 parent e01be38 commit 86280fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sfu"
version = "0.0.2"
version = "0.0.3"
authors = ["Rusty Rain <[email protected]>"]
edition = "2021"
description = "WebRTC Selective Forwarding Unit (SFU) in Rust with Sans-IO"
Expand Down
16 changes: 12 additions & 4 deletions src/handler/gateway.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ use std::cell::RefCell;
use std::collections::VecDeque;
use std::ops::{Add, Sub};
use std::rc::Rc;
use std::time::Instant;
use std::time::Duration;
use std::time::Instant;
use stun::attributes::{
ATTR_ICE_CONTROLLED, ATTR_ICE_CONTROLLING, ATTR_NETWORK_COST, ATTR_PRIORITY, ATTR_USERNAME,
ATTR_USE_CANDIDATE,
Expand Down Expand Up @@ -163,7 +163,11 @@ impl Handler for GatewayHandler {
}
}

fn poll_timeout(&mut self, ctx: &Context<Self::Rin, Self::Rout, Self::Win, Self::Wout>, eto: &mut Instant) {
fn poll_timeout(
&mut self,
ctx: &Context<Self::Rin, Self::Rout, Self::Win, Self::Wout>,
eto: &mut Instant,
) {
if self.next_timeout < *eto {
*eto = self.next_timeout;
}
Expand Down Expand Up @@ -436,7 +440,9 @@ impl GatewayHandler {
rtp_packet: rtp::packet::Packet,
) -> Result<Vec<TaggedMessageEvent>> {
debug!("handle_rtp_message {}", transport_context.peer_addr);
server_states.get_mut_transport(&(&transport_context).into())?.keep_alive();
server_states
.get_mut_transport(&(&transport_context).into())?
.keep_alive();

//TODO: Selective Forwarding RTP Packets
let peers =
Expand All @@ -461,7 +467,9 @@ impl GatewayHandler {
rtcp_packets: Vec<Box<dyn rtcp::packet::Packet>>,
) -> Result<Vec<TaggedMessageEvent>> {
debug!("handle_rtcp_message {}", transport_context.peer_addr);
server_states.get_mut_transport(&(&transport_context).into())?.keep_alive();
server_states
.get_mut_transport(&(&transport_context).into())?
.keep_alive();

//TODO: Selective Forwarding RTCP Packets
let peers =
Expand Down

0 comments on commit 86280fe

Please sign in to comment.