Halyri  0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
Halyri.AudioVideoManagers.PreviewImageCapturer Class Reference

Class for capturing preview images from AudioVideoCaptureDevice and compressing them to jpeg. Enables the comressed frames to have lower resolution and frame rate than the AudioVideoCaptureDevice preview buffer generates. More...

Public Member Functions

 PreviewImageCapturer (AudioVideoCaptureDevice source)
 Instantializes a new PreviewImageCapturer using the provided AudioVideoCaptureDevice as it's preview image source. This class will not open the AudioVideoCaptureDevice for capture. Before calling StartCapture, the AudioVideoCaptureDevice has to be opened for video or audiovideo capture. More...
 
void StartCapture ()
 Starts capturing preview buffer frames. Before calling StartCapture, the AudioVideoCaptureDevice has to be opened for video or audiovideo capture. More...
 
void StopCapture ()
 Stops listening for preview frames from the AudioVideoCaptureDevice. More...
 
void SetQualityParameters (float fps, int compressionQuality, int compressedWidth, int compressedHeight)
 Sets parameters related to jpeg compression quality, frame capture rate and size of the compressed frame. The captured frame from the preview buffer is scaled to the provided dimensions on compression. More...
 

Public Attributes

JpgFrameCaptured JpgFrameCapturedEvent
 

Properties

double SourceImageRatio [get]
 
int imageWidth [get]
 
int imageHeight [get]
 

Detailed Description

Class for capturing preview images from AudioVideoCaptureDevice and compressing them to jpeg. Enables the comressed frames to have lower resolution and frame rate than the AudioVideoCaptureDevice preview buffer generates.

<author>Veli-Mikko Puupponen</author> TODO: should also count the time between captured frames on the captureDevice_PreviewFrameAvailable. If the AudioVideoCaptureDevice providing the frames starts slowing down, the problem would be detected and the outgoing frame rate wound not drop proportionally.

Constructor & Destructor Documentation

Halyri.AudioVideoManagers.PreviewImageCapturer.PreviewImageCapturer ( AudioVideoCaptureDevice  source)

Instantializes a new PreviewImageCapturer using the provided AudioVideoCaptureDevice as it's preview image source. This class will not open the AudioVideoCaptureDevice for capture. Before calling StartCapture, the AudioVideoCaptureDevice has to be opened for video or audiovideo capture.

Parameters
sourceAudioVideoCaptureDevice to be used as a source of ARGB preview frames

Member Function Documentation

void Halyri.AudioVideoManagers.PreviewImageCapturer.SetQualityParameters ( float  fps,
int  compressionQuality,
int  compressedWidth,
int  compressedHeight 
)

Sets parameters related to jpeg compression quality, frame capture rate and size of the compressed frame. The captured frame from the preview buffer is scaled to the provided dimensions on compression.

Parameters
fpsNumber of frames to capture per second
compressionQualityCompression quality for the resulting jpgs, 0 to 100, where 100 is the best quality
compressedWidthWidth of the compressed image. If different from the AudioVideoCaptureDevices preview width, the image will be scaled on compression.
compressedHeightHeight of the compressed image. If different from the AudioVideoCaptureDevices preview height, the image will be scaled on compression.
void Halyri.AudioVideoManagers.PreviewImageCapturer.StartCapture ( )

Starts capturing preview buffer frames. Before calling StartCapture, the AudioVideoCaptureDevice has to be opened for video or audiovideo capture.

void Halyri.AudioVideoManagers.PreviewImageCapturer.StopCapture ( )

Stops listening for preview frames from the AudioVideoCaptureDevice.

Member Data Documentation

JpgFrameCaptured Halyri.AudioVideoManagers.PreviewImageCapturer.JpgFrameCapturedEvent

Property Documentation

int Halyri.AudioVideoManagers.PreviewImageCapturer.imageHeight
get
int Halyri.AudioVideoManagers.PreviewImageCapturer.imageWidth
get
double Halyri.AudioVideoManagers.PreviewImageCapturer.SourceImageRatio
get

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