Intel® RealSense™ Cross Platform API  2.13.0
Intel Realsense Cross-platform API
Public Member Functions | List of all members
rs2::frame_queue Class Reference

#include <rs_processing.hpp>

Public Member Functions

 frame_queue (unsigned int capacity)
 
 frame_queue ()
 
void enqueue (frame f) const
 
frame wait_for_frame (unsigned int timeout_ms=5000) const
 
template<typename T >
std::enable_if< std::is_base_of< rs2::frame, T >::value, bool >::type poll_for_frame (T *output) const
 
void operator() (frame f) const
 
size_t capacity () const
 

Constructor & Destructor Documentation

◆ frame_queue() [1/2]

rs2::frame_queue::frame_queue ( unsigned int  capacity)
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

◆ frame_queue() [2/2]

rs2::frame_queue::frame_queue ( )
inline

Member Function Documentation

◆ capacity()

size_t rs2::frame_queue::capacity ( ) const
inline

◆ enqueue()

void rs2::frame_queue::enqueue ( frame  f) const
inline

enqueue new frame into a queue

Parameters
[in]f- frame handle to enqueue (this operation passed ownership to the queue)

◆ operator()()

void rs2::frame_queue::operator() ( frame  f) const
inline

◆ 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
[out]f- frame handle
Returns
true if new frame was stored to f

◆ 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: