diff options
author | Frank Schmirler <vdr@schmirler.de> | 2010-12-02 09:43:13 +0100 |
---|---|---|
committer | Frank Schmirler <vdr@schmirler.de> | 2010-12-02 09:43:13 +0100 |
commit | 7254a6752808830d5fc133e5362da6c47f3f84ff (patch) | |
tree | 673cc17f88ba80f8a67debb54f85ea100cde9ae5 /server/streamer.h | |
parent | 31df0eaf8e49bc1cfea755bd88f3dd795c8f1ace (diff) | |
download | vdr-plugin-streamdev-7254a6752808830d5fc133e5362da6c47f3f84ff.tar.gz vdr-plugin-streamdev-7254a6752808830d5fc133e5362da6c47f3f84ff.tar.bz2 |
Snapshot 2009-06-11
Diffstat (limited to 'server/streamer.h')
-rw-r--r-- | server/streamer.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/server/streamer.h b/server/streamer.h index e557d55..20323b7 100644 --- a/server/streamer.h +++ b/server/streamer.h @@ -1,5 +1,5 @@ /* - * $Id: streamer.h,v 1.8 2007/04/02 10:32:34 schmirl Exp $ + * $Id: streamer.h,v 1.10 2009/02/13 10:39:22 schmirl Exp $ */ #ifndef VDR_STREAMDEV_STREAMER_H @@ -12,6 +12,10 @@ class cTBSocket; class cStreamdevStreamer; +#ifndef TS_SIZE +#define TS_SIZE 188 +#endif + #define STREAMERBUFSIZE MEGABYTE(4) #define WRITERBUFSIZE KILOBYTE(256) @@ -21,7 +25,6 @@ class cStreamdevWriter: public cThread { private: cStreamdevStreamer *m_Streamer; cTBSocket *m_Socket; - bool m_Active; protected: virtual void Action(void); @@ -29,15 +32,12 @@ protected: public: cStreamdevWriter(cTBSocket *Socket, cStreamdevStreamer *Streamer); virtual ~cStreamdevWriter(); - - bool IsActive(void) const { return m_Active; } }; // --- cStreamdevStreamer ----------------------------------------------------- class cStreamdevStreamer: public cThread { private: - bool m_Active; bool m_Running; cStreamdevWriter *m_Writer; cRingBufferLinear *m_RingBuffer; @@ -54,7 +54,7 @@ public: virtual void Start(cTBSocket *Socket); virtual void Stop(void); - bool Abort(void) const; + bool Abort(void); void Activate(bool On); int Receive(uchar *Data, int Length) { return m_RingBuffer->Put(Data, Length); } @@ -68,9 +68,9 @@ public: virtual void Attach(void) {} }; -inline bool cStreamdevStreamer::Abort(void) const +inline bool cStreamdevStreamer::Abort(void) { - return m_Active && !m_Writer->IsActive(); + return Active() && !m_Writer->Active(); } #endif // VDR_STREAMDEV_STREAMER_H |