Table of Contents

Class DirectCaptureASFOutput

Namespace
VisioForge.Core.Types.Output
Assembly
VisioForge.Core.dll

Represents configuration settings for DirectCapture ASF (Advanced Systems Format) output.

public sealed class DirectCaptureASFOutput : IVideoCaptureBaseOutput

Inheritance

Implements

Inherited Members

Remarks

DirectCapture is a specialized capture mode that bypasses some of the standard DirectShow filter graph processing for improved performance and reduced latency. This class configures output to ASF format, which is Microsoft's proprietary streaming format that serves as the container for Windows Media Audio (WMA) and Windows Media Video (WMV).

ASF DirectCapture is particularly useful for:

  • Real-time streaming applications
  • Low-latency recording scenarios
  • Direct-to-disk capture with minimal processing
  • Creating Windows Media files with hardware acceleration

The DirectCapture mode connects the capture source directly to the ASF writer, reducing the number of intermediate filters and memory copies. This results in lower CPU usage and more reliable capture at high data rates.

Note: DirectCapture mode may have limitations compared to standard capture:

  • Fewer video effects and filters can be applied
  • Preview may be limited or unavailable
  • Some capture devices may not support DirectCapture

Methods

GetInternalTypeVC()

Gets the internal output format identifier for video capture operations.

public VideoCaptureOutputFormat GetInternalTypeVC()

Returns

VideoCaptureOutputFormat

Returns VisioForge.Core.Types.VideoCapture.VideoCaptureOutputFormat.DirectCaptureASF to indicate this is a DirectCapture ASF output format.

Remarks

This method is used internally by the video capture system to identify the output format type. It implements the VisioForge.Core.Types.Output.IVideoCaptureBaseOutput.GetInternalTypeVC interface method.

Load(string)

Deserializes DirectCapture ASF output settings from a JSON string.

public static DirectCaptureASFOutput Load(string json)

Parameters

json string

The JSON string containing the serialized DirectCapture ASF output settings.

Returns

DirectCaptureASFOutput

A new VisioForge.Core.Types.Output.DirectCaptureASFOutput instance with settings restored from the JSON string.

Remarks

This method uses the default JSON deserialization options from VisioForge.Core.Helpers.JsonSerializerOptionsHelper. The JSON string should have been created using the VisioForge.Core.Types.Output.DirectCaptureASFOutput.Save method or follow the same format.

Exceptions

JsonException

Thrown when the JSON string is invalid or cannot be deserialized to a DirectCaptureASFOutput object.

Save()

Serializes the current DirectCapture ASF output settings to a JSON string.

public string Save()

Returns

string

A JSON string representation of the current settings that can be persisted or transmitted.

Remarks

This method uses the default JSON serialization options from VisioForge.Core.Helpers.JsonSerializerOptionsHelper. The resulting JSON can be used to restore the settings later using the VisioForge.Core.Types.Output.DirectCaptureASFOutput.Load(System.String) method. Note that most ASF encoding settings are configured through the Windows Media profile rather than through this class.