pub struct WlEncodeControls {
pub(crate) rate_dirty: AtomicBool,
pub(crate) bitrate_kbps: AtomicI32,
pub(crate) vbv_mult_milli: AtomicI32,
pub(crate) fps_bits: AtomicU64,
pub(crate) link_kbps: AtomicI32,
pub(crate) force_idr: AtomicBool,
pub(crate) scanout_refused: AtomicBool,
pub(crate) scanout_planes: AtomicU32,
pub(crate) reference_reports: Mutex<Vec<ReferenceReport>>,
pub(crate) tunables_dirty: AtomicBool,
pub(crate) tunables: Mutex<Option<LiveTunables>>,
}Expand description
Cross-thread controls for the Wayland encode thread, the X11 Controls scheme: the
UpdateRate handler stores the current values then flips rate_dirty with Release; the
encode thread swaps it with Acquire and re-reads the payload, never seeing it half-applied.
force_idr is swapped just before each encode, so an on-demand keyframe lands on the
frame ALREADY in flight instead of waiting one pipeline stage for the next publish.
reference_reports are what clients said of frames (lost, or held by every one of them),
drained ahead of the same encode.
Fields§
§rate_dirty: AtomicBool§bitrate_kbps: AtomicI32§vbv_mult_milli: AtomicI32§fps_bits: AtomicU64§link_kbps: AtomicI32The rate the path carries (CaptureSettings::video_link_kbps), read every frame.
force_idr: AtomicBool§scanout_refused: AtomicBoolThe zero-copy session refused a client’s buffer handed to it as it stood (a layout its driver does not import), so the capture composites every frame from then on.
scanout_planes: AtomicU32The planes of one client dmabuf the session’s encoder imports as it stands
(FrameEncoder::dmabuf_planes), published by the encode thread; a buffer of more planes
is composited.
reference_reports: Mutex<Vec<ReferenceReport>>§tunables_dirty: AtomicBoolPending per-frame tunables for the encode thread (mutex, not atomics: one struct, set rarely, read only when the dirty flag says so).
tunables: Mutex<Option<LiveTunables>>Implementations§
Auto Trait Implementations§
impl !Freeze for WlEncodeControls
impl RefUnwindSafe for WlEncodeControls
impl Send for WlEncodeControls
impl Sync for WlEncodeControls
impl Unpin for WlEncodeControls
impl UnsafeUnpin for WlEncodeControls
impl UnwindSafe for WlEncodeControls
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more