libpromeki 1.0.0-alpha
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
rtptxthread.h
Go to the documentation of this file.
1
8#pragma once
9
10
11#include <promeki/config.h>
12#if PROMEKI_ENABLE_NETWORK
13#include <promeki/atomic.h>
14#include <promeki/namespace.h>
15#include <promeki/string.h>
16#include <promeki/thread.h>
17
18PROMEKI_NAMESPACE_BEGIN
19
52class RtpTxThread : public Thread {
53 public:
63 explicit RtpTxThread(const String &name);
64
68 ~RtpTxThread() override;
69
70 RtpTxThread(const RtpTxThread &) = delete;
71 RtpTxThread &operator=(const RtpTxThread &) = delete;
72
84 void requestStop();
85
88 bool isStopRequested() const { return _stopRequested.value(); }
89
90 protected:
98 virtual void onShutdown() {}
99
100 private:
101 Atomic<bool> _stopRequested;
102};
103
104PROMEKI_NAMESPACE_END
105
106#endif // PROMEKI_ENABLE_NETWORK