![]() |
Halyri
0.9
|
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] |
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.
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.
source | AudioVideoCaptureDevice to be used as a source of ARGB preview frames |
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.
fps | Number of frames to capture per second |
compressionQuality | Compression quality for the resulting jpgs, 0 to 100, where 100 is the best quality |
compressedWidth | Width of the compressed image. If different from the AudioVideoCaptureDevices preview width, the image will be scaled on compression. |
compressedHeight | Height 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.
JpgFrameCaptured Halyri.AudioVideoManagers.PreviewImageCapturer.JpgFrameCapturedEvent |
|
get |
|
get |
|
get |