Class VideoRendererBlock
Default video renderer block for all platforms. Implements the MediaBlock. Implements the IMediaBlockInternals. Implements the IDisposable.
Inherited Members
Namespace: VisioForge.Core.MediaBlocks.VideoRendering
Assembly: VisioForge.Core.dll
Syntax
public class VideoRendererBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals, IMediaBlockRenderer, IGetVideoStreamInfo
Constructors
VideoRendererBlock(MediaBlocksPipeline, nint)
Initializes a new instance of the VideoRendererBlock class.
Declaration
public VideoRendererBlock(MediaBlocksPipeline pipeline, nint windowHandle)
Parameters
Type | Name | Description |
---|---|---|
MediaBlocksPipeline | pipeline | Tthe pipeline. |
nint | windowHandle | The window handle. |
VideoRendererBlock(MediaBlocksPipeline, IVideoView)
Initializes a new instance of the VideoRendererBlock class.
Declaration
public VideoRendererBlock(MediaBlocksPipeline pipeline, IVideoView videoView)
Parameters
Type | Name | Description |
---|---|---|
MediaBlocksPipeline | pipeline | Tthe pipeline. |
IVideoView | videoView | The video view. |
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
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
Settings
Gets or sets the settings.
Declaration
public VideoRendererSettingsX Settings { get; set; }
Property Value
Type | Description |
---|---|
VideoRendererSettingsX | The settings. |
SubtitleEnabled
Gets or sets a value indicating whether subtitles are enabled.
Declaration
public bool SubtitleEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
SubtitleExternalFile
Gets or sets the subtitle external file (optional).
Declaration
public string SubtitleExternalFile { get; set; }
Property Value
Type | Description |
---|---|
string | The subtitle external file. |
SubtitleSettings
Gets or sets the subtitle settings.
Declaration
public SubtitleOverlaySettings SubtitleSettings { get; set; }
Property Value
Type | Description |
---|---|
SubtitleOverlaySettings | The subtitle settings. |
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()
ClearHandle()
Clears the handle.
Declaration
public void ClearHandle()
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing |
|
Overrides
FrameStep(int, double)
Performs the frame step.
Declaration
public bool FrameStep(int framesCount, double rate)
Parameters
Type | Name | Description |
---|---|---|
int | framesCount | The frames count. |
double | rate | The rate. |
Returns
Type | Description |
---|---|
bool |
|
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. |
GetVideoStreamInfo()
Gets the video stream information.
Declaration
public VideoStreamInfo GetVideoStreamInfo()
Returns
Type | Description |
---|---|
VideoStreamInfo | VideoStreamInfo. |
GetVideoView()
Gets the video view.
Declaration
public IVideoView GetVideoView()
Returns
Type | Description |
---|---|
IVideoView | IVideoView. |
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 |
|
SetRate(double, Pipeline)
Sets the rate.
Declaration
public bool SetRate(double rate, Pipeline pipeline)
Parameters
Type | Name | Description |
---|---|---|
double | rate | The rate. |
Pipeline | pipeline | The pipeline. |
Returns
Type | Description |
---|---|
bool |
|
Snapshot_Get()
Gets the snapshot as SKBitmap.
Declaration
public SKBitmap Snapshot_Get()
Returns
Type | Description |
---|---|
SKBitmap | SKBitmap. |
Snapshot_GetAsync()
Gets the snapshot as SKBitmap (async).
Declaration
public Task<SKBitmap> Snapshot_GetAsync()
Returns
Type | Description |
---|---|
Task<SKBitmap> | Task<SKBitmap>. |
Snapshot_Save(string, SKEncodedImageFormat, int)
Saves snapshot to a file.
Declaration
public bool Snapshot_Save(string filename, SKEncodedImageFormat format, int quality = 85)
Parameters
Type | Name | Description |
---|---|---|
string | filename | File name. |
SKEncodedImageFormat | format | Format. |
int | quality | Quality. |
Returns
Type | Description |
---|---|
bool |
|
Snapshot_SaveAsync(string, SKEncodedImageFormat, int)
Saves snapshot to a file (async).
Declaration
public Task<bool> Snapshot_SaveAsync(string filename, SKEncodedImageFormat format, int quality = 85)
Parameters
Type | Name | Description |
---|---|---|
string | filename | File name. |
SKEncodedImageFormat | format | Format. |
int | quality | Quality. |
Returns
Type | Description |
---|---|
Task<bool> |
|
UpdateSubtitleOverlay(SubtitleOverlaySettings)
Updates the subtitle overlay.
Declaration
public void UpdateSubtitleOverlay(SubtitleOverlaySettings settings)
Parameters
Type | Name | Description |
---|---|---|
SubtitleOverlaySettings | settings | The settings. |