diff --git a/src/rtsp/gst/sender.rs b/src/rtsp/gst/sender.rs index b52b817..a56cb10 100644 --- a/src/rtsp/gst/sender.rs +++ b/src/rtsp/gst/sender.rs @@ -290,11 +290,11 @@ impl NeoMediaSenders { occ.remove(); continue; } - if let Err(e) = occ.get_mut().process_jump_to_live(&self.buffer).await { - debug!("Could not handle jump to live: {:?}", e); - occ.remove(); - continue; - } + // if let Err(e) = occ.get_mut().process_jump_to_live(&self.buffer).await { + // debug!("Could not handle jump to live: {:?}", e); + // occ.remove(); + // continue; + // } if let Err(e) = occ.get_mut().process_buffer(&self.buffer).await { debug!("Could not send client data: {:?}", e); occ.remove(); @@ -527,26 +527,26 @@ impl NeoMediaSender { Ok(last_sent_time) } - async fn process_jump_to_live(&mut self, buffer: &NeoBuffer) -> AnyResult<()> { - if self.inited { - if let (Some(buffer_start), Some(buffer_end)) = (buffer.start_time(), buffer.end_time()) - { - let runtime = self.get_buftime().unwrap_or(self.last_sent_time); - if runtime < buffer_start.saturating_sub(LATENCY * 2) - || runtime > buffer_end.saturating_add(LATENCY * 2) - { - debug!( - "Outside buffer jumping to live: {:?} < {:?} < {:?}", - Duration::from_micros(buffer_start.try_into().unwrap_or(0)), - Duration::from_micros(runtime.try_into().unwrap_or(0)), - Duration::from_micros(buffer_end.try_into().unwrap_or(0)) - ); - self.jump_to_live(buffer).await?; - } - } - } - Ok(()) - } + // async fn process_jump_to_live(&mut self, buffer: &NeoBuffer) -> AnyResult<()> { + // if self.inited { + // if let (Some(buffer_start), Some(buffer_end)) = (buffer.start_time(), buffer.end_time()) + // { + // let runtime = self.get_buftime().unwrap_or(self.last_sent_time); + // if runtime < buffer_start.saturating_sub(LATENCY * 2) + // || runtime > buffer_end.saturating_add(LATENCY * 2) + // { + // debug!( + // "Outside buffer jumping to live: {:?} < {:?} < {:?}", + // Duration::from_micros(buffer_start.try_into().unwrap_or(0)), + // Duration::from_micros(runtime.try_into().unwrap_or(0)), + // Duration::from_micros(buffer_end.try_into().unwrap_or(0)) + // ); + // self.jump_to_live(buffer).await?; + // } + // } + // } + // Ok(()) + // } fn get_runtime(&self) -> Option { if let Some(appsrc) = self.vid.as_ref() {