/home/barant/Documents/Development/BMASockets/BMAStreamServer.h
#ifndef __BMAStreamServer_h__
#define __BMAStreamServer_h__
#include "includes"
#include "BMATCPServerSocket.h"
#include "BMAStreamFrame.h"
#include "BMAStreamContentProvider.h"
#include "BMATimer.h"
class BMAStreamContentScheduler;
class BMAEPoll;
class BMAStreamServer : public BMATCPServerSocket,
public BMATimer {
public:
BMAStreamServer(BMAEPoll &ePoll, std::string url, short int port, std::string commandName);
~BMAStreamServer();
void startStreaming();
void setContentProvider(BMAStreamContentProvider &contentProvider);
private:
BMAStreamContentProvider *contentProvider;
std::queue<BMAStreamFrame *> *streamFrames;
bool streaming = false;
BMASession * getSocketAccept() override;
void onTimeout() override;
void sendFrameToClients(BMAStreamFrame *streamFrame);
};
#endif
BMAStreamServer::startStreaming
void startStreaming()
Definition: BMAStreamServer.cpp:14
BMATCPServerSocket
Definition: BMATCPServerSocket.h:20
BMAStreamFrame
Definition: BMAStreamFrame.h:4
BMAStreamServer
Definition: BMAStreamServer.h:19
BMAStreamServer::setContentProvider
void setContentProvider(BMAStreamContentProvider &contentProvider)
Definition: BMAStreamServer.cpp:30
BMAEPoll
Definition: BMAEPoll.h:29
BMATimer
Definition: BMATimer.h:15
BMASession
Definition: BMASession.h:18
BMAStreamServer::BMAStreamServer
BMAStreamServer(BMAEPoll &ePoll, std::string url, short int port, std::string commandName)
Definition: BMAStreamServer.cpp:7
BMAStreamContentProvider
Definition: BMAStreamContentProvider.h:8
BMAStreamServer::~BMAStreamServer
~BMAStreamServer()
Definition: BMAStreamServer.cpp:11