RateDrop
Examples of using a Filter are described in Using A Rate Drop Object.
RateDrop objects in C++ are referenced by the following shared pointer typedef:
-
typedef std::shared_ptr<rogue::interfaces::stream::RateDrop> rogue::interfaces::stream::RateDropPtr
Shared pointer alias for
RateDrop.
The class description is shown below:
-
class RateDrop : public rogue::interfaces::stream::Master, public rogue::interfaces::stream::Slave
Stream frame-rate dropper.
Drops frames at a configured rate, either by frame count or by time period. In period mode,
valueis interpreted as seconds between kept frames. Otherwise,valueis interpreted as number of dropped frames between kept frames.Public Functions
-
RateDrop(bool period, double value)
Constructs a rate-drop filter.
This constructor is a low-level C++ allocation path. Prefer
create()when shared ownership or Python exposure is required.- Parameters:
period – Set to
truefor period mode;falsefor drop-count mode.value – Period seconds or drop-count setting.
-
~RateDrop()
Destroys the rate-drop filter.
Receives a frame and drops/forwards according to configured rate policy.
- Parameters:
frame – Incoming frame.
Public Static Functions
-
static std::shared_ptr<rogue::interfaces::stream::RateDrop> create(bool period, double value)
Creates a rate-drop filter.
Parameter semantics are identical to the constructor; see
RateDrop()for mode and value behavior details. This static factory is the preferred construction path when the object is shared across Rogue graph connections or exposed to Python. It returnsstd::shared_ptrownership compatible with Rogue pointer typedefs.- Parameters:
period – Set to
truefor period mode;falsefor drop-count mode.value – Period seconds or drop-count setting.
- Returns:
Shared pointer to the created rate-drop filter.
-
static void setup_python()
Registers this type with Python bindings.
-
RateDrop(bool period, double value)