Decides when a captured plane that has lost its framebuffer should be picked again.
More...
#include <src/platform/linux/kms_plane.h>
|
| std::chrono::steady_clock::duration | empty_for (std::chrono::steady_clock::time_point now) const |
| | How long the plane has had no framebuffer.
|
| | empty_plane_timer_t (std::chrono::steady_clock::duration delay) |
| | Construct a timer.
|
| bool | update (bool has_fb, std::chrono::steady_clock::time_point now) |
| | Record whether the plane has a framebuffer now.
|
Decides when a captured plane that has lost its framebuffer should be picked again.
A compositor may move its picture to another plane while a stream is running, or restart. The plane being captured then has no framebuffer, and capturing it again only repeats the last frame. Once it has stayed empty for the given delay, capture should be reinitialized so a plane is chosen again.
◆ empty_plane_timer_t()
| platf::kms::empty_plane_timer_t::empty_plane_timer_t |
( |
std::chrono::steady_clock::duration | delay | ) |
|
|
inlineexplicit |
Construct a timer.
- Parameters
-
| delay | How long the plane may have no framebuffer before a reinit is due. |
◆ empty_for()
| std::chrono::steady_clock::duration platf::kms::empty_plane_timer_t::empty_for |
( |
std::chrono::steady_clock::time_point | now | ) |
const |
|
inline |
How long the plane has had no framebuffer.
- Parameters
-
- Returns
- The time since the plane lost its framebuffer, or zero when it has one.
◆ update()
| bool platf::kms::empty_plane_timer_t::update |
( |
bool | has_fb, |
|
|
std::chrono::steady_clock::time_point | now ) |
|
inline |
Record whether the plane has a framebuffer now.
- Parameters
-
| has_fb | True when the plane currently scans out a framebuffer. |
| now | The current time. |
- Returns
- True once the plane has had no framebuffer for at least the delay.
The documentation for this class was generated from the following file: