Interface ICaptureService
Service for creating screen capture sessions targeting a specific window or monitor region. Pass engine settings directly to CreateSessionAsync(ICaptureRegion, IReadOnlyDictionary<string, object>, CancellationToken).
Inherited Members
Namespace: Zaya.Screenshot.Services
Assembly: Zaya.Screenshot.dll
Syntax
public interface ICaptureService : IDisposable
Properties
| Edit this page View SourceDescription
Gets the UI description for this engine (localized).
Declaration
LocalizedString Description { get; }
Property Value
| Type | Description |
|---|---|
| LocalizedString |
DisplayName
Gets the UI display name for this engine (localized).
Declaration
LocalizedString DisplayName { get; }
Property Value
| Type | Description |
|---|---|
| LocalizedString |
EngineId
Gets a unique identifier for this capture engine (e.g., "graphics-capture"). Used for profile serialization and engine lookup.
Declaration
string EngineId { get; }
Property Value
| Type | Description |
|---|---|
| string |
IsAvailable
Gets whether this capture service is available on the current system.
Declaration
bool IsAvailable { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Settings
Gets the list of engine-specific settings that can be configured via UI.
Declaration
IReadOnlyList<SettingDescriptor> Settings { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<SettingDescriptor> |
Methods
| Edit this page View SourceCreateSessionAsync(ICaptureRegion, IReadOnlyDictionary<string, object>, CancellationToken)
Creates a new capture session for the specified region with the given engine settings.
Declaration
Task<ICaptureSession> CreateSessionAsync(ICaptureRegion region, IReadOnlyDictionary<string, object> engineSettings, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| ICaptureRegion | region | The region to capture (window or monitor, full-screen or rect). |
| IReadOnlyDictionary<string, object> | engineSettings | Engine-specific settings dictionary, or |
| CancellationToken | cancellationToken | Token to cancel the session creation. |
Returns
| Type | Description |
|---|---|
| Task<ICaptureSession> | An active capture session ready to produce frames. |
CreateSessionAsync(ICaptureRegion, CancellationToken)
Creates a new capture session for the specified region with default engine settings.
Declaration
Task<ICaptureSession> CreateSessionAsync(ICaptureRegion region, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| ICaptureRegion | region | The region to capture (window or monitor, full-screen or rect). |
| CancellationToken | cancellationToken | Token to cancel the session creation. |
Returns
| Type | Description |
|---|---|
| Task<ICaptureSession> | An active capture session ready to produce frames. |