C# Class CustomVideoEffect.VideoEffects.GrayscaleVideoEffect

Applies custom video effect to a media clip, transforming RGB colours to grayscale. Please note that video effects must be implemented in Windows Runtime Components.
Inheritance: IBasicVideoEffect
显示文件 Open project: r2d2rigo/UWP-Samples

Public Methods

Method Description
Close ( MediaEffectClosedReason reason ) : void

Called when the video effect is unloaded, and used for freeing any used resources.

DiscardQueuedFrames ( ) : void

Called when the decoding process needs to skip frames.

ProcessFrame ( ProcessVideoFrameContext context ) : void

Used for applying our video effect to a single frame.

SetEncodingProperties ( VideoEncodingProperties encodingProperties, IDirect3DDevice device ) : void

Called when the encoding properties change.

SetProperties ( IPropertySet configuration ) : void

Called for passing any custom parameters to the video effect.

Method Details

Close() public method

Called when the video effect is unloaded, and used for freeing any used resources.
public Close ( MediaEffectClosedReason reason ) : void
reason MediaEffectClosedReason
return void

DiscardQueuedFrames() public method

Called when the decoding process needs to skip frames.
public DiscardQueuedFrames ( ) : void
return void

ProcessFrame() public method

Used for applying our video effect to a single frame.
public ProcessFrame ( ProcessVideoFrameContext context ) : void
context ProcessVideoFrameContext
return void

SetEncodingProperties() public method

Called when the encoding properties change.
public SetEncodingProperties ( VideoEncodingProperties encodingProperties, IDirect3DDevice device ) : void
encodingProperties Windows.Media.MediaProperties.VideoEncodingProperties
device IDirect3DDevice
return void

SetProperties() public method

Called for passing any custom parameters to the video effect.
public SetProperties ( IPropertySet configuration ) : void
configuration IPropertySet
return void