pub(crate) struct WlEncodeConfig {Show 13 fields
pub(crate) settings: CaptureSettings,
pub(crate) display_id: u32,
pub(crate) use_gpu: bool,
pub(crate) try_gpu: bool,
pub(crate) prior: Option<FrameEncoder>,
pub(crate) predecessor: Option<JoinHandle<Option<FrameEncoder>>>,
pub(crate) zero_copy: Option<ZeroCopySession>,
pub(crate) host: bool,
pub(crate) recording_sink: Option<Weak<RecordingSink>>,
pub(crate) deliver_tx: SyncSender<Vec<EncodedStripe>>,
pub(crate) controls: Arc<WlEncodeControls>,
pub(crate) stats: Arc<WlEncodeStats>,
pub(crate) report: Arc<StreamReport>,
}Expand description
Everything the Wayland encode thread needs, fixed for the life of one capture (a
StartCapture reconfigure tears the thread down and spawns a fresh one). Rate changes
flow through controls; damage and the IDR request arrive per-frame in WlFrame.
Fields§
§settings: CaptureSettings§display_id: u32Output/display id this encode loop serves; keys the recorder’s delivery-layer tap.
use_gpu: boolGLES readback is RGBA; the pixman framebuffer is BGRA. Selects CSC + encoder input kind.
try_gpu: boolAttempt a HW (NVENC/VAAPI) readback session before falling back to the CPU encoders.
prior: Option<FrameEncoder>HW session handed back by the previous encode thread; reconfigured in place and reused when still compatible, sparing the stream a session rebuild.
predecessor: Option<JoinHandle<Option<FrameEncoder>>>The outgoing encode thread of a capture being restarted, joined here — off the calloop — before this thread builds anything. Everything the predecessor did therefore precedes everything this thread does, and its readback hardware session is inherited rather than rebuilt.
zero_copy: Option<ZeroCopySession>The zero-copy session this thread drives in place of building a readback one.
host: boolThe frames are a host compositor’s (host capture), traced as they encode.
recording_sink: Option<Weak<RecordingSink>>Weak, so the calloop’s teardown owns the sink’s lifetime: a strong handle held here could outlive the capture and unlink a successor’s freshly bound socket path.
deliver_tx: SyncSender<Vec<EncodedStripe>>§controls: Arc<WlEncodeControls>§stats: Arc<WlEncodeStats>§report: Arc<StreamReport>Auto Trait Implementations§
impl !RefUnwindSafe for WlEncodeConfig
impl !Sync for WlEncodeConfig
impl !UnwindSafe for WlEncodeConfig
impl Freeze for WlEncodeConfig
impl Send for WlEncodeConfig
impl Unpin for WlEncodeConfig
impl UnsafeUnpin for WlEncodeConfig
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> 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