VNWinFormsPlayer

Public Member Functions | Protected Member Functions | Properties | Events | List of all members
VideoNext.WindowsForms.Player.SkmVideoPlayer Class Reference

Windows Forms VideoNEXT media player control. More...

Inheritance diagram for VideoNext.WindowsForms.Player.SkmVideoPlayer:

## Public Member Functions
| SkmVideoPlayer ()
| Constructor. More...
void | Play (string url)
| Starts video playback. More...
void | Stop ()
| Puts the player in stopped state More...
void | Resume (PlaybackDirection direction)
| Resumes paused playback. More...
void | GotoTime (DateTime time)
| Sets position in a video. More...
void | Pause ()
| Pauses playback. More...
void | SaveSnapshot (string fileName)
| Saves current frame to the file More...
bool | SaveSnapshotUIPause ()
| Shows save dialog and saves snapshot. Video is paused while dialog is shown. More...
bool | SaveSnapshotUI ()
| Shows save dialog and saves snapshot. More...
void | SetPlaybackSpeed (double speed)
| Sets playback speed. More...
bool | StartRecording (string filename)
| Starts video recording to a QuickTime Movie (MOV) file on a hard drive. More...
bool | EndRecording ()
| Ends video recording started by StartRecording call. More...
bool | StartRecordingUI ()
| Displays dialog for selection of video file name to start recording to and starts recording. More...

## Protected Member Functions
override void | OnResize (EventArgs e)
| OnResize overridden method. More...
override void | Dispose (bool disposing)
| Clean up any resources being used. More...

## Properties
RendererType | Renderer`[get, set]`
| Graphics renderer type. More...
string[] | VisibleMetadata`[get, set]`
| Visible metadata. More...
TimeSpan | FrameTimeout`[get, set]`
| The amount of time that needs to pass without getting a media sample, before a timeout occurs and the player is stopped More...
DateTime? | CurrentTime`[get, set]`
| The current time of the media player. More...
RtpTransport | Transport`[get, set]`
| The network transport that is used for the player More...
uint | DropFrameInterval`[get, set]`
| The drop frame interval, used to determine if a frame should not be rendered to save performance More...
int | CacheSizeMegabytes`[get, set]`
| Media player cache size in MB. More...
StreamState | CurrentState`[get]`
| The current play state of the player More...
Size? | VideoSize`[get, set]`
| Video size. More...
bool | MaintainAspectRatio`[get, set]`
| If true, the video will maintain the aspect ratio of the original video. Otherwise the video will stretch to the container's bounds. More...
PixelFormat | Format`[get, set]`
| The pixel format to use for the player (RGB 32 or RGB 24, RGB 32 is preferable). More...
int | BufferLength`[get, set]`
| Jitter buffer length in milliseconds. More...
bool | IsPaused`[get]`
| True if player is paused. More...
bool | IsPlaying`[get]`
| True if player is playing video. More...
string | TimeFormat`[get, set]`
| Format of time displayed in the video window. (.NET syntax). More...
string | OnScreenDisplayFormat`[get, set]`
| On screen display info template. The following placeholders can be used: {Name}, {Title}, {Time} and any key from CameraData dictionary. More...
OnScreenDisplayPosition | OnScreenDisplayPosition`[get, set]`
| On screen display info position in the video window. More...
string | TimeZone`[get, set]`
| Time zone name in IANA format. More...
Dictionary< string, string >?? | CameraData`[get, set]`
| Camera metadata. Can contain the following keys: Id, Name, TimeZone, PTZ, MD, Analytics, GeoLat, GeoLong, GeoAlt, Location, Note, AudioId, AudioName, etc. More...
RecordingStatus | RecordingStatus`[get]`
| Video recording to a local file status. More...

## Events
EventHandler< StreamStateChangedEventArgs > | CurrentStateChanged
| Media player state changed event. More...
EventHandler< ValueChangedEventArgs< DateTime > > | CurrentTimeChanged
| Current frame time changed event. More...
EventHandler< ValueChangedEventArgs< Size > > | VideoSizeChanged
| Video size changed event. More...
EventHandler< MessageLogEventArgs > | MessageLog
| Media player info message arrived event. More...
EventHandler< StreamEventArgs > | StreamAdded
| Media stream added event (occurs on opening video source). More...
EventHandler< StreamEventArgs > | StreamRemoved
| Media stream removed event. More...
EventHandler< RecordingStatusEventArgs > | RecordingStatusChanged
| Recording to local video file status change event. More...

## Detailed Description

Windows Forms VideoNEXT media player control.

## Constructor & Destructor Documentation

