Class CustomVideoSampleGrabberEffect
- Namespace
- VisioForge.Core.Types.X.VideoEffects
- Assembly
- VisioForge.Core.dll
Custom video sample grabber effect that allows capturing video frames for processing.
public class CustomVideoSampleGrabberEffect : BaseVideoEffect, IBaseVideoEffectInheritance
Implements
Inherited Members
Constructors
CustomVideoSampleGrabberEffect(VideoFormatX, string)
Initializes a new instance of the VisioForge.Core.Types.X.VideoEffects.CustomVideoSampleGrabberEffect class.
public CustomVideoSampleGrabberEffect(VideoFormatX format, string name = "custom-video-sg")Parameters
formatVideoFormatX-
The video format for captured frames.
namestring-
The name of the effect.
Fields
DefaultName
The default name.
public static string DefaultNameField Value
Properties
AllowFrameModification
Gets or sets whether an VisioForge.Core.Types.X.VideoEffects.CustomVideoSampleGrabberEffect.OnVideoFrameBuffer handler may modify the frame data in place.
On a running pipeline a change applies when the effect is passed again to AddOrUpdateAsync
(Video_Effects_AddOrUpdateAsync on VideoCaptureCoreX and MediaPlayerCoreX); until then no frames are delivered.
When set, the frame is mapped for writing, so the changes go downstream
and never into a frame another branch of the pipeline is reading. That costs a frame copy when the
frame memory is shared or read-only.
public bool AllowFrameModification { get; set; }Property Value
Format
Gets or sets the format.
On a running pipeline a change applies when the effect is passed again to AddOrUpdateAsync
(Video_Effects_AddOrUpdateAsync on VideoCaptureCoreX and MediaPlayerCoreX); until then no frames are delivered.
public VideoFormatX Format { get; set; }Property Value
OnVideoFrameBuffer
This event occurs whenever each new video frame is received.
public event EventHandler<VideoFrameXBufferEventArgs> OnVideoFrameBuffer