#include <rs_processing.hpp>
◆ frame_queue() [1/2]
rs2::frame_queue::frame_queue |
( |
unsigned int |
capacity, |
|
|
bool |
keep_frames = false |
|
) |
| |
|
inlineexplicit |
create frame queue. frame queues are the simplest x-platform synchronization primitive provided by librealsense to help developers who are not using async APIs param[in] capacity size of the frame queue param[in] keep_frames if set to true, the queue automatically calls keep() on every frame enqueued into it.
◆ frame_queue() [2/2]
rs2::frame_queue::frame_queue |
( |
| ) |
|
|
inline |
◆ capacity()
size_t rs2::frame_queue::capacity |
( |
| ) |
const |
|
inline |
Return the capacity of the queue
- Returns
- capacity size
◆ enqueue()
void rs2::frame_queue::enqueue |
( |
frame |
f | ) |
const |
|
inline |
enqueue new frame into the queue
- Parameters
-
[in] | f | - frame handle to enqueue (this operation passed ownership to the queue) |
◆ get()
Provide a getter for underlying rs2_frame_queue object. Used to invoke C-API that require C-type parameters in signature
- Returns
- keeping frames
◆ keep_frames()
bool rs2::frame_queue::keep_frames |
( |
| ) |
const |
|
inline |
Return whether or not the queue calls keep on enqueued frames
- Returns
- keeping frames
◆ operator()()
void rs2::frame_queue::operator() |
( |
frame |
f | ) |
const |
|
inline |
Does the same thing as enqueue function.
◆ poll_for_frame()
template<typename T >
std::enable_if<std::is_base_of<rs2::frame, T>::value, bool>::type rs2::frame_queue::poll_for_frame |
( |
T * |
output | ) |
const |
|
inline |
poll if a new frame is available and dequeue if it is
- Parameters
-
- Returns
- true if new frame was stored to f
◆ size()
size_t rs2::frame_queue::size |
( |
| ) |
const |
|
inline |
Return the capacity of the queue
- Returns
- capacity size
◆ try_wait_for_frame()
template<typename T >
std::enable_if<std::is_base_of<rs2::frame, T>::value, bool>::type rs2::frame_queue::try_wait_for_frame |
( |
T * |
output, |
|
|
unsigned int |
timeout_ms = 5000 |
|
) |
| const |
|
inline |
◆ wait_for_frame()
frame rs2::frame_queue::wait_for_frame |
( |
unsigned int |
timeout_ms = 5000 | ) |
const |
|
inline |
wait until new frame becomes available in the queue and dequeue it
- Returns
- frame handle to be released using rs2_release_frame
The documentation for this class was generated from the following file:
- C:/jenkins_sys_rsbuild/workspace/LRS_doxygen_pipeline/source/include/librealsense2/hpp/rs_processing.hpp