ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches

Unified render loop implementation for all display modes. More...

Go to the source code of this file.

Functions

asciichat_error_t session_render_loop (session_capture_ctx_t *capture, session_display_ctx_t *display, session_should_exit_fn should_exit, session_capture_fn capture_cb, session_sleep_for_frame_fn sleep_cb, session_keyboard_handler_fn keyboard_handler, void *user_data)
 Unified render loop for all display modes.

Variables

bool g_snapshot_first_frame_rendered = false
 Snapshot mode global timing variables Used to track actual duration when snapshot mode is active.
uint64_t g_snapshot_first_frame_rendered_ns = 0
uint64_t g_snapshot_first_capture_ns = 0
uint64_t g_snapshot_actual_duration_ms = 0
uint64_t g_snapshot_last_capture_elapsed_ns = 0

Detailed Description

Unified render loop implementation for all display modes.

Provides a single, centralized render loop that supports both synchronous and event-driven modes. All display modes (mirror, client, discovery) use this loop.

Author
Zachary Fogg me@zf.nosp@m.o.gg
Date
January 2026

Definition in file src/common/session/render.c.

Variable Documentation

◆ g_snapshot_actual_duration_ms

uint64_t g_snapshot_actual_duration_ms = 0

Definition at line 57 of file src/common/session/render.c.

Referenced by ffmpeg_encoder_write_frame(), and session_render_loop().

◆ g_snapshot_first_capture_ns

uint64_t g_snapshot_first_capture_ns = 0

Definition at line 56 of file src/common/session/render.c.

Referenced by session_render_loop().

◆ g_snapshot_first_frame_rendered

bool g_snapshot_first_frame_rendered = false

Snapshot mode global timing variables Used to track actual duration when snapshot mode is active.

Definition at line 54 of file src/common/session/render.c.

Referenced by session_display_write_ascii_frame(), and session_render_loop().

◆ g_snapshot_first_frame_rendered_ns

uint64_t g_snapshot_first_frame_rendered_ns = 0

◆ g_snapshot_last_capture_elapsed_ns

uint64_t g_snapshot_last_capture_elapsed_ns = 0

Definition at line 58 of file src/common/session/render.c.

Referenced by ffmpeg_encoder_write_frame().