From f23f28c12e6d88e6273f556282d3577616e12286 Mon Sep 17 00:00:00 2001 From: QuantumEntangledAndy Date: Sat, 12 Aug 2023 11:11:01 +0700 Subject: [PATCH] Log cleanup --- crates/core/src/bc_protocol/connection/udpsource.rs | 12 ++++++------ src/rtsp/states/streaming.rs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/core/src/bc_protocol/connection/udpsource.rs b/crates/core/src/bc_protocol/connection/udpsource.rs index 47b83e1..2583b16 100644 --- a/crates/core/src/bc_protocol/connection/udpsource.rs +++ b/crates/core/src/bc_protocol/connection/udpsource.rs @@ -349,7 +349,7 @@ impl UdpPayloadSource { fn maintanence(&mut self, cx: &mut Context<'_>) { // Check for periodic resends - log::info!("Maintaince"); + // log::info!("Maintaince"); if self.resend_interval.poll_tick(cx).is_ready() { for (_, resend) in self.sent.iter() { self.send_buffer.push_back(BcUdp::Data(resend.clone())); @@ -358,7 +358,7 @@ impl UdpPayloadSource { if self.ack_interval.poll_tick(cx).is_ready() // && self.packets_want > 0 { - log::info!("Pushing Ack"); + // log::info!("Pushing Ack"); let ack = BcUdp::Ack(self.build_send_ack()); self.send_buffer.push_back(ack); self.state = State::Flushing; @@ -372,7 +372,7 @@ impl Stream for UdpPayloadSource { fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { let camera_addr = self.inner.addr; let this = self.get_mut(); - log::info!("this.state: {:?}", this.state); + // log::info!("this.state: {:?}", this.state); match this.state { State::Normal => { // this.state = State::YieldNow; @@ -450,7 +450,7 @@ impl Stream for UdpPayloadSource { } } State::Flushing => { - log::info!("Fushing: {}", this.send_buffer.len()); + // log::info!("Fushing: {}", this.send_buffer.len()); if this.send_buffer.is_empty() { this.state = State::Normal; } else { @@ -519,7 +519,7 @@ impl Sink> for UdpPayloadSource { self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll> { - log::info!("poll_flush"); + // log::info!("poll_flush"); let this = self.get_mut(); let res = match this.flush_state { FlushState::Ready => match this.poll_ready_unpin(cx) { @@ -555,7 +555,7 @@ impl Sink> for UdpPayloadSource { } }; - log::info!("poll_flush end: {:?}", res); + log::trace!("poll_flush end: {:?}", res); res } diff --git a/src/rtsp/states/streaming.rs b/src/rtsp/states/streaming.rs index 2f6f600..01dbf11 100644 --- a/src/rtsp/states/streaming.rs +++ b/src/rtsp/states/streaming.rs @@ -79,7 +79,7 @@ impl Camera { loop { tokio::task::yield_now().await; // debug!("Straming: Get"); - let data = timeout(Duration::from_secs(90), stream_data.get_data()) + let data = timeout(Duration::from_secs(15), stream_data.get_data()) .await .with_context(|| "Timed out waiting for new Media Frame")??; // debug!("Straming: Got");