|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
📹 Webcam video capture and transmission to server More...
Files | |
| file | capture.c |
| 📹 Client webcam capture: dedicated capture thread with frame rate limiting and network transmission | |
| file | capture.h |
| ascii-chat Client Media Capture Management Interface | |
Functions | |
| int | capture_init () |
| Initialize capture subsystem. | |
| int | capture_start_thread () |
| Start capture thread. | |
| void | capture_stop_thread () |
| Stop capture thread. | |
| bool | capture_thread_exited () |
| Check if capture thread has exited. | |
| void | capture_cleanup () |
| Cleanup capture subsystem. | |
📹 Webcam video capture and transmission to server
The media capture subsystem manages webcam video capture, frame compression, and transmission to the server. Supports platform-specific webcam backends and test pattern mode for testing without hardware.
Implementation: src/client/capture.c, src/client/capture.h
Webcam Backends:
Snapshot mode (--snapshot, --snapshot-delay <seconds>):
--snapshot: Capture single frame and exit--snapshot-delay N: Capture for N seconds then exitTest pattern mode (--test-pattern):
| void capture_cleanup | ( | ) |
#include <capture.c>
Cleanup capture subsystem.
Cleanup capture subsystem
Stops capture thread and cleans up media source resources. Called during client shutdown.
Definition at line 485 of file src/client/capture.c.
References capture_stop_thread(), and session_capture_destroy().
Referenced by client_crypto_handshake().
| int capture_init | ( | ) |
#include <capture.c>
Initialize capture subsystem.
Initialize capture subsystem
Sets up media source (webcam, file, or stdin) and prepares capture system for operation. Must be called once during client initialization.
Definition at line 346 of file src/client/capture.c.
References audio_get_context(), CAPTURE_TARGET_FPS, safe_snprintf(), and session_capture_create().
| int capture_start_thread | ( | ) |
#include <capture.c>
Start capture thread.
Start capture thread
Creates and starts the webcam capture thread. Also sends stream start notification to server.
Definition at line 416 of file src/client/capture.c.
References g_client_worker_pool, thread_pool_spawn(), and threaded_send_stream_start_packet().
Referenced by protocol_start_connection().
| void capture_stop_thread | ( | ) |
#include <capture.c>
Stop capture thread.
Stop capture thread
Gracefully stops the capture thread and cleans up resources. Safe to call multiple times.
Definition at line 448 of file src/client/capture.c.
References platform_sleep_us().
Referenced by capture_cleanup(), and protocol_stop_connection().
| bool capture_thread_exited | ( | ) |
#include <capture.c>
Check if capture thread has exited.
Check if capture thread has exited
Definition at line 474 of file src/client/capture.c.