mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-04 20:01:44 +02:00
controller
git-svn-id: svn://elaine/murooma/trunk@242 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
e342a4108e
commit
00fac3eccb
15 changed files with 126 additions and 116 deletions
|
@ -1,9 +1,10 @@
|
|||
#ifndef CONTROLLER_H
|
||||
#define CONTROLLER_H
|
||||
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <atomic>
|
||||
#include "common/message.h"
|
||||
#include "decoder.h"
|
||||
#include "serverConnection.h"
|
||||
|
||||
|
||||
|
@ -11,14 +12,19 @@ class Controller : public MessageReceiver
|
|||
{
|
||||
public:
|
||||
Controller();
|
||||
void start();
|
||||
void start(std::string& _ip, size_t _port, int _bufferMs);
|
||||
void stop();
|
||||
virtual void onMessageReceived(BaseMessage* message);
|
||||
virtual void onMessageReceived(tcp::socket* socket, const BaseMessage& baseMessage, char* buffer);
|
||||
|
||||
private:
|
||||
void worker();
|
||||
std::atomic<bool> active_;
|
||||
std::thread* controllerThread;
|
||||
ServerConnection* connection;
|
||||
SampleFormat* sampleFormat;
|
||||
Decoder* decoder;
|
||||
Stream* stream;
|
||||
int bufferMs;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue