Table of Contents

Class LoadVideo

Namespace
Bonsai.Shaders
Assembly
Bonsai.Shaders.dll

Represents an operator that initializes a video texture which is dynamically updated from the specified movie file.

public class LoadVideo : Source<Texture>
Inheritance
LoadVideo
Inherited Members

Properties

BufferLength

Gets or sets the size of the pre-loading buffer for video frames.

public int? BufferLength { get; set; }

Property Value

int?

FileName

Gets or sets the path to a movie file.

[FileNameFilter("Video Files|*.avi;*.mp4;*.ogg;*.ogv;*.wmv|AVI Files (*.avi)|*.avi|MP4 Files (*.mp4)|*.mp4|OGG Files (*.ogg;*.ogv)|*.ogg;*.ogv|WMV Files (*.wmv)|*.wmv")]
public string FileName { get; set; }

Property Value

string

FlipMode

Gets or sets a value specifying the flip mode applied to individual frames.

public FlipMode? FlipMode { get; set; }

Property Value

FlipMode?

FrameCount

Gets or sets the maximum number of frames to include in the video sequence.

public int? FrameCount { get; set; }

Property Value

int?

Remarks

If no value is specified, all frames in the video will be played.

Height

Gets or sets the height of the texture. If no value is specified, the texture buffer will not be initialized.

public int? Height { get; set; }

Property Value

int?

InternalFormat

Gets or sets a value specifying the internal pixel format of the texture.

public PixelInternalFormat InternalFormat { get; set; }

Property Value

PixelInternalFormat

MagFilter

Gets or sets a value specifying the texture magnification filter.

public TextureMagFilter MagFilter { get; set; }

Property Value

TextureMagFilter

MinFilter

Gets or sets a value specifying the texture minification filter.

public TextureMinFilter MinFilter { get; set; }

Property Value

TextureMinFilter

StartPosition

Gets or sets the offset, in frames, at which the video sequence should start.

public int StartPosition { get; set; }

Property Value

int

Width

Gets or sets the width of the texture. If no value is specified, the texture buffer will not be initialized.

public int? Width { get; set; }

Property Value

int?

WrapS

Gets or sets a value specifying wrapping parameters for the column coordinates of the texture sampler.

public TextureWrapMode WrapS { get; set; }

Property Value

TextureWrapMode

WrapT

Gets or sets a value specifying wrapping parameters for the row coordinates of the texture sampler.

public TextureWrapMode WrapT { get; set; }

Property Value

TextureWrapMode

Methods

Generate()

Generates an observable sequence that returns a video texture initialized from the specified movie file.

public override IObservable<Texture> Generate()

Returns

IObservable<Texture>

A sequence containing a single instance of the Texture class representing the video texture.

Generate<TSource>(IObservable<TSource>)

Returns a video texture initialized from the specified movie file whenever an observable sequence emits a notification.

public IObservable<Texture> Generate<TSource>(IObservable<TSource> source)

Parameters

source IObservable<TSource>

The sequence containing the notifications used to start loading a new video texture.

Returns

IObservable<Texture>

The sequence of Texture objects initialized from the specified movie file whenever the source sequence emits a notification.

Type Parameters

TSource

The type of the elements in the source sequence.