SAFR Windows SDK
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events
RealNetworks.CameraKit.CaptureSession Class Referenceabstract

A video capture session is created by invoking the CreateCaptureSession() function on a camera object. It represents a video stream with a specific video resolution and frames-per-second setting. A capture session is created in paused state. Set its Capturing property to true to start the capture session and set it to false to pause or stop the capture session. More...

Inheritance diagram for RealNetworks.CameraKit.CaptureSession:
RealNetworks.CameraKit.GenetecCaptureSession RealNetworks.CameraKit.ThreadCaptureSession RealNetworks.CameraKit.USBCaptureSession RealNetworks.CameraKit.IntelRealsenseCaptureSession RealNetworks.CameraKit.XimeaCaptureSession

Classes

class  DidDecodeEventArgs
 The event arguments for the event that is sent for every decoded video frame. More...
 
class  DidDetectErrorEventArgs
 The arguments of the event which is sent if the capture session has encountered an error. More...
 

Public Member Functions

void Dispose ()
 
void Dispose (bool fromIDisposable)
 

Protected Member Functions

 CaptureSession (Camera camera, Accelerator accelerator)
 
abstract void OnDispose ()
 
void OnDidDecode (VideoFrame frame)
 
void OnDidDetectError (CaptureSessionException error)
 
void OnDidStartCapturing ()
 
void OnWillStopCapturing ()
 
void OnDidChangeActiveProfile ()
 

Properties

Camera Camera [get]
 Returns the camera for which this capture session was created. More...
 
Accelerator Accelerator [get]
 Returns the accelerator which the capture session uses to decode video. More...
 
abstract IVideoProfile ActiveVideoProfile [get, set]
 The active video profile. More...
 
abstract IDepthProfile ActiveDepthProfile [get, set]
 The active (and optional) depth profile. More...
 
CaptureVideoOrientation VideoOrientation [get, set]
 The current video orientation. This is the orientation before the optional rotation and mirroring properties are applied. This orientation should typically be the same as the current user interface orientation. More...
 
abstract bool IsVideoStabilizationSupported [get]
 Returns true if the camera supports video stabilization More...
 
CaptureVideoStabilizationMode PreferredVideoStabilizationMode [get, set]
 Returns the preferred video stabilization mode of the camera. More...
 
CaptureVideoStabilizationMode ActiveVideoStabilizationMode [get, set]
 Returns the currently active video stabilization mode of the camera. More...
 
abstract bool Capturing [get, set]
 Starts or stops capturing. More...
 
virtual CaptureSessionStatistics Statistics [get]
 Returns the current capture session statistics. Null is returned if the session is stopped or it doesn't supper statistics. More...
 
RectangleF? CropRectangle = null [get, set]
 The video crop rectangle in a normalized coordinate system from 0-1 with the origin in the top left corner. The video frame is cropped from the native resolution to this rectangle. If this is nil no cropping will occur. More...
 

Events

EventHandler< DidDecodeEventArgsDidDecode
 Event which is sent on every successfully decoded video frame. More...
 
EventHandler< DidDetectErrorEventArgsDidDetectError
 Event which is sent when the capture session encounters an error. More...
 
EventHandler DidStartCapturing
 Event which is sent at the beginning of a capture session. More...
 
EventHandler WillStopCapturing
 Event which is sent when the capture session is about to stop. More...
 
EventHandler DidChangeActiveProfile
 Event which is sent if the capture profile of the session has changed. More...
 

Detailed Description

A video capture session is created by invoking the CreateCaptureSession() function on a camera object. It represents a video stream with a specific video resolution and frames-per-second setting. A capture session is created in paused state. Set its Capturing property to true to start the capture session and set it to false to pause or stop the capture session.

You should register a frame event handler before starting the capture session. Do this by assigning your event handler function to the DidDecode event property. The capture session invokes the DidDecode event for every decoded video frame. You can get the video frame from the event argument.

You should register an event handler to the DidDetectError event handler property to be notified of capture session errors.

Constructor & Destructor Documentation

◆ CaptureSession()

RealNetworks.CameraKit.CaptureSession.CaptureSession ( Camera  camera,
Accelerator  accelerator 
)
protected

