mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 11:37:03 +00:00
Protocol refactoring.
This commit is contained in:
31
streamer.h
31
streamer.h
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: streamer.h,v 1.5 2007/09/13 16:58:22 rahrenbe Exp $
|
||||
* $Id: streamer.h,v 1.6 2007/09/14 15:44:25 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#ifndef __IPTV_STREAMER_H
|
||||
@@ -14,32 +14,23 @@
|
||||
#include <vdr/thread.h>
|
||||
#include <vdr/ringbuffer.h>
|
||||
|
||||
#include "protocolif.h"
|
||||
|
||||
class cIptvStreamer : public cThread {
|
||||
private:
|
||||
char* streamAddr;
|
||||
int streamPort;
|
||||
int socketDesc;
|
||||
struct sockaddr_in sockAddr;
|
||||
cRingBufferLinear* pRingBuffer;
|
||||
unsigned char* pReceiveBuffer;
|
||||
unsigned int bufferSize;
|
||||
cRingBufferLinear* ringBuffer;
|
||||
cMutex* mutex;
|
||||
bool mcastActive;
|
||||
|
||||
private:
|
||||
bool OpenSocket(const int port);
|
||||
void CloseSocket(void);
|
||||
bool JoinMulticast(void);
|
||||
bool DropMulticast(void);
|
||||
unsigned char* readBuffer;
|
||||
unsigned int readBufferLen;
|
||||
cIptvProtocolIf* protocol;
|
||||
|
||||
public:
|
||||
cIptvStreamer();
|
||||
cIptvStreamer(cRingBufferLinear* Buffer, cMutex* Mutex);
|
||||
cIptvStreamer(cRingBufferLinear* RingBuffer, cMutex* Mutex);
|
||||
virtual ~cIptvStreamer();
|
||||
virtual void Action(void);
|
||||
bool SetStream(const char* address, const int port, const char* protocol);
|
||||
bool OpenStream(void);
|
||||
bool CloseStream(void);
|
||||
bool Set(const char* Address, const int Port, cIptvProtocolIf* Protocol);
|
||||
bool Open(void);
|
||||
bool Close(void);
|
||||
};
|
||||
|
||||
#endif // __IPTV_STREAMER_H
|
||||
|
||||
Reference in New Issue
Block a user