mirror of
https://github.com/bleackstorm/SteamFrame-FPV-Control-Center.git
synced 2026-12-03 07:31:57 +01:00
feat(telemetry,ui): add PC pipeline latency, --gst-latency-trace & Glass-to-Glass stopwatch
This commit is contained in:
1 parent
9f0c64f873
commit
b24d4e0a27
9 files changed
+140
-6
No files matched your search
@@ -252,6 +252,10 @@ pub struct AppConfig {
|
|||||||
#[arg(long, default_value_t = false)]
|
#[arg(long, default_value_t = false)]
|
||||||
pub zero_copy_dmabuf: bool,
|
pub zero_copy_dmabuf: bool,
|
||||||
|
|
||||||
|
/// Active le traceur de latence GStreamer natif (`GST_TRACERS=latency`) dans les logs
|
||||||
|
#[arg(long, default_value_t = false)]
|
||||||
|
pub gst_latency_trace: bool,
|
||||||
|
|
||||||
/// Chemin du fichier journal d'erreurs et de diagnostic
|
/// Chemin du fichier journal d'erreurs et de diagnostic
|
||||||
#[arg(long, default_value = "steamframe_fpv.log")]
|
#[arg(long, default_value = "steamframe_fpv.log")]
|
||||||
pub log_file: String,
|
pub log_file: String,
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ pub fn run_desktop_fallback_loop(ctx: &mut EngineWorkerRefs<'_>) {
|
|||||||
let mut has_new_raw_frame = false;
|
let mut has_new_raw_frame = false;
|
||||||
let mut has_video_stream = false;
|
let mut has_video_stream = false;
|
||||||
let mut frame_fmt = PixelFormat::Rgba;
|
let mut frame_fmt = PixelFormat::Rgba;
|
||||||
|
let mut frame_received_at: Option<Instant> = None;
|
||||||
|
|
||||||
if let Some(rx) = ctx.video_rx_opt {
|
if let Some(rx) = ctx.video_rx_opt {
|
||||||
let (live, taken) = rx.take_latest_frame(
|
let (live, taken) = rx.take_latest_frame(
|
||||||
@@ -108,6 +109,7 @@ pub fn run_desktop_fallback_loop(ctx: &mut EngineWorkerRefs<'_>) {
|
|||||||
if meta.width == ctx.cfg.video_width && meta.height == ctx.cfg.video_height {
|
if meta.width == ctx.cfg.video_width && meta.height == ctx.cfg.video_height {
|
||||||
last_frame_id = meta.frame_id;
|
last_frame_id = meta.frame_id;
|
||||||
frame_fmt = meta.format;
|
frame_fmt = meta.format;
|
||||||
|
frame_received_at = Some(meta.received_at);
|
||||||
fps_counter += 1;
|
fps_counter += 1;
|
||||||
has_new_raw_frame = true;
|
has_new_raw_frame = true;
|
||||||
}
|
}
|
||||||
@@ -166,6 +168,7 @@ pub fn run_desktop_fallback_loop(ctx: &mut EngineWorkerRefs<'_>) {
|
|||||||
has_new_raw_frame,
|
has_new_raw_frame,
|
||||||
has_video_stream,
|
has_video_stream,
|
||||||
last_frame_id,
|
last_frame_id,
|
||||||
|
frame_received_at,
|
||||||
&mut fps_counter,
|
&mut fps_counter,
|
||||||
&mut fps_timer,
|
&mut fps_timer,
|
||||||
&mut last_preview_push,
|
&mut last_preview_push,
|
||||||
|
|||||||
@@ -667,6 +667,7 @@ pub fn compose_osd_and_publish(
|
|||||||
has_new_raw_frame: bool,
|
has_new_raw_frame: bool,
|
||||||
has_video_stream: bool,
|
has_video_stream: bool,
|
||||||
last_frame_id: u64,
|
last_frame_id: u64,
|
||||||
|
frame_received_at: Option<Instant>,
|
||||||
fps_counter: &mut u32,
|
fps_counter: &mut u32,
|
||||||
fps_timer: &mut Instant,
|
fps_timer: &mut Instant,
|
||||||
last_preview_push: &mut Option<Instant>,
|
last_preview_push: &mut Option<Instant>,
|
||||||
@@ -801,8 +802,10 @@ pub fn compose_osd_and_publish(
|
|||||||
let push_preview = ctx.control.is_preview_active()
|
let push_preview = ctx.control.is_preview_active()
|
||||||
&& last_preview_push.is_none_or(|t| t.elapsed() >= Duration::from_millis(33));
|
&& last_preview_push.is_none_or(|t| t.elapsed() >= Duration::from_millis(33));
|
||||||
|
|
||||||
|
if push_preview || fps_timer.elapsed() >= Duration::from_secs(1) || frame_received_at.is_some() {
|
||||||
if push_preview || fps_timer.elapsed() >= Duration::from_secs(1) {
|
if push_preview || fps_timer.elapsed() >= Duration::from_secs(1) {
|
||||||
sync_video_status(ctx.cfg, ctx.video_rx_opt, &ctx.shared.monitor);
|
sync_video_status(ctx.cfg, ctx.video_rx_opt, &ctx.shared.monitor);
|
||||||
|
}
|
||||||
let preview_arc = if push_preview {
|
let preview_arc = if push_preview {
|
||||||
*last_preview_push = Some(Instant::now());
|
*last_preview_push = Some(Instant::now());
|
||||||
// Conversion directe RGBA -> BGRA sur le worker (zéro swizzle/clone sur le thread UI GPUI)
|
// Conversion directe RGBA -> BGRA sur le worker (zéro swizzle/clone sur le thread UI GPUI)
|
||||||
@@ -812,6 +815,14 @@ pub fn compose_osd_and_publish(
|
|||||||
None
|
None
|
||||||
};
|
};
|
||||||
let mut mon = ctx.shared.monitor.lock();
|
let mut mon = ctx.shared.monitor.lock();
|
||||||
|
if let Some(recv_at) = frame_received_at {
|
||||||
|
let eng_ms = recv_at.elapsed().as_secs_f32() * 1000.0;
|
||||||
|
mon.video_engine_latency_ms = if mon.video_engine_latency_ms <= 0.01 {
|
||||||
|
eng_ms
|
||||||
|
} else {
|
||||||
|
mon.video_engine_latency_ms * 0.8 + eng_ms * 0.2
|
||||||
|
};
|
||||||
|
}
|
||||||
if fps_timer.elapsed() >= Duration::from_secs(1) {
|
if fps_timer.elapsed() >= Duration::from_secs(1) {
|
||||||
if has_video_stream {
|
if has_video_stream {
|
||||||
mon.video_fps = *fps_counter as f32 / fps_timer.elapsed().as_secs_f32();
|
mon.video_fps = *fps_counter as f32 / fps_timer.elapsed().as_secs_f32();
|
||||||
@@ -840,6 +851,7 @@ pub fn compose_osd_and_publish(
|
|||||||
mon.preview_width = ctx.cfg.video_width;
|
mon.preview_width = ctx.cfg.video_width;
|
||||||
mon.preview_height = ctx.cfg.video_height;
|
mon.preview_height = ctx.cfg.video_height;
|
||||||
mon.preview_bgra = arc;
|
mon.preview_bgra = arc;
|
||||||
|
mon.preview_received_at = frame_received_at;
|
||||||
mon.preview_frame_seq = mon.preview_frame_seq.wrapping_add(1);
|
mon.preview_frame_seq = mon.preview_frame_seq.wrapping_add(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,9 +65,11 @@ pub struct RuntimeMonitor {
|
|||||||
pub dmabuf_active: bool,
|
pub dmabuf_active: bool,
|
||||||
pub video_fps: f32,
|
pub video_fps: f32,
|
||||||
pub video_jitter_ms: f32,
|
pub video_jitter_ms: f32,
|
||||||
|
pub video_engine_latency_ms: f32,
|
||||||
pub video_dropped_frames: u64,
|
pub video_dropped_frames: u64,
|
||||||
pub video_decoder_name: String,
|
pub video_decoder_name: String,
|
||||||
pub video_frames_total: u64,
|
pub video_frames_total: u64,
|
||||||
|
pub preview_received_at: Option<Instant>,
|
||||||
pub latest_head_pose: HeadPoseSample,
|
pub latest_head_pose: HeadPoseSample,
|
||||||
pub latest_telemetry: TelemetryState,
|
pub latest_telemetry: TelemetryState,
|
||||||
pub latest_g29: G29State,
|
pub latest_g29: G29State,
|
||||||
@@ -104,9 +106,11 @@ impl Default for RuntimeMonitor {
|
|||||||
dmabuf_active: false,
|
dmabuf_active: false,
|
||||||
video_fps: 0.0,
|
video_fps: 0.0,
|
||||||
video_jitter_ms: 0.0,
|
video_jitter_ms: 0.0,
|
||||||
|
video_engine_latency_ms: 0.0,
|
||||||
video_dropped_frames: 0,
|
video_dropped_frames: 0,
|
||||||
video_decoder_name: "auto".to_string(),
|
video_decoder_name: "auto".to_string(),
|
||||||
video_frames_total: 0,
|
video_frames_total: 0,
|
||||||
|
preview_received_at: None,
|
||||||
latest_head_pose: HeadPoseSample::default(),
|
latest_head_pose: HeadPoseSample::default(),
|
||||||
latest_telemetry: TelemetryState::default(),
|
latest_telemetry: TelemetryState::default(),
|
||||||
latest_g29: G29State::default(),
|
latest_g29: G29State::default(),
|
||||||
|
|||||||
@@ -546,6 +546,7 @@ pub fn try_run_openxr_session(ctx: &mut EngineWorkerRefs<'_>) -> Result<()> {
|
|||||||
let mut has_new_raw_frame = false;
|
let mut has_new_raw_frame = false;
|
||||||
let mut has_video_stream = false;
|
let mut has_video_stream = false;
|
||||||
let mut taken_dmabuf: Option<DmaBufFrame> = None;
|
let mut taken_dmabuf: Option<DmaBufFrame> = None;
|
||||||
|
let mut frame_received_at: Option<Instant> = None;
|
||||||
|
|
||||||
if let Some(rx) = ctx.video_rx_opt {
|
if let Some(rx) = ctx.video_rx_opt {
|
||||||
rx.set_dmabuf_handoff(want_dmabuf);
|
rx.set_dmabuf_handoff(want_dmabuf);
|
||||||
@@ -559,6 +560,7 @@ pub fn try_run_openxr_session(ctx: &mut EngineWorkerRefs<'_>) -> Result<()> {
|
|||||||
if d.width == ctx.cfg.video_width && d.height == ctx.cfg.video_height {
|
if d.width == ctx.cfg.video_width && d.height == ctx.cfg.video_height {
|
||||||
last_frame_id = d.frame_id;
|
last_frame_id = d.frame_id;
|
||||||
raw_frame_format = d.format;
|
raw_frame_format = d.format;
|
||||||
|
frame_received_at = Some(d.received_at);
|
||||||
fps_counter += 1;
|
fps_counter += 1;
|
||||||
has_new_raw_frame = true;
|
has_new_raw_frame = true;
|
||||||
taken_dmabuf = Some(d);
|
taken_dmabuf = Some(d);
|
||||||
@@ -579,6 +581,7 @@ pub fn try_run_openxr_session(ctx: &mut EngineWorkerRefs<'_>) -> Result<()> {
|
|||||||
{
|
{
|
||||||
last_frame_id = meta.frame_id;
|
last_frame_id = meta.frame_id;
|
||||||
raw_frame_format = meta.format;
|
raw_frame_format = meta.format;
|
||||||
|
frame_received_at = Some(meta.received_at);
|
||||||
fps_counter += 1;
|
fps_counter += 1;
|
||||||
has_new_raw_frame = true;
|
has_new_raw_frame = true;
|
||||||
}
|
}
|
||||||
@@ -662,6 +665,7 @@ pub fn try_run_openxr_session(ctx: &mut EngineWorkerRefs<'_>) -> Result<()> {
|
|||||||
has_new_raw_frame,
|
has_new_raw_frame,
|
||||||
has_video_stream,
|
has_video_stream,
|
||||||
last_frame_id,
|
last_frame_id,
|
||||||
|
frame_received_at,
|
||||||
&mut fps_counter,
|
&mut fps_counter,
|
||||||
&mut fps_timer,
|
&mut fps_timer,
|
||||||
&mut last_preview_push,
|
&mut last_preview_push,
|
||||||
|
|||||||
@@ -45,6 +45,14 @@ fn install_signal_handlers() {
|
|||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
install_signal_handlers();
|
install_signal_handlers();
|
||||||
let mut cfg = AppConfig::parse_with_saved();
|
let mut cfg = AppConfig::parse_with_saved();
|
||||||
|
if cfg.gst_latency_trace {
|
||||||
|
if std::env::var_os("GST_TRACERS").is_none() {
|
||||||
|
std::env::set_var("GST_TRACERS", "latency(flags=pipeline+element)");
|
||||||
|
}
|
||||||
|
if std::env::var_os("GST_DEBUG").is_none() {
|
||||||
|
std::env::set_var("GST_DEBUG", "GST_TRACER:7");
|
||||||
|
}
|
||||||
|
}
|
||||||
let log_buffer = GuiLogger::init(&cfg.log_file);
|
let log_buffer = GuiLogger::init(&cfg.log_file);
|
||||||
|
|
||||||
let mode_label = if cfg.vr_only {
|
let mode_label = if cfg.vr_only {
|
||||||
|
|||||||
+70
-1
@@ -125,7 +125,12 @@ impl SteamFrameGpuiApp {
|
|||||||
.rounded_md()
|
.rounded_md()
|
||||||
.text_xs()
|
.text_xs()
|
||||||
.text_color(rgb(COLOR_TEXT_MUTED))
|
.text_color(rgb(COLOR_TEXT_MUTED))
|
||||||
.child(format!("{} trames", self.video_frames_total)),
|
.child(format!(
|
||||||
|
"{} trames • PC {:.1} ms (moteur {:.1} ms)",
|
||||||
|
self.video_frames_total,
|
||||||
|
self.video_pc_latency_ms,
|
||||||
|
self.video_engine_latency_ms
|
||||||
|
)),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
// 2.3 Overlay Supérieur Droit (VR & Format)
|
// 2.3 Overlay Supérieur Droit (VR & Format)
|
||||||
@@ -185,6 +190,35 @@ impl SteamFrameGpuiApp {
|
|||||||
"⏮ Replay 30s".to_string()
|
"⏮ Replay 30s".to_string()
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
.child(
|
||||||
|
div()
|
||||||
|
.id("btn_toggle_g2g")
|
||||||
|
.px_2p5()
|
||||||
|
.py_1()
|
||||||
|
.bg(rgba(0x0a101abb))
|
||||||
|
.border_1()
|
||||||
|
.border_color(if self.glass_to_glass_test {
|
||||||
|
rgb(COLOR_CYAN)
|
||||||
|
} else {
|
||||||
|
rgb(COLOR_BORDER_SUBTLE)
|
||||||
|
})
|
||||||
|
.rounded_md()
|
||||||
|
.text_xs()
|
||||||
|
.text_color(if self.glass_to_glass_test {
|
||||||
|
rgb(COLOR_CYAN)
|
||||||
|
} else {
|
||||||
|
rgb(COLOR_TEXT_MUTED)
|
||||||
|
})
|
||||||
|
.cursor_pointer()
|
||||||
|
.on_click(cx.listener(|this, _, _, cx| {
|
||||||
|
this.glass_to_glass_test = !this.glass_to_glass_test;
|
||||||
|
if this.glass_to_glass_test {
|
||||||
|
this.glass_to_glass_t0 = std::time::Instant::now();
|
||||||
|
}
|
||||||
|
cx.notify();
|
||||||
|
}))
|
||||||
|
.child("⏱️ Chrono G2G"),
|
||||||
|
)
|
||||||
.child(
|
.child(
|
||||||
div()
|
div()
|
||||||
.id("btn_toggle_hud")
|
.id("btn_toggle_hud")
|
||||||
@@ -208,6 +242,41 @@ impl SteamFrameGpuiApp {
|
|||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
// 2.3b Chrono haute précision pour mesure Glass-to-Glass (filmer l'écran avec la caméra FPV)
|
||||||
|
.when(self.glass_to_glass_test, |el| {
|
||||||
|
let elapsed_ms = self.glass_to_glass_t0.elapsed().as_millis();
|
||||||
|
let secs = elapsed_ms / 1000;
|
||||||
|
let ms = elapsed_ms % 1000;
|
||||||
|
el.child(
|
||||||
|
div()
|
||||||
|
.absolute()
|
||||||
|
.top_12()
|
||||||
|
.left_3()
|
||||||
|
.px_4()
|
||||||
|
.py_2()
|
||||||
|
.bg(rgb(0x000000))
|
||||||
|
.border_2()
|
||||||
|
.border_color(rgb(COLOR_CYAN))
|
||||||
|
.rounded_lg()
|
||||||
|
.flex()
|
||||||
|
.flex_col()
|
||||||
|
.gap_1()
|
||||||
|
.child(
|
||||||
|
div()
|
||||||
|
.text_xs()
|
||||||
|
.font_weight(gpui::FontWeight::BOLD)
|
||||||
|
.text_color(rgb(COLOR_CYAN))
|
||||||
|
.child("⏱️ TEST GLASS-TO-GLASS (pointer la caméra FPV ici)"),
|
||||||
|
)
|
||||||
|
.child(
|
||||||
|
div()
|
||||||
|
.text_2xl()
|
||||||
|
.font_weight(gpui::FontWeight::BOLD)
|
||||||
|
.text_color(rgb(0xffffff))
|
||||||
|
.child(format!("{:04}.{:03} s", secs, ms)),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
})
|
||||||
// 2.4 Bandeau Flottant Inférieur (HUD Télémetrie & Suivi Tête discret)
|
// 2.4 Bandeau Flottant Inférieur (HUD Télémetrie & Suivi Tête discret)
|
||||||
.child(if self.show_hud_overlay {
|
.child(if self.show_hud_overlay {
|
||||||
div()
|
div()
|
||||||
|
|||||||
+30
-3
@@ -78,9 +78,13 @@ pub struct SteamFrameGpuiApp {
|
|||||||
dmabuf_active: bool,
|
dmabuf_active: bool,
|
||||||
video_fps: f32,
|
video_fps: f32,
|
||||||
video_jitter_ms: f32,
|
video_jitter_ms: f32,
|
||||||
|
video_engine_latency_ms: f32,
|
||||||
|
video_pc_latency_ms: f32,
|
||||||
video_dropped_frames: u64,
|
video_dropped_frames: u64,
|
||||||
video_decoder_name: String,
|
video_decoder_name: String,
|
||||||
video_frames_total: u64,
|
video_frames_total: u64,
|
||||||
|
glass_to_glass_test: bool,
|
||||||
|
glass_to_glass_t0: Instant,
|
||||||
latest_pose: HeadPoseSample,
|
latest_pose: HeadPoseSample,
|
||||||
latest_telem: TelemetryState,
|
latest_telem: TelemetryState,
|
||||||
latest_g29: G29State,
|
latest_g29: G29State,
|
||||||
@@ -159,9 +163,13 @@ impl SteamFrameGpuiApp {
|
|||||||
dmabuf_active: false,
|
dmabuf_active: false,
|
||||||
video_fps: 0.0,
|
video_fps: 0.0,
|
||||||
video_jitter_ms: 0.0,
|
video_jitter_ms: 0.0,
|
||||||
|
video_engine_latency_ms: 0.0,
|
||||||
|
video_pc_latency_ms: 0.0,
|
||||||
video_dropped_frames: 0,
|
video_dropped_frames: 0,
|
||||||
video_decoder_name: "auto".to_string(),
|
video_decoder_name: "auto".to_string(),
|
||||||
video_frames_total: 0,
|
video_frames_total: 0,
|
||||||
|
glass_to_glass_test: false,
|
||||||
|
glass_to_glass_t0: Instant::now(),
|
||||||
latest_pose: HeadPoseSample::default(),
|
latest_pose: HeadPoseSample::default(),
|
||||||
latest_telem: TelemetryState::default(),
|
latest_telem: TelemetryState::default(),
|
||||||
latest_g29: G29State::default(),
|
latest_g29: G29State::default(),
|
||||||
@@ -257,11 +265,13 @@ impl SteamFrameGpuiApp {
|
|||||||
}
|
}
|
||||||
if (self.video_fps - mon.video_fps).abs() > 0.1
|
if (self.video_fps - mon.video_fps).abs() > 0.1
|
||||||
|| (self.video_jitter_ms - mon.video_jitter_ms).abs() > 0.1
|
|| (self.video_jitter_ms - mon.video_jitter_ms).abs() > 0.1
|
||||||
|
|| (self.video_engine_latency_ms - mon.video_engine_latency_ms).abs() > 0.2
|
||||||
|| self.video_dropped_frames != mon.video_dropped_frames
|
|| self.video_dropped_frames != mon.video_dropped_frames
|
||||||
|| self.video_decoder_name != mon.video_decoder_name
|
|| self.video_decoder_name != mon.video_decoder_name
|
||||||
{
|
{
|
||||||
self.video_fps = mon.video_fps;
|
self.video_fps = mon.video_fps;
|
||||||
self.video_jitter_ms = mon.video_jitter_ms;
|
self.video_jitter_ms = mon.video_jitter_ms;
|
||||||
|
self.video_engine_latency_ms = mon.video_engine_latency_ms;
|
||||||
self.video_dropped_frames = mon.video_dropped_frames;
|
self.video_dropped_frames = mon.video_dropped_frames;
|
||||||
self.video_decoder_name = mon.video_decoder_name.clone();
|
self.video_decoder_name = mon.video_decoder_name.clone();
|
||||||
changed = true;
|
changed = true;
|
||||||
@@ -321,13 +331,18 @@ impl SteamFrameGpuiApp {
|
|||||||
self.latest_controller = mon.latest_controller.clone();
|
self.latest_controller = mon.latest_controller.clone();
|
||||||
|
|
||||||
// Récupération directe du tampon BGRA pré-converti par le worker (zéro swizzle UI)
|
// Récupération directe du tampon BGRA pré-converti par le worker (zéro swizzle UI)
|
||||||
let frame_data: Option<(u32, u32, Arc<Vec<u8>>)> = if self.active_tab == ActiveTab::Cockpit
|
let frame_data: Option<(u32, u32, Arc<Vec<u8>>, Option<Instant>)> = if self.active_tab == ActiveTab::Cockpit
|
||||||
&& mon.preview_frame_seq != self.last_frame_seq
|
&& mon.preview_frame_seq != self.last_frame_seq
|
||||||
&& !mon.preview_bgra.is_empty()
|
&& !mon.preview_bgra.is_empty()
|
||||||
&& mon.preview_width > 0
|
&& mon.preview_width > 0
|
||||||
&& mon.preview_height > 0
|
&& mon.preview_height > 0
|
||||||
{
|
{
|
||||||
Some((mon.preview_width, mon.preview_height, Arc::clone(&mon.preview_bgra)))
|
Some((
|
||||||
|
mon.preview_width,
|
||||||
|
mon.preview_height,
|
||||||
|
Arc::clone(&mon.preview_bgra),
|
||||||
|
mon.preview_received_at,
|
||||||
|
))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
@@ -346,7 +361,7 @@ impl SteamFrameGpuiApp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 2. Upload RenderImage GPU direct (pixels déjà en BGRA — plus de swizzle CPU sur thread UI)
|
// 2. Upload RenderImage GPU direct (pixels déjà en BGRA — plus de swizzle CPU sur thread UI)
|
||||||
if let Some((w, h, bgra_arc)) = new_frame_data {
|
if let Some((w, h, bgra_arc, recv_at_opt)) = new_frame_data {
|
||||||
let bgra_buf = match Arc::try_unwrap(bgra_arc) {
|
let bgra_buf = match Arc::try_unwrap(bgra_arc) {
|
||||||
Ok(v) => v,
|
Ok(v) => v,
|
||||||
Err(shared) => (*shared).clone(),
|
Err(shared) => (*shared).clone(),
|
||||||
@@ -360,6 +375,14 @@ impl SteamFrameGpuiApp {
|
|||||||
}
|
}
|
||||||
self.current_render_image = Some(new_render_image);
|
self.current_render_image = Some(new_render_image);
|
||||||
self.last_frame_seq = preview_frame_seq;
|
self.last_frame_seq = preview_frame_seq;
|
||||||
|
if let Some(recv_at) = recv_at_opt {
|
||||||
|
let pc_ms = recv_at.elapsed().as_secs_f32() * 1000.0;
|
||||||
|
self.video_pc_latency_ms = if self.video_pc_latency_ms <= 0.01 {
|
||||||
|
pc_ms
|
||||||
|
} else {
|
||||||
|
self.video_pc_latency_ms * 0.8 + pc_ms * 0.2
|
||||||
|
};
|
||||||
|
}
|
||||||
changed = true;
|
changed = true;
|
||||||
|
|
||||||
while self.images_to_drop.len() > 2 {
|
while self.images_to_drop.len() > 2 {
|
||||||
@@ -393,6 +416,10 @@ impl SteamFrameGpuiApp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if self.glass_to_glass_test && self.active_tab == ActiveTab::Cockpit {
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
changed
|
changed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-2
@@ -149,8 +149,11 @@ impl SteamFrameGpuiApp {
|
|||||||
"🎥 LIEN VIDÉO",
|
"🎥 LIEN VIDÉO",
|
||||||
&format!("{:.1} FPS", self.video_fps),
|
&format!("{:.1} FPS", self.video_fps),
|
||||||
&format!(
|
&format!(
|
||||||
"Jitter {:.1} ms • Drop {} • {}",
|
"Jitter {:.1} ms • PC {:.1} ms (mot. {:.1} ms) • Drop {}",
|
||||||
self.video_jitter_ms, self.video_dropped_frames, self.video_decoder_name
|
self.video_jitter_ms,
|
||||||
|
self.video_pc_latency_ms,
|
||||||
|
self.video_engine_latency_ms,
|
||||||
|
self.video_dropped_frames
|
||||||
),
|
),
|
||||||
if self.video_fps > 1.0 { COLOR_CYAN } else { COLOR_TEXT_MUTED },
|
if self.video_fps > 1.0 { COLOR_CYAN } else { COLOR_TEXT_MUTED },
|
||||||
))
|
))
|
||||||
|
|||||||
Reference in new issue
Block a user