Member Function Documentation

◆ Dispose() [1/2]

void RealNetworks.CameraKit.CaptureSession.Dispose ( )

◆ Dispose() [2/2]

void RealNetworks.CameraKit.CaptureSession.Dispose ( bool  fromIDisposable)

◆ OnDidChangeActiveProfile()

void RealNetworks.CameraKit.CaptureSession.OnDidChangeActiveProfile ( )
protected

◆ OnDidDecode()

void RealNetworks.CameraKit.CaptureSession.OnDidDecode ( VideoFrame  frame)
protected

◆ OnDidDetectError()

void RealNetworks.CameraKit.CaptureSession.OnDidDetectError ( CaptureSessionException  error)
protected

◆ OnDidStartCapturing()

void RealNetworks.CameraKit.CaptureSession.OnDidStartCapturing ( )
protected

◆ OnDispose()

abstract void RealNetworks.CameraKit.CaptureSession.OnDispose ( )
protectedpure virtual

◆ OnWillStopCapturing()

void RealNetworks.CameraKit.CaptureSession.OnWillStopCapturing ( )
protected

Property Documentation

◆ Accelerator

Accelerator RealNetworks.CameraKit.CaptureSession.Accelerator
get

Returns the accelerator which the capture session uses to decode video.

◆ ActiveDepthProfile

abstract IDepthProfile RealNetworks.CameraKit.CaptureSession.ActiveDepthProfile
getset

The active (and optional) depth profile.

◆ ActiveVideoProfile

abstract IVideoProfile RealNetworks.CameraKit.CaptureSession.ActiveVideoProfile
getset

The active video profile.

◆ ActiveVideoStabilizationMode

CaptureVideoStabilizationMode RealNetworks.CameraKit.CaptureSession.ActiveVideoStabilizationMode
getset

Returns the currently active video stabilization mode of the camera.

◆ Camera

Camera RealNetworks.CameraKit.CaptureSession.Camera
get

Returns the camera for which this capture session was created.

◆ Capturing

abstract bool RealNetworks.CameraKit.CaptureSession.Capturing
getset

Starts or stops capturing.

◆ CropRectangle

RectangleF? RealNetworks.CameraKit.CaptureSession.CropRectangle = null
getset

The video crop rectangle in a normalized coordinate system from 0-1 with the origin in the top left corner. The video frame is cropped from the native resolution to this rectangle. If this is nil no cropping will occur.

◆ IsVideoStabilizationSupported

abstract bool RealNetworks.CameraKit.CaptureSession.IsVideoStabilizationSupported
get

Returns true if the camera supports video stabilization

◆ PreferredVideoStabilizationMode

CaptureVideoStabilizationMode RealNetworks.CameraKit.CaptureSession.PreferredVideoStabilizationMode
getset

Returns the preferred video stabilization mode of the camera.

◆ Statistics

virtual CaptureSessionStatistics RealNetworks.CameraKit.CaptureSession.Statistics
get

Returns the current capture session statistics. Null is returned if the session is stopped or it doesn't supper statistics.

◆ VideoOrientation

CaptureVideoOrientation RealNetworks.CameraKit.CaptureSession.VideoOrientation
getset

The current video orientation. This is the orientation before the optional rotation and mirroring properties are applied. This orientation should typically be the same as the current user interface orientation.

Event Documentation

◆ DidChangeActiveProfile

EventHandler RealNetworks.CameraKit.CaptureSession.DidChangeActiveProfile

Event which is sent if the capture profile of the session has changed.

◆ DidDecode

EventHandler<DidDecodeEventArgs> RealNetworks.CameraKit.CaptureSession.DidDecode

Event which is sent on every successfully decoded video frame.

◆ DidDetectError

EventHandler<DidDetectErrorEventArgs> RealNetworks.CameraKit.CaptureSession.DidDetectError

Event which is sent when the capture session encounters an error.

◆ DidStartCapturing

EventHandler RealNetworks.CameraKit.CaptureSession.DidStartCapturing

Event which is sent at the beginning of a capture session.

◆ WillStopCapturing

EventHandler RealNetworks.CameraKit.CaptureSession.WillStopCapturing

Event which is sent when the capture session is about to stop.