From bc3f9b65a0de9240c5fae53e6312a3271bfc4152 Mon Sep 17 00:00:00 2001 From: QuantumEntangledAndy Date: Wed, 10 May 2023 20:43:53 +0700 Subject: [PATCH] Add messages about buffer size --- src/rtsp/gst/sender.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rtsp/gst/sender.rs b/src/rtsp/gst/sender.rs index e1bc87e..9ec1f9b 100644 --- a/src/rtsp/gst/sender.rs +++ b/src/rtsp/gst/sender.rs @@ -648,6 +648,11 @@ impl NeoMediaSender { { return Err(anyhow!("Vid src is closed")); } + if self.buffer.buf.len() < 4 { + error!("Buffer exhausted. Not enough data from Camera."); + } else { + debug!("Buffer size: {}", self.buffer.buf.len()); + } const LATENCY: FrameTime = Duration::from_millis(250).as_micros() as FrameTime; if let Some(buftime) = self.get_buftime().map(|i| i.saturating_add(LATENCY)) { // debug!("Update: buftime: {}", buftime);