VNMediaClientNET

Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
VideoNext::MediaReciever Class Reference

Managed wrapper for VideoNEXT media player. More...

`#include <MediaReciever.h>`

Inheritance diagram for VideoNext::MediaReciever:

## Public Member Functions
| MediaReciever (DecoderType decoderType, Int32 cacheSizeMegabytes, RtpTransport rtpTransport, PixelFormat pixelFormat, Int32 bufferLength)
| Constructor. More...
| ~MediaReciever ()
void | Play (String^ url)
| Starts video playing. More...
void | Pause ()
| Pauses playback.
void | Resume (PlaybackDirection direction)
| Resumes paused playback. More...
void | SetPlaybackSpeed (Double speed)
| Sets playback speed. More...
void | GotoTime (DateTime time)
| Sets position in a video. More...
bool | StartRecording (String^ filename, Dictionary< String^, String^>^ metadata)
| Starts video recording to a QuickTime Movie (MOV) file on a hard drive. More...
bool | EndRecording ()
| Ends video recording started by StartRecording call. More...

## Static Public Member Functions
static bool | IsPlayingState (StreamState state)
| Returns true if given state is a playing state. More...

## Public Attributes
property StreamState | State
| Media player state. More...
property bool | IsPaused
| True if playback is paused.
property bool | IsPlaying
| True if media player is in a playing state.
event EventHandler< VideoFrameEventArgs^> | OnVideoFrame
| Event is invoked on new video frame arrived. More...
event EventHandler< StreamStateEventArgs^> | OnStreamState
| Event is invoked when a player state changed. More...
event EventHandler< CacheBoundariesEventArgs^> | OnBufferBoundaries
| Event is invoked when player cache boundaries changed. More...
event EventHandler< MessageLogEventArgs^> | OnMessageLog
| Event is invoked on a new information message arrived from the player. More...
event EventHandler< StreamEventArgs^> | OnStreamAdded
| Event is invoked when a video stream added. Can be used to get video info for any type of source and metadata in case of file playback. More...
event EventHandler< StreamEventArgs^> | OnStreamDeleted
| Event is invoked when a video stream removed. More...
event EventHandler< RecordingStatusEventArgs^> | OnRecordingStatusChange
| Event is invoked when recording to a file status changed. More...

## Protected Member Functions
virtual void | OnNewFrame (const vn_player_frame_t *frame, const vn_player_cache_boundaries_t *bounds)
virtual void | OnBufferChanged (const vn_player_cache_boundaries_t *bounds)
virtual void | OnStateChanged (VN_PLAYER_STREAM_STATE state, const vn_player_result_status_t *result_status)
virtual void | OnNewStream (const vn_player_stream_info_t *stream_info)
virtual void | OnStreamRemoved (const vn_player_stream_info_t *stream_info)
virtual void | OnRecordingStatusChanged (const vn_player_recording_status_t *status)
virtual void | OnMsgLog (const char *message)

## Detailed Description

Managed wrapper for VideoNEXT media player.

## Constructor & Destructor Documentation

## ◆ MediaReciever()

VideoNext::MediaReciever::MediaReciever | ( | DecoderType | decoderType,
|  | Int32 | cacheSizeMegabytes,
|  | RtpTransport | rtpTransport,
|  | PixelFormat | pixelFormat,
|  | Int32 | bufferLength
| ) |  |

Constructor.

Parameters

  decoderType | preferable choice is SoftwareMT.
  cacheSizeMegabytes | cache size in MB.
  rtpTransport | RTP transport, preferable choice is TCP.
  pixelFormat | preferable choice is RGB32.
  bufferLength | jitter buffer length in milliseconds.

See also
  DecoderType
  RtpTransport
  PixelFormat

## ◆ ~MediaReciever()

VideoNext::MediaReciever::~MediaReciever | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ EndRecording()

bool VideoNext::MediaReciever::EndRecording | ( |  | ) |

Ends video recording started by StartRecording call.

Returns
  true if recording was started and ended.

See also
  StartRecording

## ◆ GotoTime()

void VideoNext::MediaReciever::GotoTime | ( | DateTime | time | ) |

Sets position in a video.

Parameters

  time | time to set position to. OnVideoFrame event can be used to get frame times.

See also
  OnVideoFrame

## ◆ IsPlayingState()

bool VideoNext::MediaReciever::IsPlayingState | ( | StreamState | state | ) |
| static

Returns true if given state is a playing state.

Parameters

  state | state to get information for.

Returns
  true if given state is a playing state.

See also
  StreamState

## ◆ Play()

void VideoNext::MediaReciever::Play | ( | String^ | url | ) |

Starts video playing.

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::MediaReciever::Resume | ( | PlaybackDirection | direction | ) |

Resumes paused playback.

Parameters

  direction | playback direction - forward or backward.

See also
  PlaybackDirection

## ◆ SetPlaybackSpeed()

void VideoNext::MediaReciever::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::MediaReciever::StartRecording | ( | String^ | filename,
|  | Dictionary< String^, String^>^ | metadata
| ) |  |

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

Parameters

  filename | full path and name of file to write to.
  metadata | video clip metadata dictionary. SkmXmlApi.Camera.CameraData dictionary can be used to populate metadata.

Returns
  true if recording started.

## Member Data Documentation

## ◆ OnBufferBoundaries

event EventHandler<CacheBoundariesEventArgs^> VideoNext::MediaReciever::OnBufferBoundaries

Event is invoked when player cache boundaries changed.

See also
  CacheBoundariesEventArgs

## ◆ OnMessageLog

event EventHandler<MessageLogEventArgs^> VideoNext::MediaReciever::OnMessageLog

Event is invoked on a new information message arrived from the player.

See also
  MessageLogEventArgs

## ◆ OnRecordingStatusChange

event EventHandler<RecordingStatusEventArgs^> VideoNext::MediaReciever::OnRecordingStatusChange

Event is invoked when recording to a file status changed.

See also
  RecordingStatusEventArgs

## ◆ OnStreamAdded

event EventHandler<StreamEventArgs^> VideoNext::MediaReciever::OnStreamAdded

Event is invoked when a video stream added. Can be used to get video info for any type of source and metadata in case of file playback.

See also
  StreamEventArgs

## ◆ OnStreamDeleted

event EventHandler<StreamEventArgs^> VideoNext::MediaReciever::OnStreamDeleted

Event is invoked when a video stream removed.

See also
  StreamEventArgs

## ◆ OnStreamState

event EventHandler<StreamStateEventArgs^> VideoNext::MediaReciever::OnStreamState

Event is invoked when a player state changed.

See also
  StreamStateEventArgs

## ◆ OnVideoFrame

event EventHandler<VideoFrameEventArgs^> VideoNext::MediaReciever::OnVideoFrame

Event is invoked on new video frame arrived.

See also
  VideoFrameEventArgs

## ◆ State

property StreamState VideoNext::MediaReciever::State

Media player state.

See also
  StreamState

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

- src/VNMediaClientNET/MediaReciever.h
- src/VNMediaClientNET/MediaReciever.cpp