Class VideoSampleGrabberBlock
Video sample grabber block. Implements the MediaBlock. Implements the IMediaBlockInternals. Implements the IDisposable.
Inherited Members
Namespace: VisioForge.Core.MediaBlocks.VideoProcessing
Assembly: VisioForge.Core.dll
Syntax
public class VideoSampleGrabberBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals
Constructors
VideoSampleGrabberBlock(VideoFormatX, bool, bool)
Initializes a new instance of the VideoSampleGrabberBlock class.
Declaration
public VideoSampleGrabberBlock(VideoFormatX format = VideoFormatX.RGBA, bool addNullRenderer = false, bool nullRendererSync = false)
Parameters
Type | Name | Description |
---|---|---|
VideoFormatX | format | The format. |
bool | addNullRenderer | if set to |
bool | nullRendererSync | if set to |
Fields
TAG
The tag.
Declaration
protected const string TAG = "VideoSampleGrabberBlock"
Field Value
Type | Description |
---|---|
string |
Properties
Input
Gets the input.
Declaration
public override MediaBlockPad Input { get; }
Property Value
Type | Description |
---|---|
MediaBlockPad | The input. |
Overrides
Inputs
Gets the inputs.
Declaration
public override MediaBlockPad[] Inputs { get; }
Property Value
Type | Description |
---|---|
MediaBlockPad[] | The inputs. |
Overrides
Output
Gets the output.
Declaration
public override MediaBlockPad Output { get; }
Property Value
Type | Description |
---|---|
MediaBlockPad | The output. |
Overrides
Outputs
Gets the outputs.
Declaration
public override MediaBlockPad[] Outputs { get; }
Property Value
Type | Description |
---|---|
MediaBlockPad[] | The outputs. |
Overrides
SaveLastFrame
Gets or sets a value indicating whether to save the last frame. You can use it to take a snapshot with GetFrame() method.
Declaration
public bool SaveLastFrame { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
Type
Gets the type.
Declaration
public override MediaBlockType Type { get; }
Property Value
Type | Description |
---|---|
MediaBlockType | The type. |
Overrides
Methods
Build()
Builds this instance.
Declaration
public override bool Build()
Returns
Type | Description |
---|---|
bool |
|
Overrides
CleanUp()
Cleans up.
Declaration
public void CleanUp()
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing |
|
Overrides
GetCore()
Gets core.
Declaration
public BaseElement GetCore()
Returns
Type | Description |
---|---|
BaseElement | VisioForge.Core.GStreamer.Base.BaseElement. |
GetElement()
Gets the element.
Declaration
public Element GetElement()
Returns
Type | Description |
---|---|
Element | Gst.Element. |
GetLastFrame()
Gets the last frame.
Declaration
public VideoFrameX GetLastFrame()
Returns
Type | Description |
---|---|
VideoFrameX | VideoFrameX. |
GetLastFrameAsBitmap()
Gets the last frame as a System.Drawing.Bitmap.
Declaration
public Bitmap GetLastFrameAsBitmap()
Returns
Type | Description |
---|---|
Bitmap | VideoFrameX. |
GetLastFrameAsSKBitmap()
Gets the last frame as a SkiaSharp.SKBitmap.
Declaration
public SKBitmap GetLastFrameAsSKBitmap()
Returns
Type | Description |
---|---|
SKBitmap | VideoFrameX. |
IsAvailable()
Determines whether this media block is available. Correct NuGet SDK redist should be included into your project.
Declaration
public static bool IsAvailable()
Returns
Type | Description |
---|---|
bool |
|
Events
OnVideoFrameBitmap
This event occurs whenever each new video frame is received.
Declaration
public event EventHandler<VideoFrameBitmapEventArgs> OnVideoFrameBitmap
Event Type
Type | Description |
---|---|
EventHandler<VideoFrameBitmapEventArgs> |
OnVideoFrameBuffer
This event occurs whenever each new video frame is received.
Declaration
public event EventHandler<VideoFrameXBufferEventArgs> OnVideoFrameBuffer
Event Type
Type | Description |
---|---|
EventHandler<VideoFrameXBufferEventArgs> |
OnVideoFrameSKBitmap
This event occurs whenever each new video frame is received (SkiaSharp Bitmap).
Declaration
public event EventHandler<VideoFrameSKBitmapEventArgs> OnVideoFrameSKBitmap
Event Type
Type | Description |
---|---|
EventHandler<VideoFrameSKBitmapEventArgs> |