Class SimplePlayerCoreX
Simple Player cross-platform implementation. Implements the IDisposable. Implements the IAsyncDisposable.
Inherited Members
Namespace: VisioForge.Core.SimplePlayerX
Assembly: VisioForge.Core.dll
Syntax
public class SimplePlayerCoreX : IDisposable, IAsyncDisposable, INotifyPropertyChanged
Constructors
SimplePlayerCoreX(IVideoView)
Initializes a new instance of the SimplePlayerCoreX class.
Declaration
public SimplePlayerCoreX(IVideoView videoView)
Parameters
| Type | Name | Description |
|---|---|---|
| IVideoView | videoView | The video view. |
Properties
Audio_Mute
Gets or sets a value indicating whether to mute audio stream.
Declaration
public bool Audio_Mute { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Audio_Streams
Gets the audio streams.
Declaration
public ObservableCollection<AudioStreamInfo> Audio_Streams { get; }
Property Value
| Type | Description |
|---|---|
| ObservableCollection<AudioStreamInfo> |
Audio_Streams_MixAll
Gets or sets a value indicating whether all audio streams will be mixed and played.
Declaration
public bool Audio_Streams_MixAll { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Audio_Volume
Gets or sets the audio volume.
Declaration
public double Audio_Volume { get; set; }
Property Value
| Type | Description |
|---|---|
| double | The audio volume. |
Debug_Dir
Gets or sets debug directory.
Declaration
public string Debug_Dir { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Debug_DisableMessageDialogs
Gets or sets a value indicating whether message dialog will be shown in case of error if OnError event is not implemented.
Declaration
public bool Debug_DisableMessageDialogs { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Debug_Mode
Gets or sets a value indicating whether debug mode enabled.
Declaration
public bool Debug_Mode { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Debug_Telemetry
Gets or sets a value indicating whether sending telemetry enabled (only during debugging in Visual Studio).
Declaration
public bool Debug_Telemetry { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
Only anonymous data will be send.
SDK_BuildDate
Gets SDK build date.
Declaration
public static DateTime SDK_BuildDate { get; }
Property Value
| Type | Description |
|---|---|
| DateTime | The SDK build date. |
SDK_Version
Gets SDK version.
Declaration
public static Version SDK_Version { get; }
Property Value
| Type | Description |
|---|---|
| Version | The SDK version. |
State
Gets the state.
Declaration
public PlaybackState State { get; }
Property Value
| Type | Description |
|---|---|
| PlaybackState | The state. |
Subtitle_Streams
Gets the subtitle streams.
Declaration
public ObservableCollection<SubtitleStreamInfo> Subtitle_Streams { get; }
Property Value
| Type | Description |
|---|---|
| ObservableCollection<SubtitleStreamInfo> |
Video_Streams
Gets the video streams.
Declaration
public ObservableCollection<VideoStreamInfo> Video_Streams { get; }
Property Value
| Type | Description |
|---|---|
| ObservableCollection<VideoStreamInfo> |
Methods
Audio_Stream_Select(AudioStreamInfo)
Selects the audio stream.
Declaration
public bool Audio_Stream_Select(AudioStreamInfo stream)
Parameters
| Type | Name | Description |
|---|---|---|
| AudioStreamInfo | stream | The stream. |
Returns
| Type | Description |
|---|---|
| bool |
|
Audio_Streams_Current()
Returns current audio stream.
Declaration
public int Audio_Streams_Current()
Returns
| Type | Description |
|---|---|
| int | System.Int32. |
Debug_SavePipeline(string)
Saves the pipeline.
Declaration
public void Debug_SavePipeline(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
|
DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
Declaration
public ValueTask DisposeAsync()
Returns
| Type | Description |
|---|---|
| ValueTask | A task that represents the asynchronous dispose operation. |
Duration()
Gets duration.
Declaration
public TimeSpan Duration()
Returns
| Type | Description |
|---|---|
| TimeSpan | TimeSpan. |
DurationAsync()
Gets duration (async).
Declaration
public Task<TimeSpan> DurationAsync()
Returns
| Type | Description |
|---|---|
| Task<TimeSpan> | Task<TimeSpan>. |
~SimplePlayerCoreX()
Finalizes an instance of the SimplePlayerCoreX class.
Declaration
protected ~SimplePlayerCoreX()
GetContext()
Gets the context.
Declaration
public ContextX GetContext()
Returns
| Type | Description |
|---|---|
| ContextX | GSTContext. |
GetLogger()
Gets the logger.
Declaration
public ILogger GetLogger()
Returns
| Type | Description |
|---|---|
| ILogger | ILogger. |
OnPropertyChanged(string)
OnPropertyChanged API.
Declaration
protected virtual void OnPropertyChanged(string propertyName = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | Property name. |
Pause()
Pauses playback.
Declaration
public bool Pause()
Returns
| Type | Description |
|---|---|
| bool |
|
PauseAsync()
Pauses playback (async).
Declaration
public Task PauseAsync()
Returns
| Type | Description |
|---|---|
| Task | The Task. |
Position_Get()
Gets position.
Declaration
public TimeSpan Position_Get()
Returns
| Type | Description |
|---|---|
| TimeSpan | TimeSpan. |
Position_GetAsync()
Gets position (async).
Declaration
public Task<TimeSpan> Position_GetAsync()
Returns
| Type | Description |
|---|---|
| Task<TimeSpan> | Task<TimeSpan>. |
Position_Set(TimeSpan, bool)
Sets position.
Declaration
public void Position_Set(TimeSpan position, bool seekToKeyframe = false)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | position | The position. |
| bool | seekToKeyframe | True to seek to a keyframe. |
Position_SetAsync(TimeSpan, bool)
Sets position (async).
Declaration
public Task Position_SetAsync(TimeSpan position, bool seekToKeyframe = false)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | position | The position. |
| bool | seekToKeyframe | True to seek to a keyframe. |
Returns
| Type | Description |
|---|---|
| Task | Task. |
Resume()
Resumes playback.
Declaration
public bool Resume()
Returns
| Type | Description |
|---|---|
| bool |
|
ResumeAsync()
Resumes playback (async).
Declaration
public Task ResumeAsync()
Returns
| Type | Description |
|---|---|
| Task | The Task. |
Start(UniversalSourceSettings)
Starts playback.
Declaration
public bool Start(UniversalSourceSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| UniversalSourceSettings | settings | The settings. |
Returns
| Type | Description |
|---|---|
| bool |
|
StartAsync(UniversalSourceSettings)
Start playback (async).
Declaration
public Task<bool> StartAsync(UniversalSourceSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| UniversalSourceSettings | settings | The settings. |
Returns
| Type | Description |
|---|---|
| Task<bool> | Task<System.Boolean>. |
Stop()
Stops this instance.
Declaration
public bool Stop()
Returns
| Type | Description |
|---|---|
| bool |
|
StopAsync()
Stops the playback (async.).
Declaration
public Task<bool> StopAsync()
Returns
| Type | Description |
|---|---|
| Task<bool> |
|
Video_Stream_Select(VideoStreamInfo)
Selects the video stream.
Declaration
public bool Video_Stream_Select(VideoStreamInfo stream)
Parameters
| Type | Name | Description |
|---|---|---|
| VideoStreamInfo | stream | The stream. |
Returns
| Type | Description |
|---|---|
| bool |
Events
OnError
Occurs when error happened.
Declaration
public event EventHandler<ErrorsEventArgs> OnError
Event Type
| Type | Description |
|---|---|
| EventHandler<ErrorsEventArgs> |
OnStop
This event occurs whenever playback is stopped.
Declaration
public event EventHandler<StopEventArgs> OnStop
Event Type
| Type | Description |
|---|---|
| EventHandler<StopEventArgs> |
OnStreamsInfoAvailable
Event occurring on file streams information is available..
Declaration
public event EventHandler<EventArgs> OnStreamsInfoAvailable
Event Type
| Type | Description |
|---|---|
| EventHandler<EventArgs> |
PropertyChanged
Property changed event.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
| Type | Description |
|---|---|
| PropertyChangedEventHandler |