pub struct GraphicsCaptureApi { /* private fields */ }展开描述
使用 Windows Graphics Capture API 管理图形捕获会话。
实现§
源码§impl GraphicsCaptureApi
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>
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 start_capture(&mut self) -> Result<(), Error>
源码pub fn stop_capture(self)
pub fn stop_capture(self)
停止捕获会话并清理资源。
源码pub fn halt_handle(&self) -> Arc<AtomicBool>
pub fn halt_handle(&self) -> Arc<AtomicBool>
源码pub fn is_supported() -> Result<bool, Error>
pub fn is_supported() -> Result<bool, Error>
检查是否支持 Windows Graphics Capture API。
源码pub fn is_cursor_settings_supported() -> Result<bool, Error>
pub fn is_cursor_settings_supported() -> Result<bool, Error>
检查是否可以更改光标捕获设置。
源码pub fn is_border_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_secondary_windows_supported() -> Result<bool, Error>
检查是否支持捕获辅助窗口。
源码pub fn is_minimum_update_interval_supported() -> Result<bool, Error>
pub fn is_minimum_update_interval_supported() -> Result<bool, Error>
检查是否支持设置最小更新间隔。
源码pub fn is_dirty_region_supported() -> Result<bool, Error>
pub fn is_dirty_region_supported() -> Result<bool, Error>
检查是否支持脏区域跟踪。
trait 实现§
自动 trait 实现§
impl Freeze for GraphicsCaptureApi
impl RefUnwindSafe for GraphicsCaptureApi
impl !Send for GraphicsCaptureApi
impl !Sync for GraphicsCaptureApi
impl Unpin for GraphicsCaptureApi
impl UnsafeUnpin for GraphicsCaptureApi
impl UnwindSafe for GraphicsCaptureApi
Blanket 实现§
源码§impl<T> IntoEither for T
impl<T> IntoEither for T
源码§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
当
into_left 为 true 时,将 self 转换为
Left 变体的
Either<Self, Self>;
否则将其转换为
Right 变体的
Either<Self, Self>。 了解更多源码§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
当
into_left(&self) 返回 true 时,将 self 转换为
Left 变体的
Either<Self, Self>;
否则将其转换为
Right 变体的
Either<Self, Self>。 了解更多