Interface IVideoCaptureControls
- Namespace
- VisioForge.Core.Types
- Assembly
- VisioForge.Core.dll
Defines a standard set of controls for a video capture component. This interface provides a common API for managing the lifecycle of a video capture session, including starting, pausing, and stopping. It also provides access to audio volume controls during capture.
public interface IVideoCaptureControls : IVideoEffectsControlsImplements
Remarks
This interface inherits from VisioForge.Core.Types.IVideoEffectsControls, allowing for the application of real-time video effects during capture. Implementations of this interface are expected to manage the underlying capture engine (e.g., GStreamer, Media Foundation, DirectShow). The interface supports both synchronous and asynchronous methods to accommodate different programming styles. During capture, the Duration method returns the elapsed time since capture started. The State method provides real-time status (Capturing, Paused, Stopped). Volume controls affect the input audio source level before encoding. Pause/Resume functionality is useful for creating segmented recordings or skipping unwanted content without stopping the entire session.
Methods
Duration()
Gets the duration of the current capture session.
TimeSpan Duration()Returns
DurationAsync()
Asynchronously gets the duration of the current capture session.
Task<TimeSpan> DurationAsync()Returns
- Task<TimeSpan>
-
A task that represents the asynchronous operation. The task result contains a TimeSpan representing the elapsed time.
Pause()
Pauses the video capture. The capture session remains active and can be resumed.
bool Pause()Returns
- bool
-
trueif the capture was paused successfully,falseotherwise.
PauseAsync()
Asynchronously pauses the video capture.
Task<bool> PauseAsync()Returns
- Task<bool>
-
A task that represents the asynchronous operation. The task result contains
trueif the capture was paused successfully,falseotherwise.
Resume()
Resumes a paused video capture.
bool Resume()Returns
- bool
-
trueif the capture was resumed successfully,falseotherwise.
ResumeAsync()
Asynchronously resumes a paused video capture.
Task<bool> ResumeAsync()Returns
- Task<bool>
-
A task that represents the asynchronous operation. The task result contains
trueif the capture was resumed successfully,falseotherwise.
Start()
Starts the video capture process.
bool Start()Returns
- bool
-
trueif the capture started successfully,falseotherwise.
StartAsync()
Asynchronously starts the video capture process.
Task<bool> StartAsync()Returns
- Task<bool>
-
A task that represents the asynchronous operation. The task result contains
trueif the capture started successfully,falseotherwise.
State()
Gets the current state of the capture component (e.g., Capturing, Paused, Stopped).
PlaybackState State()Returns
- PlaybackState
-
The current VisioForge.Core.Types.PlaybackState.
Stop()
Stops the video capture and finalizes any output files.
void Stop()StopAsync()
Asynchronously stops the video capture.
Task StopAsync()Returns
- Task
-
A task that represents the asynchronous stop operation.
Volume_Get()
Gets the current audio volume for the capture source.
double Volume_Get()Returns
- double
-
The current volume level.
Volume_Set(double)
Sets the audio volume for the capture source.
void Volume_Set(double volume)Parameters
volumedouble-
The volume level, typically from 0.0 (silent) to 1.0 (full volume). Values can sometimes exceed 1.0 for amplification.