CameraProcessor allows a plugin to respond to the camera actions triggered from Anobx and post video frames to Android container after a camera is open up and display in camera preview for the picture taken ad video recording.
More...
#include <camera_processor.h>
CameraProcessor allows a plugin to respond to the camera actions triggered from Anobx and post video frames to Android container after a camera is open up and display in camera preview for the picture taken ad video recording.
Definition at line 34 of file camera_processor.h.
◆ CameraProcessor() [1/2]
anbox::CameraProcessor::CameraProcessor |
( |
| ) |
|
|
default |
◆ ~CameraProcessor()
virtual anbox::CameraProcessor::~CameraProcessor |
( |
| ) |
|
|
virtualdefault |
◆ CameraProcessor() [2/2]
◆ close_device()
virtual int anbox::CameraProcessor::close_device |
( |
| ) |
|
|
inlinevirtual |
Close the camera device for not receiving video frames from the platform further.
- Returns
- 0 on success, otherwise returns EINVAL on error occurs.
Definition at line 71 of file camera_processor.h.
◆ get_device_specs()
virtual int anbox::CameraProcessor::get_device_specs |
( |
AnboxCameraSpec ** |
specs, |
|
|
size_t * |
specs_len |
|
) |
| |
|
inlinevirtual |
Get camera device specifications of the platform.
- Parameters
-
specs | pointer to the list of camera specifications |
specs_len | the length of camera specifications |
- Returns
- 0 on success, otherwise returns EINVAL on error occurs.
Definition at line 48 of file camera_processor.h.
◆ inject_frame()
Inject a video frame into AnboxPlatform.
This function allows injecting a video frame into the platform and letting the CameraProcessor handle the video frame.
- Parameters
-
frame | a video frame to be pushed into the internal queue. |
- Returns
- 0 on success, otherwise returns EINVAL on error occurs.
- Note
- This function is only used in our test suite to facilitate our automation tests and it is subject to change at any time.
Definition at line 109 of file camera_processor.h.
◆ open_device()
Open the camera device and being ready for posting video frames to Android container.
- Parameters
-
video_resolution | the resolution of camera video frame |
orientation | the currrent camera orientation in Android container |
- Returns
- 0 on success, otherwise returns EINVAL on error occurs.
Definition at line 61 of file camera_processor.h.
◆ operator=()
◆ read_frame()
virtual int anbox::CameraProcessor::read_frame |
( |
AnboxVideoFrame * |
frame, |
|
|
int |
timeout |
|
) |
| |
|
inlinevirtual |
Read next available video frame.
Anbox will call read_frame() to query the plugin for the next available video frame which is then forwarded to the Android container. If no video frame is available and timeout is set to -1, the function must block until the next video frame is available.
- Parameters
-
frame | Pointer to the available video frame to be sent to the anbox container. |
timeout | maximum number of milliseconds to wait for the next available frame. The following possible values for timeout must be handled:
timeout | Behavior |
0 | Non-blocking mode; return -EIO immediately if no video frame to process. |
< 0 | Block indefinitely until a video frame is available. |
> 0 | Wait up to a maximum of timeout milliseconds for a video frame. |
|
Definition at line 92 of file camera_processor.h.
The documentation for this class was generated from the following file: