Class AMFH264EncoderPage
- Assembly
- VisioForge.Core.dll
Represents a WPF page for configuring AMD AMF H.264 encoder settings. This page provides UI controls for setting various H.264 encoding parameters such as bitrate, GOP size, quantization parameters, rate control mode, encoder preset, profile, level, and usage mode. Implements INotifyPropertyChanged for data binding and IOutputFormatPageType for integration with the output format dialog system.
public class AMFH264EncoderPage : Page, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IAddChild, INotifyPropertyChanged, IComponentConnectorInheritance
Implements
Inherited Members
Constructors
AMFH264EncoderPage()
Initializes a new instance of the VisioForge.Core.UI.WPF.Dialogs.OutputFormats.Pages.AMFH264EncoderPage class. Sets up the data context and populates the UI control collections with available options.
public AMFH264EncoderPage()Properties
Bitrate
Gets or sets the target bitrate for encoding in kilobits per second. Used when rate control mode is set to bitrate-based modes like CBR or VBR.
public uint Bitrate { get; set; }Property Value
CABAC
Gets or sets a value indicating whether Context-Adaptive Binary Arithmetic Coding (CABAC) is enabled. CABAC provides better compression efficiency compared to CAVLC but requires more processing power.
public bool CABAC { get; set; }Property Value
GOPSize
Gets or sets the Group of Pictures (GOP) size. Defines the maximum distance between I-frames (keyframes). A value of -1 uses encoder default.
public int GOPSize { get; set; }Property Value
Level
Gets or sets the H.264 encoding level. Levels define the maximum bitrate, frame rate, and resolution constraints for the encoded stream.
public AMFH264EncoderLevel Level { get; set; }Property Value
LevelStr
Gets or sets the H.264 encoding level as a string representation. Used for data binding with UI controls.
public string LevelStr { get; set; }Property Value
Levels
Gets or sets the collection of available H.264 encoding levels for UI selection.
public ObservableCollection<string> Levels { get; set; }Property Value
MaxBitrate
Gets or sets the maximum bitrate for encoding in kilobits per second. Used in variable bitrate modes to cap the maximum bitrate.
public uint MaxBitrate { get; set; }Property Value
MaxQP
Gets or sets the maximum quantization parameter allowed during encoding. Prevents the encoder from using quantization values above this threshold. A value of -1 uses encoder default.
public double MaxQP { get; set; }Property Value
MinQP
Gets or sets the minimum quantization parameter allowed during encoding. Prevents the encoder from using quantization values below this threshold. A value of -1 uses encoder default.
public double MinQP { get; set; }Property Value
Preset
Gets or sets the encoder quality preset. Presets provide a balance between encoding speed and quality (Speed, Balanced, Quality).
public AMFH264EncoderPreset Preset { get; set; }Property Value
PresetStr
Gets or sets the encoder preset as a string representation. Used for data binding with UI controls.
public string PresetStr { get; set; }Property Value
Presets
Gets or sets the collection of available encoder presets for UI selection.
public ObservableCollection<string> Presets { get; set; }Property Value
Profile
Gets or sets the H.264 encoding profile. Profiles define the set of features and constraints used during encoding (Baseline, Main, High).
public AMFH264EncoderProfile Profile { get; set; }Property Value
ProfileStr
Gets or sets the H.264 encoding profile as a string representation. Used for data binding with UI controls.
public string ProfileStr { get; set; }Property Value
Profiles
Gets or sets the collection of available H.264 encoding profiles for UI selection.
public ObservableCollection<string> Profiles { get; set; }Property Value
QPI
Gets or sets the quantization parameter for I-frames. Lower values mean higher quality and higher bitrate. Typical range is 0-51.
public double QPI { get; set; }Property Value
QPP
Gets or sets the quantization parameter for P-frames. Lower values mean higher quality and higher bitrate. Typical range is 0-51.
public double QPP { get; set; }Property Value
RateControl
Gets or sets the rate control mode. Determines how the encoder manages bitrate allocation (CQP, CBR, VBR, etc.).
public AMFH264EncoderRateControl RateControl { get; set; }Property Value
RateControlModes
Gets or sets the collection of available rate control modes for UI selection.
public ObservableCollection<string> RateControlModes { get; set; }Property Value
RateControlStr
Gets or sets the rate control mode as a string representation. Used for data binding with UI controls.
public string RateControlStr { get; set; }Property Value
Usage
Gets or sets the encoder usage mode. Optimizes encoder settings for specific use cases (Transcoding, UltraLowLatency, LowLatency, WebCam).
public AMFH264EncoderUsage Usage { get; set; }Property Value
UsageStr
Gets or sets the encoder usage mode as a string representation. Used for data binding with UI controls.
public string UsageStr { get; set; }Property Value
Usages
Gets or sets the collection of available usage modes for UI selection.
public ObservableCollection<string> Usages { get; set; }Property Value
Methods
Fill(ref AMFH264EncoderSettings)
Fills the provided settings object with current UI values. Exports all encoder parameters from the UI controls to the settings object.
public void Fill(ref AMFH264EncoderSettings settings)Parameters
settingsAMFH264EncoderSettings-
The AMD AMF H.264 encoder settings object to populate.
GetPageType()
Gets the encoder settings type associated with this page.
public Type GetPageType()Returns
- Type
-
The type of AMFH264EncoderSettings.
Init(AMFH264EncoderSettings)
Initializes the page with existing encoder settings. Loads all encoder parameters from the provided settings object into the UI controls.
public void Init(AMFH264EncoderSettings settings)Parameters
settingsAMFH264EncoderSettings-
The AMD AMF H.264 encoder settings to load.
InitializeComponent()
InitializeComponent
public void InitializeComponent()SetProperty<T>(ref T, T, string)
Sets the property.
protected bool SetProperty<T>(ref T field, T newValue, string propertyName = null)Parameters
fieldT-
The field.
newValueT-
The new value.
propertyNamestring-
Name of the property.
Returns
- bool
-
trueif successful,falseotherwise.
Type Parameters
T-
Type.
PropertyChanged
Property changed event.
public event PropertyChangedEventHandler PropertyChanged