IBasicVideoEffect IBasicVideoEffect IBasicVideoEffect IBasicVideoEffect Interface

Definition

The interface you implement to create a custom video effect.

public : interface IBasicVideoEffectpublic interface IBasicVideoEffectPublic Interface IBasicVideoEffect// You can use this interface in JavaScript.
Inheritance
IBasicVideoEffectIBasicVideoEffectIBasicVideoEffectIBasicVideoEffect
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Inherited Members

Inherited methods

Properties

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

Gets a value indicating whether the video effect will modify the contents of the input frame.

public : PlatForm::Boolean IsReadOnly { get; }public bool IsReadOnly { get; }Public ReadOnly Property IsReadOnly As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

True, if the effect will not modify the input frame; otherwise, false.

Remarks

When IBasicVideoEffect.IsReadOnly is set to true, the system automatically copies the frame data directly from the input frame to the output frame before ProcessFrame is called. This allows an effect that analyzes the input data, but does not modify it, to skip the creation of the output frame data.

SupportedEncodingProperties SupportedEncodingProperties SupportedEncodingProperties SupportedEncodingProperties

Gets the encoding properties supported by the custom video effect.

public : IVectorView<VideoEncodingProperties> SupportedEncodingProperties { get; }public IReadOnlyList<VideoEncodingProperties> SupportedEncodingProperties { get; }Public ReadOnly Property SupportedEncodingProperties As IReadOnlyList<VideoEncodingProperties>// You can use this property in JavaScript.
Value
IVectorView<VideoEncodingProperties> IReadOnlyList<VideoEncodingProperties> IReadOnlyList<VideoEncodingProperties> IReadOnlyList<VideoEncodingProperties>

A list of supported encoding properties.

Remarks

If you return an empty list of VideoEncodingProperties objects from SupportedEncodingProperties, the system will default to ARGB32 encoding.

SupportedMemoryTypes SupportedMemoryTypes SupportedMemoryTypes SupportedMemoryTypes

Gets a value that indicates whether the custom video effect supports the use of GPU memory or CPU memory.

public : MediaMemoryTypes SupportedMemoryTypes { get; }public MediaMemoryTypes SupportedMemoryTypes { get; }Public ReadOnly Property SupportedMemoryTypes As MediaMemoryTypes// You can use this property in JavaScript.
Value
MediaMemoryTypes MediaMemoryTypes MediaMemoryTypes MediaMemoryTypes

A value that indicates the custom video effect's supported memory types.

Remarks

If you specify MediaMemoryTypes.GpuAndCpu when setting the memory type for your effect, the system will use either GPU or system memory, whichever is more efficient for the pipeline. When using this value, you must check in the ProcessFrame method to see whether the SoftwareBitmap or IDirect3DSurface passed into the method contains data and then process the frame accordingly.

TimeIndependent TimeIndependent TimeIndependent TimeIndependent

Gets a value that indicates whether the custom video effect is time independent.

public : PlatForm::Boolean TimeIndependent { get; }public bool TimeIndependent { get; }Public ReadOnly Property TimeIndependent As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

True, if the video effect is time independent; otherwise, false.

Methods

Close(MediaEffectClosedReason) Close(MediaEffectClosedReason) Close(MediaEffectClosedReason) Close(MediaEffectClosedReason)

Called when the video effect should close and clean up allocated resources.

public : void Close(MediaEffectClosedReason reason)public void Close(MediaEffectClosedReason reason)Public Function Close(reason As MediaEffectClosedReason) As void// You can use this method in JavaScript.
Parameters

DiscardQueuedFrames() DiscardQueuedFrames() DiscardQueuedFrames() DiscardQueuedFrames()

Called to allow video effect implementations optionally discard any stored state related to frames that have already been received.

public : void DiscardQueuedFrames()public void DiscardQueuedFrames()Public Function DiscardQueuedFrames() As void// You can use this method in JavaScript.

ProcessFrame(ProcessVideoFrameContext) ProcessFrame(ProcessVideoFrameContext) ProcessFrame(ProcessVideoFrameContext) ProcessFrame(ProcessVideoFrameContext)

Called when frames are available for processing by a custom video effect.

public : void ProcessFrame(ProcessVideoFrameContext context)public void ProcessFrame(ProcessVideoFrameContext context)Public Function ProcessFrame(context As ProcessVideoFrameContext) As void// You can use this method in JavaScript.
Parameters
context
ProcessVideoFrameContext ProcessVideoFrameContext ProcessVideoFrameContext ProcessVideoFrameContext

The context object that provides the input and output frames for the process operation.

SetEncodingProperties(VideoEncodingProperties, IDirect3DDevice) SetEncodingProperties(VideoEncodingProperties, IDirect3DDevice) SetEncodingProperties(VideoEncodingProperties, IDirect3DDevice) SetEncodingProperties(VideoEncodingProperties, IDirect3DDevice)

Called to set the encoding properties of a custom video effect.

public : void SetEncodingProperties(VideoEncodingProperties encodingProperties, IDirect3DDevice device)public void SetEncodingProperties(VideoEncodingProperties encodingProperties, IDirect3DDevice device)Public Function SetEncodingProperties(encodingProperties As VideoEncodingProperties, device As IDirect3DDevice) As void// You can use this method in JavaScript.
Parameters
device
IDirect3DDevice IDirect3DDevice IDirect3DDevice IDirect3DDevice

The Microsoft Direct3D device that can be used to create resources based on the media format described by the encoding properties.

See Also