ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
render.c File Reference

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 common/session/render.c.

Variable Documentation

◆ g_snapshot_actual_duration_ms

uint64_t g_snapshot_actual_duration_ms = 0

Definition at line 52 of file common/session/render.c.

Referenced by ffmpeg_encoder_destroy(), and ffmpeg_encoder_write_frame().

◆ g_snapshot_first_capture_ns

uint64_t g_snapshot_first_capture_ns = 0

Definition at line 51 of file 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 49 of file common/session/render.c.

Referenced by session_display_write_ascii(), and session_render_loop().

◆ g_snapshot_first_frame_rendered_ns

uint64_t g_snapshot_first_frame_rendered_ns = 0

Definition at line 50 of file common/session/render.c.

Referenced by session_display_write_ascii(), and session_render_loop().

◆ g_snapshot_last_capture_elapsed_ns

uint64_t g_snapshot_last_capture_elapsed_ns = 0

Definition at line 53 of file common/session/render.c.

Referenced by ffmpeg_encoder_write_frame().