Skip to content

Commit 86280fe

Browse files
author
yngrtc
committed
bump sfu to v0.0.3
1 parent e01be38 commit 86280fe

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sfu"
3-
version = "0.0.2"
3+
version = "0.0.3"
44
authors = ["Rusty Rain <y@ngr.tc>"]
55
edition = "2021"
66
description = "WebRTC Selective Forwarding Unit (SFU) in Rust with Sans-IO"

src/handler/gateway.rs

+12-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ use std::cell::RefCell;
1717
use std::collections::VecDeque;
1818
use std::ops::{Add, Sub};
1919
use std::rc::Rc;
20-
use std::time::Instant;
2120
use std::time::Duration;
21+
use std::time::Instant;
2222
use stun::attributes::{
2323
ATTR_ICE_CONTROLLED, ATTR_ICE_CONTROLLING, ATTR_NETWORK_COST, ATTR_PRIORITY, ATTR_USERNAME,
2424
ATTR_USE_CANDIDATE,
@@ -163,7 +163,11 @@ impl Handler for GatewayHandler {
163163
}
164164
}
165165

166-
fn poll_timeout(&mut self, ctx: &Context<Self::Rin, Self::Rout, Self::Win, Self::Wout>, eto: &mut Instant) {
166+
fn poll_timeout(
167+
&mut self,
168+
ctx: &Context<Self::Rin, Self::Rout, Self::Win, Self::Wout>,
169+
eto: &mut Instant,
170+
) {
167171
if self.next_timeout < *eto {
168172
*eto = self.next_timeout;
169173
}
@@ -436,7 +440,9 @@ impl GatewayHandler {
436440
rtp_packet: rtp::packet::Packet,
437441
) -> Result<Vec<TaggedMessageEvent>> {
438442
debug!("handle_rtp_message {}", transport_context.peer_addr);
439-
server_states.get_mut_transport(&(&transport_context).into())?.keep_alive();
443+
server_states
444+
.get_mut_transport(&(&transport_context).into())?
445+
.keep_alive();
440446

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

466474
//TODO: Selective Forwarding RTCP Packets
467475
let peers =

0 commit comments

Comments
 (0)