Definition at line 57 of file video_frame_pool.cpp.
◆ impl()
Definition at line 140 of file video_frame_pool.cpp.
143{
144}
std::unique_ptr< video_frame_pool_allocator > m_allocator
unsigned int m_max_used_frames
◆ ~impl()
| video_frame_pool::impl::~impl |
( |
| ) |
|
Definition at line 146 of file video_frame_pool.cpp.
146 {
147 std::unique_lock<std::mutex> lk(
m_lock);
149
151}
void remove_free_frames()
std::condition_variable m_frame_returned
unsigned int m_unreturned_frames
◆ deallocate_frame()
| void video_frame_pool::impl::deallocate_frame |
( |
struct video_frame * | frame | ) |
|
|
private |
◆ get_allocator()
◆ get_disposable_frame()
| struct video_frame * video_frame_pool::impl::get_disposable_frame |
( |
| ) |
|
◆ get_frame()
| std::shared_ptr< video_frame > video_frame_pool::impl::get_frame |
( |
| ) |
|
Definition at line 161 of file video_frame_pool.cpp.
161 {
163 std::unique_lock<std::mutex> lk(
m_lock);
173 } else {
174 try {
176 for (unsigned int i = 0; i < m_desc.tile_count; ++i) {
181 throw std::runtime_error("Cannot allocate data");
182 }
184 }
185 } catch (std::exception &e) {
186 std::cerr << e.what() << std::endl;
188 throw e;
189 }
190 }
192 return std::shared_ptr<video_frame>(ret, std::bind([
this](
struct video_frame *
frame,
int generation) {
193 std::unique_lock<std::mutex> lk(
m_lock);
194
198
201 } else {
203 }
205}
struct video_frame * vf_alloc_desc(struct video_desc desc)
Allocates video frame accordig given desc.
unsigned int data_len
length of the data
std::queue< struct video_frame * > m_free_frames
void deallocate_frame(struct video_frame *frame)
References tile::data, tile::data_len, frame, MAX_PADDING, video_frame::tiles, and vf_alloc_desc().
◆ get_pod_frame()
| struct video_frame * video_frame_pool::impl::get_pod_frame |
( |
| ) |
|
Definition at line 217 of file video_frame_pool.cpp.
217 {
222 }
224 new std::shared_ptr<video_frame>(std::move(
frame));
225 static auto deleter = [](
video_frame *f) {
delete static_cast<std::shared_ptr<video_frame> *
>(f->callbacks.dispose_udata); };
227 return out;
228}
int void(** deleter)(void *))
struct video_desc video_desc_from_frame(const struct video_frame *frame)
Returns struct video_desc from video frame.
void(* data_deleter)(struct video_frame *)
References video_frame::callbacks, tile::data, video_frame_callbacks::data_deleter, deleter, video_frame_callbacks::dispose_udata, frame, video_frame_pool::get_frame(), video_frame::tile_count, video_frame::tiles, vf_alloc_desc(), and video_desc_from_frame().
◆ reconfigure()
| void video_frame_pool::impl::reconfigure |
( |
struct video_desc | new_desc, |
|
|
size_t | new_size = SIZE_MAX ) |
◆ remove_free_frames()
| void video_frame_pool::impl::remove_free_frames |
( |
| ) |
|
|
private |
◆ m_allocator
◆ m_frame_returned
| std::condition_variable video_frame_pool::impl::m_frame_returned |
|
private |
◆ m_free_frames
| std::queue<struct video_frame *> video_frame_pool::impl::m_free_frames |
|
private |
◆ m_generation
| int video_frame_pool::impl::m_generation = 0 |
|
private |
◆ m_lock
| std::mutex video_frame_pool::impl::m_lock |
|
private |
◆ m_max_data_len
| size_t video_frame_pool::impl::m_max_data_len = 0 |
|
private |
◆ m_max_used_frames
| unsigned int video_frame_pool::impl::m_max_used_frames |
|
private |
◆ m_unreturned_frames
| unsigned int video_frame_pool::impl::m_unreturned_frames = 0 |
|
private |
The documentation for this struct was generated from the following file: