Class FrameDoublerBlock
- Namespace
- VisioForge.Core.MediaBlocks.Special
- Assembly
- VisioForge.Core.dll
A media block that doubles the frame rate of video streams by duplicating frames. For example, converts 30fps video to 60fps by duplicating each frame with adjusted timestamps.
public class FrameDoublerBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
FrameDoublerBlock()
Initializes a new instance of the VisioForge.Core.MediaBlocks.Special.FrameDoublerBlock class. Doubles the frame rate of video streams through frame duplication.
public FrameDoublerBlock()FrameDoublerBlock(int, int)
Initializes a new instance of the VisioForge.Core.MediaBlocks.Special.FrameDoublerBlock class with specified frame rates.
public FrameDoublerBlock(int inputFps, int outputFps)Parameters
inputFpsint-
Expected input frame rate (e.g., 30).
outputFpsint-
Desired output frame rate (e.g., 60).
Properties
Input
Gets the input.
public override MediaBlockPad Input { get; }Property Value
InputFrameRate
Gets or sets the input frame rate (e.g., 30 for 30fps). This is optional - if not set, will be detected from input stream.
public int? InputFrameRate { get; set; }Property Value
- int?
Inputs
Gets the inputs.
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the output.
public override MediaBlockPad Output { get; }Property Value
OutputFrameRate
Gets or sets the output frame rate (e.g., 60 for 60fps). This is optional - if not set, will be double the input frame rate.
public int? OutputFrameRate { get; set; }Property Value
- int?
Outputs
Gets the outputs.
public override MediaBlockPad[] Outputs { get; }Property Value
Type
Gets the type.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds the media block.
public override bool Build()Returns
- bool
-
trueif successful,falseotherwise.
Dispose(bool)
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
protected override void Dispose(bool disposing)Parameters
disposingbool-
True if disposing, false if finalizing.
GetFrameRateMultiplier()
Gets the frame rate multiplier applied by this block.
public double GetFrameRateMultiplier()Returns
- double
-
The frame rate multiplier (typically 2.0 for doubling).
GetInputCaps()
Gets the input caps string for the specified frame rate.
public string GetInputCaps()Returns
- string
-
The input caps string.
GetOutputCaps()
Gets the output caps string for the doubled frame rate.
public string GetOutputCaps()Returns
- string
-
The output caps string.
IMediaBlockInternals.Build()
Builds the media block by creating and initializing the underlying GStreamer elements.
bool IMediaBlockInternals.Build()Returns
- bool
-
True if the block was successfully built; false if construction failed.
IMediaBlockInternals.CleanUp()
Performs cleanup of resources and resets the block to uninitialized state.
void IMediaBlockInternals.CleanUp()IMediaBlockInternals.GetCore()
Retrieves the core BaseElement wrapper for this frame doubler.
BaseElement IMediaBlockInternals.GetCore()Returns
- BaseElement
-
The base element wrapping the frame doubler.
IMediaBlockInternals.GetElement()
Retrieves the primary GStreamer element for this frame doubler.
Element IMediaBlockInternals.GetElement()Returns
- Element
-
The GStreamer element performing frame doubling.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Sets the media pipeline context for this frame doubler block.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The parent media blocks pipeline that manages this block.