Interface IMediaBlockInternals
- Namespace
- VisioForge.Core.MediaBlocks
- Assembly
- VisioForge.Core.dll
Internal interface providing low-level access to MediaBlock implementation details. This interface exposes the underlying GStreamer elements and pipeline management methods that are used internally by the MediaBlocks framework for pipeline construction and lifecycle management. Not intended for direct use in application code.
public interface IMediaBlockInternalsMethods
Build()
Constructs and initializes the underlying GStreamer elements for this MediaBlock. This method creates the necessary GStreamer components, configures their properties, and prepares the block for integration into the pipeline. Must be called before the block can process media.
bool Build()Returns
- bool
-
True if the block was successfully built and all required elements were created; false if construction failed.
CleanUp()
Releases the GStreamer elements this MediaBlock created in VisioForge.Core.MediaBlocks.IMediaBlockInternals.Build and returns the block to a re-buildable state. Called automatically during pipeline teardown.
void CleanUp()Remarks
A stopped pipeline can be started again on the same instance, in which case VisioForge.Core.MediaBlocks.IMediaBlockInternals.Build runs a second time on this very block. So the contract is:
- clear the build latch, so VisioForge.Core.MediaBlocks.IMediaBlockInternals.Build does not short-circuit;
- release everything VisioForge.Core.MediaBlocks.IMediaBlockInternals.Build created, since VisioForge.Core.MediaBlocks.IMediaBlockInternals.Build will create it again;
- do NOT release anything VisioForge.Core.MediaBlocks.IMediaBlockInternals.Build cannot recreate - state built in the
constructor, user configuration, and event subscriptions belong to
Dispose(bool).
GetCore()
Retrieves the core BaseElement wrapper that provides additional functionality around the GStreamer element. This wrapper adds VisioForge-specific features and simplifies common operations on the underlying GStreamer element.
BaseElement GetCore()Returns
- BaseElement
-
The BaseElement wrapper instance that encapsulates the GStreamer element.
GetElement()
Retrieves the primary GStreamer element that represents this MediaBlock in the pipeline. This element is the main component that performs the actual media processing and is connected to other elements in the GStreamer pipeline.
Element GetElement()Returns
- Element
-
The GStreamer Element instance, or null if the block hasn't been built yet.
SetContext(MediaBlocksPipeline)
Associates this MediaBlock with a pipeline and initializes its internal context. This method is called automatically when the block is added to a pipeline, providing access to shared resources and pipeline-wide configuration.
void SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The MediaBlocksPipeline instance that will manage this block.