Class ImageVideoSourceBlock
- Namespace
- VisioForge.Core.MediaBlocks.Sources
- Assembly
- VisioForge.Core.dll
Image video source block for generating video streams from still images or animated GIFs. Provides flexible image-to-video conversion with support for static images as video backgrounds, slideshow creation, and animated GIF playback for titles, logos, overlays, and placeholder content in video productions. Implements the VisioForge.Core.MediaBlocks.Sources.SourceMediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class ImageVideoSourceBlock : SourceMediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
ImageVideoSourceBlock(ImageVideoSourceSettings)
Initializes a new instance of the VisioForge.Core.MediaBlocks.Sources.ImageVideoSourceBlock class with custom image settings. Configures the image video source for static or animated image playback with specified parameters.
public ImageVideoSourceBlock(ImageVideoSourceSettings settings)Parameters
settingsImageVideoSourceSettings-
The image video settings controlling file path, duration, frame rate, and format parameters.
Properties
Input
Gets the primary input pad (none for source blocks that read from image files).
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets all input pads available on this block (none for source blocks).
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the primary video output pad for the generated video stream.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets all output pads available on this block (single video output).
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the image video configuration settings that control image loading and video generation.
public ImageVideoSourceSettings Settings { get; set; }Property Value
Type
Gets the media block type identifier for image video source operations.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds and initializes the image video source within the pipeline context. Loads image file, configures video generation, and prepares output for downstream processing.
public override bool Build()Returns
- bool
-
trueif the image video source was successfully built and configured; otherwise,false.
CleanUp()
Cleans up all resources associated with the image video operations, including image decoders and video buffers.
public void CleanUp()Dispose(bool)
Releases unmanaged and managed resources used by the image video source. Properly closes image resources and disposes of GStreamer elements and video generation components.
protected override void Dispose(bool disposing)Parameters
disposingbool-
trueto release both managed and unmanaged resources;falseto release only unmanaged resources.
GetCore()
Gets the core GStreamer element wrapper for advanced configuration and monitoring.
public BaseElement GetCore()Returns
- BaseElement
-
Always null for composite source blocks with multiple internal elements.
GetElement()
Gets the native GStreamer element for direct GStreamer pipeline integration.
public Element GetElement()Returns
- Element
-
The active source element (either normal or animated GIF source).
IsAvailable(ImageVideoSourceSettings)
Determines whether image video support is available for the specified settings. Checks for required image decoders and format support based on the image type.
public static bool IsAvailable(ImageVideoSourceSettings settings)Parameters
settingsImageVideoSourceSettings-
The image settings to check for compatibility and codec availability.
Returns
- bool
-
trueif image video support is available for the specified format; otherwise,false.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Sets the pipeline context for this image video source, providing access to the parent pipeline and logging context.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The parent MediaBlocks pipeline containing this image video source.