Skip to main content

Video renderer

The Video Renderer block is used to play the audio stream on the selected or default device. Volume and mute options are available.

Block info

Name: VideoRendererBlock.

Pin directionMedia typePins count
Input videouncompressed videoone or more

Video view

A special platform-specific visual control VideoView is used for rendering.

For Windows it will use DirectX, for other platforms in most cases OpenGL will be used.

The sample pipeline

UniversalSourceBlock.VideoOutputVideoRendererBlock

Sample code

var pipeline = new MediaBlocksPipeline(false);

var filename = "test.mp4";
var fileSource = new UniversalSourceBlock(await UniversalSourceSettings.CreateAsync(new Uri(filename)));

var videoRenderer = new VideoRendererBlock(pipeline, VideoView1);
pipeline.Connect(fileSource.VideoOutput, videoRenderer.Input);

await pipeline.StartAsync();

Platforms

Windows, macOS, Linux, iOS, Android.