## ◆ SkmVideoPlayer()

VideoNext.WindowsForms.Player.SkmVideoPlayer.SkmVideoPlayer | ( |  | ) |

Constructor.

## Member Function Documentation

## ◆ Dispose()

override void VideoNext.WindowsForms.Player.SkmVideoPlayer.Dispose | ( | bool | disposing | ) |
| protected

Clean up any resources being used.

Parameters

  disposing | true if managed resources should be disposed; otherwise, false.

## ◆ EndRecording()

bool VideoNext.WindowsForms.Player.SkmVideoPlayer.EndRecording | ( |  | ) |

Ends video recording started by StartRecording call.

Returns
  true if recording was started and ended

## ◆ GotoTime()

void VideoNext.WindowsForms.Player.SkmVideoPlayer.GotoTime | ( | DateTime | time | ) |

Sets position in a video.

Parameters

  time | frame time

## ◆ OnResize()

override void VideoNext.WindowsForms.Player.SkmVideoPlayer.OnResize | ( | EventArgs | e | ) |
| protected

OnResize overridden method.

Parameters

  e |

## ◆ Pause()

void VideoNext.WindowsForms.Player.SkmVideoPlayer.Pause | ( |  | ) |

Pauses playback.

## ◆ Play()

void VideoNext.WindowsForms.Player.SkmVideoPlayer.Play | ( | string | url | ) |

Starts video playback.

Parameters

  url | video source URL. For live or archive SkmXmlApi.Camera.GetLiveUrl or SkmXmlApi.Camera.GetArchiveUrl should be used to get URL, for file playback URL should be in format "file://full_path_to_file"

## ◆ Resume()

void VideoNext.WindowsForms.Player.SkmVideoPlayer.Resume | ( | PlaybackDirection | direction | ) |

Resumes paused playback.

Parameters

  direction | playback direction

## ◆ SaveSnapshot()

void VideoNext.WindowsForms.Player.SkmVideoPlayer.SaveSnapshot | ( | string | fileName | ) |

Saves current frame to the file

Parameters

  fileName | File name to save image, extension used to select encoder (using JPEG by default)

## ◆ SaveSnapshotUI()

bool VideoNext.WindowsForms.Player.SkmVideoPlayer.SaveSnapshotUI | ( |  | ) |

Shows save dialog and saves snapshot.

Returns
  true if save was done, false otherwise

## ◆ SaveSnapshotUIPause()

bool VideoNext.WindowsForms.Player.SkmVideoPlayer.SaveSnapshotUIPause | ( |  | ) |

Shows save dialog and saves snapshot. Video is paused while dialog is shown.

Returns
  true if save was done, false otherwise

## ◆ SetPlaybackSpeed()

void VideoNext.WindowsForms.Player.SkmVideoPlayer.SetPlaybackSpeed | ( | double | speed | ) |

Sets playback speed.

Parameters

  speed | 1 for normal speed, greater than 1 for fast play, less than 1 for slow play

## ◆ StartRecording()

bool VideoNext.WindowsForms.Player.SkmVideoPlayer.StartRecording | ( | string | filename | ) |

Starts video recording to a QuickTime Movie (MOV) file on a hard drive.

Parameters

  filename | full path and name of file to write to

Returns
  true if recording started

## ◆ StartRecordingUI()

bool VideoNext.WindowsForms.Player.SkmVideoPlayer.StartRecordingUI | ( |  | ) |

Displays dialog for selection of video file name to start recording to and starts recording.

Returns
  true if recording was started

## ◆ Stop()

void VideoNext.WindowsForms.Player.SkmVideoPlayer.Stop | ( |  | ) |

Puts the player in stopped state

## Property Documentation

## ◆ BufferLength

int VideoNext.WindowsForms.Player.SkmVideoPlayer.BufferLength
| get set

Jitter buffer length in milliseconds.

## ◆ CacheSizeMegabytes

int VideoNext.WindowsForms.Player.SkmVideoPlayer.CacheSizeMegabytes
| get set

Media player cache size in MB.

## ◆ CameraData

Dictionary<string, string>?? VideoNext.WindowsForms.Player.SkmVideoPlayer.CameraData
| get set

Camera metadata. Can contain the following keys: Id, Name, TimeZone, PTZ, MD, Analytics, GeoLat, GeoLong, GeoAlt, Location, Note, AudioId, AudioName, etc.

## ◆ CurrentState

StreamState VideoNext.WindowsForms.Player.SkmVideoPlayer.CurrentState
| get

The current play state of the player

## ◆ CurrentTime

