pub struct VideoSurfaceSpec {
pub texture_id: Option<ExternalTextureId>,
pub video_width: u32,
pub video_height: u32,
pub format: VideoPixelFormat,
pub fit: ObjectFit,
pub rounded: u8,
pub opacity: u8,
}Expand description
零拷贝视频帧表面规格(同时兼容 GPU 外部纹理句柄与软件转码尺寸描述)。
Fields§
§texture_id: Option<ExternalTextureId>§video_width: u32§video_height: u32§format: VideoPixelFormat§fit: ObjectFit§rounded: u8§opacity: u8Implementations§
Source§impl VideoSurfaceSpec
impl VideoSurfaceSpec
pub const fn new( video_width: u32, video_height: u32, format: VideoPixelFormat, ) -> Self
pub const fn external_texture(self, id: ExternalTextureId) -> Self
pub const fn fit(self, fit: ObjectFit) -> Self
pub const fn rounded(self, r: u8) -> Self
Trait Implementations§
Source§impl Clone for VideoSurfaceSpec
impl Clone for VideoSurfaceSpec
impl Copy for VideoSurfaceSpec
Source§impl Debug for VideoSurfaceSpec
impl Debug for VideoSurfaceSpec
impl Eq for VideoSurfaceSpec
Source§impl PartialEq for VideoSurfaceSpec
impl PartialEq for VideoSurfaceSpec
impl StructuralPartialEq for VideoSurfaceSpec
Auto Trait Implementations§
impl Forget for VideoSurfaceSpec
impl Freeze for VideoSurfaceSpec
impl Move for VideoSurfaceSpec
impl RefUnwindSafe for VideoSurfaceSpec
impl Send for VideoSurfaceSpec
impl Sync for VideoSurfaceSpec
impl Unpin for VideoSurfaceSpec
impl UnsafeUnpin for VideoSurfaceSpec
impl UnwindSafe for VideoSurfaceSpec
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> FluentBuilder for T
impl<T> FluentBuilder for T
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
当
condition 为 true 时执行闭包修饰自身,否则原样返回。Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Self
fn when_else( self, condition: bool, then: impl FnOnce(Self) -> Self, else_fn: impl FnOnce(Self) -> Self, ) -> Self
根据
condition 在两个修饰分支之间二选一。Source§fn when_some<O>(
self,
option: Option<O>,
then: impl FnOnce(Self, O) -> Self,
) -> Self
fn when_some<O>( self, option: Option<O>, then: impl FnOnce(Self, O) -> Self, ) -> Self
当
option 为 Some(value) 时执行闭包修饰自身,否则原样返回。