Proper Interrupt Handling

This commit is contained in:
loki
2020-01-20 00:22:13 +01:00
parent ad5cddd426
commit a23494b10c
7 changed files with 121 additions and 24 deletions
+10 -2
View File
@@ -9,8 +9,16 @@
#include "crypto.h"
#include "thread_safe.h"
namespace stream {
enum class state_e : int {
STOPPED,
STOPPING,
STARTING,
RUNNING,
};
struct launch_session_t {
crypto::aes_t gcm_key;
crypto::aes_t iv;
@@ -19,9 +27,9 @@ struct launch_session_t {
};
extern safe::event_t<launch_session_t> launch_event;
extern std::atomic_bool has_session;
extern std::atomic<state_e> session_state;
void rtpThread();
void rtpThread(std::shared_ptr<safe::event_t<bool>> shutdown_event);
}