Skip to main content
QAROS Rust API Dev (main) · versions: Dev (main) · Developer Guide

D3D11Frame

Struct D3D11Frame 

Source
pub struct D3D11Frame<'borrow> { /* private fields */ }
Expand description

A copy of the sender’s D3D11 frame record (qar_render_sender_frame_d3d11): its views, its shared textures and their keyed-mutex synchronization. From crate::OwnedFrame::d3d11_frame or crate::Frame::d3d11_frame inside a frame cycle, or crate::RenderSender::d3d11_frame_state outside one. The textures it lends live as long as the borrow it was taken from.

Implementations§

Source§

impl D3D11Frame<'_>

Source

pub fn as_raw(&self) -> &QarVideoFrameD3D11

The record as the library wrote it, for C helpers that take it.

Source

pub fn views(&self) -> Vec<VideoFrameView>

The frame’s views: which texture, which rectangle, which eye, color or depth.

Source

pub fn view_index(&self, eye: Eye, kind: ViewKind) -> Option<usize>

Index of the first view showing kind for eye. The same index selects the view’s pose and field of view on the frame (crate::OwnedFrame::view).

Source

pub fn texture_count(&self) -> usize

Number of shared textures in the frame.

Source

pub fn texture(&self, index: usize) -> Option<D3D11Texture<'_>>

The texture a view’s texture_index names.

Source

pub fn textures(&self) -> Vec<D3D11Texture<'_>>

Every shared texture of the frame, in texture_index order.

Source

pub fn keyed_mutexes(&self) -> Vec<D3D11KeyedMutex<'_>>

One entry per texture when the application drives the keyed mutexes (acquire_keyed_mutex_sync false); empty when no external synchronization is needed.

Trait Implementations§

Source§

impl<'borrow> Debug for D3D11Frame<'borrow>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'borrow> !Send for D3D11Frame<'borrow>

§

impl<'borrow> !Sync for D3D11Frame<'borrow>

§

impl<'borrow> Freeze for D3D11Frame<'borrow>

§

impl<'borrow> RefUnwindSafe for D3D11Frame<'borrow>

§

impl<'borrow> Unpin for D3D11Frame<'borrow>

§

impl<'borrow> UnsafeUnpin for D3D11Frame<'borrow>

§

impl<'borrow> UnwindSafe for D3D11Frame<'borrow>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.