diff options
author | schmirl <schmirl> | 2008-10-22 11:59:35 +0000 |
---|---|---|
committer | schmirl <schmirl> | 2008-10-22 11:59:35 +0000 |
commit | 84f994384a4273d71531001167822fce04e3bb7e (patch) | |
tree | 60c39a9d167be9d9a29d3b409cd4b84a408f471b /server/streamer.h | |
parent | 5c24a1307599c13f918a50284ebc89b92f597854 (diff) | |
download | vdr-plugin-streamdev-84f994384a4273d71531001167822fce04e3bb7e.tar.gz vdr-plugin-streamdev-84f994384a4273d71531001167822fce04e3bb7e.tar.bz2 |
- use cThread::Running()/Active() instead of private members
- replaced the last usleep by cCondWait
thanks to Rolf Ahrenberg (#383)
Modified Files:
Tag: v0_4
CONTRIBUTORS HISTORY server/server.c server/server.h
server/streamer.c server/streamer.h server/suspend.c
server/suspend.h
Diffstat (limited to 'server/streamer.h')
-rw-r--r-- | server/streamer.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/server/streamer.h b/server/streamer.h index e557d55..384e002 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.8.2.1 2008/10/22 11:59:37 schmirl Exp $ */ #ifndef VDR_STREAMDEV_STREAMER_H @@ -21,7 +21,6 @@ class cStreamdevWriter: public cThread { private: cStreamdevStreamer *m_Streamer; cTBSocket *m_Socket; - bool m_Active; protected: virtual void Action(void); @@ -29,15 +28,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 +50,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 +64,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 |