Class BufferSinkBlock
Buffer sink block. Implements the MediaBlock. Implements the IMediaBlockInternals. Implements the IDisposable.
Inherited Members
Namespace: VisioForge.Core.MediaBlocks.Sinks
Assembly: VisioForge.Core.dll
Syntax
public class BufferSinkBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals
Constructors
BufferSinkBlock()
Initializes a new instance of the BufferSinkBlock class.
Declaration
public BufferSinkBlock()
BufferSinkBlock(AudioFormatX, bool)
Declaration
public BufferSinkBlock(AudioFormatX audioFormat, bool allowFrameDrop = false)
Parameters
Type | Name | Description |
---|---|---|
AudioFormatX | audioFormat | |
bool | allowFrameDrop |
BufferSinkBlock(VideoFormatX, bool)
Declaration
public BufferSinkBlock(VideoFormatX videoFormat, bool allowFrameDrop = false)
Parameters
Type | Name | Description |
---|---|---|
VideoFormatX | videoFormat | |
bool | allowFrameDrop |
Fields
TAG
The tag.
Declaration
protected const string TAG = "BufferSinkBlock"
Field Value
Type | Description |
---|---|
string |
Properties
AllowFrameDrop
Gets or sets a value indicating whether to allow frame drop.
Declaration
public bool AllowFrameDrop { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
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
IsSync
Gets or sets a value indicating whether to sync a stream/streams, for example audio and video. Usually it should be true for playback and capture application and false for transcoding.
Declaration
public bool IsSync { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
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
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. |
GetFilenameOrURL()
Gets the filename or URL.
Declaration
public string GetFilenameOrURL()
Returns
Type | Description |
---|---|
string | System.String. |
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 |
|
SetFilenameOrURL(string)
Sets the filename or URL.
Declaration
public void SetFilenameOrURL(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | The value. |
Events
OnAudioFrameBuffer
This event occurs whenever each new audio frame is received.
Declaration
public event EventHandler<AudioFrameBufferEventArgs> OnAudioFrameBuffer
Event Type
Type | Description |
---|---|
EventHandler<AudioFrameBufferEventArgs> |
OnDataFrameBuffer
This event occurs whenever each new data frame is received.
Declaration
public event EventHandler<DataFrameEventArgs> OnDataFrameBuffer
Event Type
Type | Description |
---|---|
EventHandler<DataFrameEventArgs> |
OnSample
This event occurs whenever each new sample is received. If this event is used, the sample should be disposed after usage. Other events like OnVideoFrameBuffer, OnAudioFrameBuffer, OnDataFrameBuffer will not be called.
Declaration
public event EventHandler<Sample> OnSample
Event Type
Type | Description |
---|---|
EventHandler<Sample> |
OnVideoFrameBuffer
This event occurs whenever each new video frame is received.
Declaration
public event EventHandler<VideoFrameXBufferEventArgs> OnVideoFrameBuffer
Event Type
Type | Description |
---|---|
EventHandler<VideoFrameXBufferEventArgs> |