Class D3D12H264EncoderSettings
- Assembly
- VisioForge.Core.dll
D3D12 Video Encode H264 encoder (d3d12h264enc) settings. Uses the DirectX 12 Video Encode API — a third independent runtime next to AMF and Media Foundation, with its own per-adapter session counter. Requires GStreamer 1.24+ and a D3D12-capable GPU.
public class D3D12H264EncoderSettings : IH264EncoderSettings, IVideoEncoder, IMediaBlockSettings, IEncoderTextInfoInheritance
Implements
Inherited Members
Constructors
D3D12H264EncoderSettings()
Initializes a new instance of the VisioForge.Core.Types.X.VideoEncoders.D3D12H264EncoderSettings class.
public D3D12H264EncoderSettings()Fields
Name
Display name.
public static readonly string NameField Value
Properties
Bitrate
Gets or sets target bitrate in Kbit/s.
public uint Bitrate { get; set; }Property Value
GOPSize
Gets or sets number of frames between key frames. -1 = driver default.
public int GOPSize { get; set; }Property Value
H264ParseInferTimestamps
Gets or sets h264parse infer-ts setting. Defaults to true.
public bool? H264ParseInferTimestamps { get; set; }Property Value
- bool?
H264ParsePtsInterpolation
Gets or sets h264parse pts-interpolation setting. Defaults to true.
public bool? H264ParsePtsInterpolation { get; set; }Property Value
- bool?
KeyFrameDetected
Occurs when on key frame detected. Timestamp is in nanoseconds.
public KeyFrameDetectedDelegate KeyFrameDetected { get; set; }Property Value
MaxBitrate
Gets or sets maximum bitrate in Kbit/s (VBR modes).
public uint MaxBitrate { get; set; }Property Value
ParseStream
Gets or sets a value indicating whether to parse the video stream. True by default. Disable it for SRT streaming.
public bool ParseStream { get; set; }Property Value
Profile
Gets or sets the H.264 profile.
public D3D12H264EncoderProfile Profile { get; set; }Property Value
QPB
Constant QP for B frames. Used when VisioForge.Core.Types.X.VideoEncoders.D3D12H264EncoderSettings.RateControl = CQP.
public uint QPB { get; set; }Property Value
QPI
Constant QP for I frames. Used when VisioForge.Core.Types.X.VideoEncoders.D3D12H264EncoderSettings.RateControl = CQP.
public uint QPI { get; set; }Property Value
QPInit
Initial QP used for CBR/VBR/QVBR rate control. Serialized as the
qp-init property on d3d12h264enc (there is no bare qp
property on this element). 0 means the encoder picks its own initial QP.
public uint QPInit { get; set; }Property Value
QPP
Constant QP for P frames. Used when VisioForge.Core.Types.X.VideoEncoders.D3D12H264EncoderSettings.RateControl = CQP.
public uint QPP { get; set; }Property Value
RateControl
Gets or sets the rate control mode. The underlying element's property name is
rate-control. We pass the enum as-is; mapping matches d3d12h264enc.
public D3D12H264EncoderRateControl RateControl { get; set; }Property Value
Methods
CreateBlock()
Creates a new MediaBlock instance configured with the settings contained in this object. This factory method allows for separation of configuration from instantiation, making it easier to serialize settings or create multiple blocks with the same configuration.
public MediaBlock CreateBlock()Returns
- MediaBlock
-
A new MediaBlock instance configured according to this settings object.
GetCaps()
Retrieves a string representation of the encoder's capabilities (GStreamer caps). This string describes the media formats and properties that the encoder can handle.
public string GetCaps()Returns
GetEncoderType()
Gets the type of the encoder.
public H264EncoderType GetEncoderType()Returns
- H264EncoderType
-
H264EncoderType.
GetParameters()
Retrieves a string representation of the encoder's current parameters. This string typically includes settings like bitrate, resolution, frame rate, and other configured options.
public string GetParameters()Returns
IsAvailable()
Determines whether d3d12h264enc is available on the host.
public static bool IsAvailable()Returns
ToString()
Returns a string that represents the current object.
public override string ToString()Returns
- string
-
A string that represents the current object.