Image source structure for multi-client video mixing.
Represents a single video source (client) in the video mixing pipeline. This structure is used to collect video frames from all active clients
before creating composite layouts for multi-user display.
- image: Pointer to the client's current video frame (image_t structure)
- client_id: Unique identifier for this client
- has_video: Whether this client is actively sending video
USAGE PATTERN:
- Collect video sources: collect_video_sources() fills array with active clients
- Filter sources: Only sources with has_video=true are used in composite
- Create composite: generate_composite_frame() uses sources to create layout
- Free sources: Sources are automatically cleaned up after composite generation
VIDEO MIXING:
This structure is central to the multi-client video mixing system:
- Single client: One source, full-screen display
- Multiple clients: Multiple sources, grid layout (2x2, 3x3, etc.)
- Grid layout: Each source occupies one cell in the grid
- Aspect ratio: Each source maintains its aspect ratio within cell
MEMORY MANAGEMENT:
- image pointer points to frame data managed by video_frame_buffer_t
- Frame data is owned by the double-buffer system, not this structure
- No manual memory management needed (automatic via buffer system)
- Note
- image pointer is valid only when has_video is true.
-
image pointer may be NULL if client stopped sending video.
-
client_id is used to identify which client this source represents.
Definition at line 204 of file stream.c.