跳转到主要内容

GraphicsCaptureApi

搜索

结构体 GraphicsCaptureApi 

源码
pub struct GraphicsCaptureApi { /* private fields */ }
展开描述

使用 Windows Graphics Capture API 管理图形捕获会话。

实现§

源码§

impl GraphicsCaptureApi

源码

pub fn new<T: GraphicsCaptureApiHandler<Error = E> + Send + 'static, E: Send + Sync + 'static>( d3d_device: ID3D11Device, d3d_device_context: ID3D11DeviceContext, item_with_details: GraphicsCaptureItemType, callback: Arc<Mutex<T>>, cursor_capture_settings: CursorCaptureSettings, draw_border_settings: DrawBorderSettings, secondary_window_settings: SecondaryWindowSettings, minimum_update_interval_settings: MinimumUpdateIntervalSettings, dirty_region_settings: DirtyRegionSettings, color_format: ColorFormat, thread_id: u32, result: Arc<Mutex<Option<E>>>, ) -> Result<Self, Error>

构造一个新的 GraphicsCaptureApi 实例。

关于参数详情,请参见签名中的类型名称;复杂的行为在下方相关位置内联说明。

源码

pub fn start_capture(&mut self) -> Result<(), Error>

启动捕获。

§错误
源码

pub fn stop_capture(self)

停止捕获会话并清理资源。

源码

pub fn halt_handle(&self) -> Arc<AtomicBool>

获取停止句柄。

§返回

返回一个 Arc<AtomicBool>,可用于检查捕获是否已停止。

源码

pub fn is_supported() -> Result<bool, Error>

检查是否支持 Windows Graphics Capture API。

源码

pub fn is_cursor_settings_supported() -> Result<bool, Error>

检查是否可以更改光标捕获设置。

源码

pub fn is_border_settings_supported() -> Result<bool, Error>

检查是否可以更改捕获边框设置。

源码

pub fn is_secondary_windows_supported() -> Result<bool, Error>

检查是否支持捕获辅助窗口。

源码

pub fn is_minimum_update_interval_supported() -> Result<bool, Error>

检查是否支持设置最小更新间隔。

源码

pub fn is_dirty_region_supported() -> Result<bool, Error>

检查是否支持脏区域跟踪。

trait 实现§

源码§

impl Drop for GraphicsCaptureApi

源码§

fn drop(&mut self)

执行此类型的析构函数。 了解更多

自动 trait 实现§

Blanket 实现§

源码§

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

源码§

fn type_id(&self) -> TypeId

获取 selfTypeId了解更多
源码§

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

源码§

fn borrow(&self) -> &T

从拥有的值不可变地借用。 了解更多
源码§

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

源码§

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

从拥有的值可变地借用。 了解更多
源码§

impl<T> From<T> for T

源码§

fn from(t: T) -> T

原样返回参数。

源码§

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

源码§

fn into(self) -> U

调用 U::from(self)

也就是说,此转换由 From<T> for U 的实现决定。

源码§

impl<T> IntoEither for T

源码§

fn into_either(self, into_left: bool) -> Either<Self, Self>

into_lefttrue 时,将 self 转换为 Left 变体的 Either<Self, Self>; 否则将其转换为 Right 变体的 Either<Self, Self>了解更多
源码§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

into_left(&self) 返回 true 时,将 self 转换为 Left 变体的 Either<Self, Self>; 否则将其转换为 Right 变体的 Either<Self, Self>了解更多
源码§

impl<T> Pointable for T

源码§

const ALIGN: usize

指针的对齐方式。
源码§

type Init = T

用于初始化的类型。
源码§

unsafe fn init(init: <T as Pointable>::Init) -> usize

使用给定的初始化器初始化 a。 了解更多
源码§

unsafe fn deref<'a>(ptr: usize) -> &'a T

解引用给定的指针。 了解更多
源码§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

可变地解引用给定的指针。 了解更多
源码§

unsafe fn drop(ptr: usize)

丢弃给定指针所指向的对象。 了解更多
源码§

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

源码§

type Error = Infallible

在转换出错时返回的类型。
源码§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

执行转换。
源码§

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

源码§

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

在转换出错时返回的类型。
源码§

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

执行转换。