Class CustomH264EncoderSettings
- Assembly
- VisioForge.Core.dll
Configuration settings for a custom H264 encoder implementation. Implements the VisioForge.Core.Types.X.VideoEncoders.IH264EncoderSettings
public class CustomH264EncoderSettings : IH264EncoderSettings, IVideoEncoder, IMediaBlockSettings, IEncoderTextInfoInheritance
Implements
Inherited Members
Constructors
CustomH264EncoderSettings(string)
Initializes a new instance of the VisioForge.Core.Types.X.VideoEncoders.CustomH264EncoderSettings class.
public CustomH264EncoderSettings(string elementName)Parameters
elementNamestring-
The name of the GStreamer element to use for encoding.
Properties
ElementName
Gets the GStreamer element name for this custom encoder.
public string ElementName { get; }Property Value
KeyFrameDetected
Occurs when on key frame detected. Timestamp is in nanoseconds.
public KeyFrameDetectedDelegate KeyFrameDetected { 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
Properties
Gets the collection of properties used to configure the encoder.
public Dictionary<string, object> Properties { get; }Property Value
Remarks
Add key-value pairs to configure encoder-specific parameters.
VideoFormat
Gets or sets the video format required by the encoder.
public VideoFormatX VideoFormat { get; set; }Property Value
Remarks
Default is NV12.
Methods
CreateBlock()
Creates a new H264 encoder block with these settings.
public MediaBlock CreateBlock()Returns
- MediaBlock
-
A configured VisioForge.Core.MediaBlocks.MediaBlock instance for H264 encoding.
GetCaps()
Gets the GStreamer capabilities string.
public string GetCaps()Returns
- string
-
Not implemented for custom encoders.
Exceptions
- NotImplementedException
-
Always thrown as custom encoders define caps differently.
GetEncoderType()
Gets the type of the encoder.
public H264EncoderType GetEncoderType()Returns
- H264EncoderType
-
The VisioForge.Core.Types.X.VideoEncoders.H264EncoderType indicating this is a custom encoder.
GetParameters()
Gets the GStreamer pipeline parameters string.
public string GetParameters()Returns
- string
-
Not implemented for custom encoders.
Exceptions
- NotImplementedException
-
Always thrown as custom encoders use Properties collection instead.