rogue
Loading...
Searching...
No Matches
RateDrop.h
Go to the documentation of this file.
1
17#ifndef __ROGUE_INTERFACES_STREAM_RATE_DROP_H__
18#define __ROGUE_INTERFACES_STREAM_RATE_DROP_H__
19#include "rogue/Directives.h"
20
21#include <stdint.h>
22
23#include <memory>
24
25#include "rogue/Logging.h"
28
29namespace rogue {
30namespace interfaces {
31namespace stream {
32
42 // Configurations
43 bool periodFlag_;
44
45 uint32_t dropTarget_;
46
47 struct timeval timePeriod_;
48
49 // Status
50 uint32_t dropCount_;
51
52 struct timeval nextPeriod_;
53
54 public:
69 static std::shared_ptr<rogue::interfaces::stream::RateDrop> create(bool period, double value);
70
72 static void setup_python();
73
84 RateDrop(bool period, double value);
85
87 ~RateDrop();
88
94 void acceptFrame(std::shared_ptr<rogue::interfaces::stream::Frame> frame);
95};
96
98typedef std::shared_ptr<rogue::interfaces::stream::RateDrop> RateDropPtr;
99} // namespace stream
100} // namespace interfaces
101} // namespace rogue
102#endif
Stream master endpoint.
Definition Master.h:65
static std::shared_ptr< rogue::interfaces::stream::Master > create()
Creates a stream master.
Definition Master.cpp:40
Stream frame-rate dropper.
Definition RateDrop.h:41
static void setup_python()
Registers this type with Python bindings.
Definition RateDrop.cpp:46
void acceptFrame(std::shared_ptr< rogue::interfaces::stream::Frame > frame)
Receives a frame and drops/forwards according to configured rate policy.
Definition RateDrop.cpp:81
~RateDrop()
Destroys the rate-drop filter.
Definition RateDrop.cpp:78
Stream slave endpoint and default frame pool.
Definition Slave.h:72
std::shared_ptr< rogue::interfaces::stream::RateDrop > RateDropPtr
Shared pointer alias for RateDrop.
Definition RateDrop.h:98