Interface IMediaBlockDynamicInputs
- Namespace
- VisioForge.Core.MediaBlocks
- Assembly
- VisioForge.Core.dll
Interface for MediaBlocks that support dynamic creation of input pads at runtime. This interface enables blocks like mixers and multiplexers to create new input connections on demand, allowing for flexible pipeline topologies that can change during execution.
public interface IMediaBlockDynamicInputsMethods
CreateNewInput(MediaBlockPadMediaType)
Creates a new input pad of the specified media type on this block. This allows for runtime expansion of the block's input capabilities, useful for scenarios like adding new video streams to a mixer or new audio tracks to a multiplexer.
MediaBlockPad CreateNewInput(MediaBlockPadMediaType mediaType)Parameters
mediaTypeMediaBlockPadMediaType-
The type of media content the new input pad will accept (video, audio, subtitle, or data).
Returns
- MediaBlockPad
-
A new MediaBlockPad configured as an input with the specified media type, or null if creation fails.
GetInput(MediaBlockPadMediaType)
Retrieves an existing input pad that handles the specified media type. This method searches for an already created input pad matching the requested media type, useful for reusing existing connections rather than creating new ones.
MediaBlockPad GetInput(MediaBlockPadMediaType mediaType)Parameters
mediaTypeMediaBlockPadMediaType-
The type of media content to search for among existing input pads.
Returns
- MediaBlockPad
-
An existing MediaBlockPad that accepts the specified media type, or null if no matching pad is found.