A video player object which is able to play h.264 / h.265 video files and video streams. More...
Classes | |
class | AcceleratorOption |
class | ConnectionTimeoutOption |
class | CredentialsOption |
class | DidChangePausedStateEventArgs |
class | DidDecodeEventArgs |
class | DidDetectErrorEventArgs |
class | FramePoolOption |
Initial size of the internal video decoder frame pool. FramePoolInitialSizePlatformDefault means that the size should be auto-configured for the platform. FramePoolInitialSizeDecoderDefault means that the size should be auto-configured for the decoder. Valid values for explicit sizes are 1 to 32. If 0 is specified it is considered invalid and will be bumped up to a size of 1. More... | |
class | LensCorrectionOption |
class | MirroringOption |
class | Option |
Options which control how the video player opens the video stream and how it should tread it. E.g. apply lens correction to it. More... | |
class | RotationOption |
Rotate the video image clock-wise. More... | |
class | RtspOption |
class | SeekOperation |
class | SyncToVideoClockOption |
class | VideoCropOption |
Public Types | |
enum | RtspTransport { RtspTransport.Tcp, RtspTransport.Udp, RtspTransport.UdpMulticast } |
The supported RTSP / RTP transport protocols. More... | |
Public Member Functions | |
delegate void | SeekCompletion (Exception error) |
Seek callback. More... | |
VideoPlayer (Uri url) | |
A VideoPlayer allows you to play back a video file or a HTTP / RTSP video stream. Note that the video player supports video streams only - it does not support audio streams at all. More... | |
VideoPlayer (Uri url, List< Option > options) | |
void | Dispose () |
void | Dispose (bool disposing) |
void | Stop () |
Stops the video player in preparation for destruction. More... | |
void | Preroll () |
Preroll the video player if it hasn't already been prerolled. More... | |
void | FrameStep (int frameCount) |
void | Seek (Microseconds time, bool exact, SeekCompletion completion) |
Seeks to the given time. Note that the seek operation will take a while. Invokes the completion handler once seeking is done. More... | |
void | CancelSeek () |
Cancels an active seek operation. More... | |
Properties | |
VideoPlayerStatistics | Statistics [get] |
The current player statistics. More... | |
Uri | Url [get] |
Returns the URL from which the player plays back. More... | |
List< Option > | Options [get] |
Returns the options with which the video player was created. More... | |
VideoSourceType | SourceType [get] |
Returns the source type. More... | |
double | LowLightThreshold [get, set] |
The contrast enhancement low-light-threshold. More... | |
double | ExposureBoost [get, set] |
The contrast enhancement exposure boost. More... | |
bool | ContrastEnhancementEnabled [get, set] |
Enables or disables contrast enhancement. More... | |
bool | DetectionOnlyContrastEnhancement [get, set] |
Enables / disables deferring of contrast enhancement from the camera side to the face detector side. More... | |
double | FrameRate [get] |
Returns the frame rate in frames per seconds. More... | |
Size | VideoResolution [get] |
Returns the video resolution. More... | |
double | PlaybackRate [get, set] |
Returns the playback rate. More... | |
bool | Paused [get, set] |
Returns true if the player is paused. More... | |
Microseconds | CurrentTime [get] |
Returns the current playback time. More... | |
Microseconds | Duration [get] |
Returns the duration. More... | |
Events | |
EventHandler< DidDecodeEventArgs > | DidDecode |
Invoked after the player has decoded another video frame. More... | |
EventHandler< DidDetectErrorEventArgs > | DidDetectError |
Invoked if the video player has detected an error while trying to play back the video file / stream. More... | |
EventHandler | DidFinishPrerolling |
Invoked after the video player has finished prerolling the video file / stream. More... | |
EventHandler | DidChangePausedState |
Invoked after the state of the paused flag has changed. More... | |
EventHandler | DidReachEndOfStream |
Invoked after the player has reached the end of a video file. More... | |
A video player object which is able to play h.264 / h.265 video files and video streams.
|
strong |
RealNetworks.CameraKit.VideoPlayer.VideoPlayer | ( | Uri | url | ) |
A VideoPlayer allows you to play back a video file or a HTTP / RTSP video stream. Note that the video player supports video streams only - it does not support audio streams at all.
Create an instance of a video player and then register an event handler with the DidDecode event property to receive the decoded video frames. Then start playback by setting the Paused property to false. You can pause playback at any time by setting the Paused property to true.
You can stop playback altogether in preparation of disposing the video player by calling Stop(). You can stop playback and dispose the player at the same time by calling Dispose().
The video player enforces the video clock if the URL points to a video file but it does not enforce the video clock if the URL points to a HTTP or RTSP video stream. In this case the video player decodes video frames as fast as they arrive from the camera. It does this to minimize the video playback latency.
url | a file, HTTP or RTSP URL |
RealNetworks.CameraKit.VideoPlayer.VideoPlayer | ( | Uri | url, |
List< Option > | options | ||
) |
void RealNetworks.CameraKit.VideoPlayer.CancelSeek | ( | ) |
Cancels an active seek operation.
void RealNetworks.CameraKit.VideoPlayer.Dispose | ( | ) |
void RealNetworks.CameraKit.VideoPlayer.Dispose | ( | bool | disposing | ) |
void RealNetworks.CameraKit.VideoPlayer.FrameStep | ( | int | frameCount | ) |
void RealNetworks.CameraKit.VideoPlayer.Preroll | ( | ) |
Preroll the video player if it hasn't already been prerolled.
void RealNetworks.CameraKit.VideoPlayer.Seek | ( | Microseconds | time, |
bool | exact, | ||
SeekCompletion | completion | ||
) |
Seeks to the given time. Note that the seek operation will take a while. Invokes the completion handler once seeking is done.
time | |
exact | |
completion |
delegate void RealNetworks.CameraKit.VideoPlayer.SeekCompletion | ( | Exception | error | ) |
Seek callback.
error | Seek error or null |
void RealNetworks.CameraKit.VideoPlayer.Stop | ( | ) |
Stops the video player in preparation for destruction.
|
getset |
Enables or disables contrast enhancement.
|
get |
Returns the current playback time.
|
getset |
Enables / disables deferring of contrast enhancement from the camera side to the face detector side.
|
get |
Returns the duration.
|
getset |
The contrast enhancement exposure boost.
|
get |
Returns the frame rate in frames per seconds.
|
getset |
The contrast enhancement low-light-threshold.
|
get |
Returns the options with which the video player was created.
|
getset |
Returns true if the player is paused.
|
getset |
Returns the playback rate.
|
get |
Returns the source type.
|
get |
The current player statistics.
|
get |
Returns the URL from which the player plays back.
|
get |
Returns the video resolution.
EventHandler RealNetworks.CameraKit.VideoPlayer.DidChangePausedState |
Invoked after the state of the paused flag has changed.
EventHandler<DidDecodeEventArgs> RealNetworks.CameraKit.VideoPlayer.DidDecode |
Invoked after the player has decoded another video frame.
EventHandler<DidDetectErrorEventArgs> RealNetworks.CameraKit.VideoPlayer.DidDetectError |
Invoked if the video player has detected an error while trying to play back the video file / stream.
EventHandler RealNetworks.CameraKit.VideoPlayer.DidFinishPrerolling |
Invoked after the video player has finished prerolling the video file / stream.
EventHandler RealNetworks.CameraKit.VideoPlayer.DidReachEndOfStream |
Invoked after the player has reached the end of a video file.