summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2009-02-19 21:08:24 +0100
committerChristian Gmeiner <christian.gmeiner@gmail.com>2009-02-19 21:08:24 +0100
commitc2db825b071974369ab40300210f5ecb933744a6 (patch)
tree7414d3793d69acac1a399f1bf1c266bd595fc1bc
parentb74b93b0d95ef21c4bccbbc8ef53322b4b1565a5 (diff)
downloadvdr-plugin-dxr3-c2db825b071974369ab40300210f5ecb933744a6.tar.gz
vdr-plugin-dxr3-c2db825b071974369ab40300210f5ecb933744a6.tar.bz2
make more use of Uncopyable
-rw-r--r--dxr3output.h35
-rw-r--r--dxr3syncbuffer.h8
-rw-r--r--dxr3sysclock.h4
3 files changed, 11 insertions, 36 deletions
diff --git a/dxr3output.h b/dxr3output.h
index 7afccc2..9b8d408 100644
--- a/dxr3output.h
+++ b/dxr3output.h
@@ -24,25 +24,19 @@
#include "dxr3syncbuffer.h"
#include "dxr3audiodecoder.h"
+#include "Uncopyable.h"
// ==================================
-class cDxr3OutputThread : public cThread
-{
+class cDxr3OutputThread : public cThread, private Uncopyable {
public:
cDxr3OutputThread(cDxr3Interface& dxr3Device, cDxr3SyncBuffer& buffer);
virtual ~cDxr3OutputThread() {
- m_buffer.Stop();
- Cancel(3);
+ m_buffer.Stop();
+ Cancel(3);
};
- bool NeedResync()
- {
- return m_bNeedResync;
- };
- void ClearResyncRequest()
- {
- m_bNeedResync = false;
- };
+ bool NeedResync() const { return m_bNeedResync; }
+ void ClearResyncRequest() { m_bNeedResync = false; }
protected:
virtual void Action() = 0;
@@ -50,37 +44,24 @@ protected:
cDxr3Interface& m_dxr3Device;
cDxr3SyncBuffer& m_buffer;
bool m_bNeedResync;
-
-private:
- cDxr3OutputThread(cDxr3OutputThread&); // no copy constructor
};
// ==================================
-class cDxr3AudioOutThread : public cDxr3OutputThread
-{
+class cDxr3AudioOutThread : public cDxr3OutputThread {
public:
cDxr3AudioOutThread(cDxr3Interface& dxr3Device, cDxr3SyncBuffer& buffer);
protected:
void Action();
-
-private:
- //cDxr3AudioOutThread(); // no standard constructor
- cDxr3AudioOutThread(cDxr3AudioOutThread&); // no copy constructor
};
// ==================================
-class cDxr3VideoOutThread : public cDxr3OutputThread
-{
+class cDxr3VideoOutThread : public cDxr3OutputThread {
public:
cDxr3VideoOutThread(cDxr3Interface& dxr3Device, cDxr3SyncBuffer& buffer);
protected:
void Action();
-
-private:
- //cDxr3VideoOutThread(); // no standard constructor
- cDxr3VideoOutThread(cDxr3VideoOutThread&); // no copy constructor
};
#endif /*_DXR3OUTPUTTHREAD_H_*/
diff --git a/dxr3syncbuffer.h b/dxr3syncbuffer.h
index 1ed7a83..75b19e0 100644
--- a/dxr3syncbuffer.h
+++ b/dxr3syncbuffer.h
@@ -35,8 +35,7 @@ const uint32_t UNKNOWN_DATA_RATE = 0xFFFFFFFF;
const uint32_t UNKNOWN_ASPECT_RATIO = 0xFFFFFFFF;
// ==================================
-class cFixedLengthFrame
-{
+class cFixedLengthFrame : private Uncopyable {
public:
cFixedLengthFrame();
~cFixedLengthFrame();
@@ -107,11 +106,6 @@ protected:
static uint32_t m_staticAudioChannelCount;
static uint32_t m_staticAudioDataRate;
-
-private:
- //cFixedLengthFrame(); // you are not allowed to use this constructor
- cFixedLengthFrame(cFixedLengthFrame&); // no copy constructor
-
};
// ==================================
diff --git a/dxr3sysclock.h b/dxr3sysclock.h
index 372117e..71eb247 100644
--- a/dxr3sysclock.h
+++ b/dxr3sysclock.h
@@ -25,11 +25,11 @@
#include <stdint.h>
#include <linux/em8300.h>
#include <vdr/thread.h>
+#include "Uncopyable.h"
// ==================================
// work with dxr3's clock
-class cDxr3SysClock
-{
+class cDxr3SysClock : private Uncopyable {
public:
cDxr3SysClock(int fd_control, int fd_video, int fd_spu):
m_fdcontrol(fd_control),