Table of Contents

Interface IVideoViewPushFrame

Namespace
VisioForge.Core.Types
Assembly
VisioForge.Core.dll

Defines an interface for video views that support direct pushing of video frames for rendering. This interface is crucial for scenarios where raw video data needs to be displayed without relying on a traditional media pipeline (e.g., for custom video processing or real-time frame injection).

public interface IVideoViewPushFrame

Examples

// Assuming 'videoView' is a control that implements IVideoViewPushFrame.
public void RenderCustomFrame(IVideoViewPushFrame videoView, VideoFrame customFrame)
{
    // Push a custom-generated video frame to the view for display.
    videoView.PushFrame(customFrame);
}

// Example with VideoFrameX (from MediaBlocks)
public void RenderMediaBlocksFrame(IVideoViewPushFrame videoView, VideoFrameX mediaBlocksFrame)
{
    videoView.PushFrame(mediaBlocksFrame);
}

Remarks

Implementations of this interface are responsible for taking raw video frame data and rendering it efficiently to the display. This allows for fine-grained control over the video rendering process and is essential for custom video processing pipelines. The interface supports multiple frame types: legacy VideoFrame for backwards compatibility, VideoFrameX for the newer MediaBlocks framework, and platform-specific types like GStreamer Sample on iOS. Push frame rendering bypasses normal playback synchronization, making it suitable for real-time applications where the caller controls frame timing. Common use cases include computer vision applications that need to display processed frames, custom video generators, screen sharing implementations, or bridging between different media frameworks. When using this interface, the caller is responsible for frame timing and synchronization.

Methods

PushFrame(VideoFrame)

Pushes a VisioForge.Core.Types.VideoFrame to the view for rendering. This method is typically used for raw video frames that conform to the legacy VisioForge.Core.Types.VideoFrame structure.

void PushFrame(VideoFrame frame)

Parameters

frame VideoFrame

The VisioForge.Core.Types.VideoFrame containing the video data to be rendered.

PushFrame(VideoFrameX)

Pushes a VisioForge.Core.Types.X.VideoFrameX to the view for rendering. This method is used for video frames generated by the MediaBlocks engine, offering more advanced frame metadata.

void PushFrame(VideoFrameX frame)

Parameters

frame VideoFrameX

The VisioForge.Core.Types.X.VideoFrameX containing the video data and extended metadata to be rendered.