DateTime? VideoNext.WindowsForms.Player.SkmVideoPlayer.CurrentTime
| get set

The current time of the media player.

## ◆ DropFrameInterval

uint VideoNext.WindowsForms.Player.SkmVideoPlayer.DropFrameInterval
| get set

The drop frame interval, used to determine if a frame should not be rendered to save performance

## ◆ Format

PixelFormat VideoNext.WindowsForms.Player.SkmVideoPlayer.Format
| get set

The pixel format to use for the player (RGB 32 or RGB 24, RGB 32 is preferable).

## ◆ FrameTimeout

TimeSpan VideoNext.WindowsForms.Player.SkmVideoPlayer.FrameTimeout
| get set

The amount of time that needs to pass without getting a media sample, before a timeout occurs and the player is stopped

## ◆ IsPaused

bool VideoNext.WindowsForms.Player.SkmVideoPlayer.IsPaused
| get

True if player is paused.

## ◆ IsPlaying

bool VideoNext.WindowsForms.Player.SkmVideoPlayer.IsPlaying
| get

True if player is playing video.

## ◆ MaintainAspectRatio

bool VideoNext.WindowsForms.Player.SkmVideoPlayer.MaintainAspectRatio
| get set

If true, the video will maintain the aspect ratio of the original video. Otherwise the video will stretch to the container's bounds.

## ◆ OnScreenDisplayFormat

string VideoNext.WindowsForms.Player.SkmVideoPlayer.OnScreenDisplayFormat
| get set

On screen display info template. The following placeholders can be used: {Name}, {Title}, {Time} and any key from CameraData dictionary.

## ◆ OnScreenDisplayPosition

OnScreenDisplayPosition VideoNext.WindowsForms.Player.SkmVideoPlayer.OnScreenDisplayPosition
| get set

On screen display info position in the video window.

## ◆ RecordingStatus

RecordingStatus VideoNext.WindowsForms.Player.SkmVideoPlayer.RecordingStatus
| get

Video recording to a local file status.

## ◆ Renderer

RendererType VideoNext.WindowsForms.Player.SkmVideoPlayer.Renderer
| get set

Graphics renderer type.

## ◆ TimeFormat

string VideoNext.WindowsForms.Player.SkmVideoPlayer.TimeFormat
| get set

Format of time displayed in the video window. (.NET syntax).

## ◆ TimeZone

string VideoNext.WindowsForms.Player.SkmVideoPlayer.TimeZone
| get set

Time zone name in IANA format.

## ◆ Transport

RtpTransport VideoNext.WindowsForms.Player.SkmVideoPlayer.Transport
| get set

The network transport that is used for the player

## ◆ VideoSize

Size? VideoNext.WindowsForms.Player.SkmVideoPlayer.VideoSize
| get set

Video size.

## ◆ VisibleMetadata

string [] VideoNext.WindowsForms.Player.SkmVideoPlayer.VisibleMetadata
| get set

Visible metadata.

## Event Documentation

## ◆ CurrentStateChanged

EventHandler<StreamStateChangedEventArgs> VideoNext.WindowsForms.Player.SkmVideoPlayer.CurrentStateChanged

Media player state changed event.

## ◆ CurrentTimeChanged

EventHandler<ValueChangedEventArgs<DateTime> > VideoNext.WindowsForms.Player.SkmVideoPlayer.CurrentTimeChanged

Current frame time changed event.

## ◆ MessageLog

EventHandler<MessageLogEventArgs> VideoNext.WindowsForms.Player.SkmVideoPlayer.MessageLog

Media player info message arrived event.

## ◆ RecordingStatusChanged

EventHandler<RecordingStatusEventArgs> VideoNext.WindowsForms.Player.SkmVideoPlayer.RecordingStatusChanged

Recording to local video file status change event.

## ◆ StreamAdded

EventHandler<StreamEventArgs> VideoNext.WindowsForms.Player.SkmVideoPlayer.StreamAdded

Media stream added event (occurs on opening video source).

## ◆ StreamRemoved

EventHandler<StreamEventArgs> VideoNext.WindowsForms.Player.SkmVideoPlayer.StreamRemoved

Media stream removed event.

## ◆ VideoSizeChanged

EventHandler<ValueChangedEventArgs<Size> > VideoNext.WindowsForms.Player.SkmVideoPlayer.VideoSizeChanged

Video size changed event.

The documentation for this class was generated from the following files:

- src/VideoNext.WindowsForms.Player/SkmVideoPlayer.cs
- src/VideoNext.WindowsForms.Player/SkmVideoPlayer.Designer.cs