|
| platf::mem_type_e | video::map_base_dev_type (AVHWDeviceType type) |
| platf::pix_fmt_e | video::map_pix_fmt (AVPixelFormat fmt) |
| void | video::free_ctx (AVCodecContext *ctx) |
| void | video::free_frame (AVFrame *frame) |
| void | video::free_buffer (AVBufferRef *ref) |
| bool | video::pyrowave_available () |
| std::size_t | video::pyrowave_frame_budget (const config_t &config) |
| | The most bytes one PyroWave frame may take.
|
| void | video::capture (safe::mail_t mail, config_t config, void *channel_data) |
| bool | video::validate_encoder (encoder_t &encoder, bool expect_failure) |
| bool | video::display_present () |
| | Whether the host has a display to capture without creating one.
|
| int | video::probe_encoders () |
| | Probe encoders and select the preferred encoder. This is called once at startup and each time a stream is launched to ensure the best encoder is selected. Encoder availability can change at runtime due to all sorts of things from driver updates to eGPUs.
|
| std::optional< capture_readiness_mode_t > | video::choose_capture_readiness_mode (bool client_hdr_requested, bool display_hdr, bool hevc_hdr_supported, bool av1_hdr_supported) |
| | Choose a readiness mode without ever encoding PQ scanout as SDR.
|
| int | video::check_capture_path (const config_t &stream, std::string &failure, const std::string &client={}) |
| | Run one real frame through the path a stream will use.
|
| capture_readiness_t | video::last_capture_readiness () |
| | The result of the last check_capture_path().
|
| void | video::forget_capture_readiness (const std::string &client) |
| | Forget the last check if it was for client's launch: a later launch of theirs ran without one, so it says nothing about that stream.
|
| int | video::probe_encoders_without_display () |
| | Probe encoders without opening any screen.
|
| encoder_status_t | video::get_encoder_status () |
| | Snapshot of the last encoder probe result (thread-safe copy).
|
| void | video::metrics_record_frame (double encode_ms, double capture_to_encode_ms, size_t packet_bytes) |
| | Record one encoded frame's timings and output size.
|
| void | video::metrics_record_drop () |
| | Record one dropped frame (encoder error/timeout).
|
| void | video::metrics_reset () |
| | Reset pipeline metrics at the start of a streaming session.
|
| void | video::metrics_set_resolution (int width, int height) |
| | Record the active stream resolution for diagnostics.
|
| pipeline_metrics_t | video::get_pipeline_metrics () |
| | Snapshot of the live pipeline metrics (thread-safe copy).
|
Declarations for video.
Definition in file video.h.
| int video::check_capture_path |
( |
const config_t & | stream, |
|
|
std::string & | failure, |
|
|
const std::string & | client = {} ) |
Run one real frame through the path a stream will use.
Opens the display, captures a frame from it, converts it on the encoder's device and encodes it, with the encoder already chosen. Done before a client is told the stream is ready, so a broken step is named then rather than shown as a black stream.
- Parameters
-
| stream | The stream's capture settings: display_name (empty for the process-wide display), frame rate and client HDR request. The check chooses its own size and a codec matching the effective display color. |
| failure | Set to the failed step and its reason. |
| client | The paired client whose launch this check is for. |
- Returns
- 0 when a frame went all the way through, or when the display produced no new frame in time (logged; a static screen may not); -1 when a step failed.
Definition at line 3199 of file video.cpp.
| int video::probe_encoders_without_display |
( |
| ) |
|
Probe encoders without opening any screen.
For when no screen can be captured - every monitor asleep, say. Creating a virtual output instead would wake every monitor the compositor has, so the encoders are validated on a display with nothing behind it.
- Returns
- 0 on success, -1 if no encoder works.
Definition at line 3224 of file video.cpp.
| std::size_t video::pyrowave_frame_budget |
( |
const config_t & | config | ) |
|
The most bytes one PyroWave frame may take.
PyroWave's rate control is a per-frame ceiling, so the client's bitrate is spread evenly over its frame rate. It never exceeds an uncompressed 4:2:0 frame, which the encoder has no use for, and never drops below 16 KiB, where every frame would be a smear.
Definition at line 355 of file video.cpp.