summaryrefslogtreecommitdiff
path: root/ambithread.h
diff options
context:
space:
mode:
Diffstat (limited to 'ambithread.h')
-rw-r--r--ambithread.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/ambithread.h b/ambithread.h
new file mode 100644
index 0000000..d4fe822
--- /dev/null
+++ b/ambithread.h
@@ -0,0 +1,68 @@
+/*
+ * ambithread.h
+ *
+ * Copyright (C) 2013 - Christian Völlinger
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <queue>
+
+#include <vdr/thread.h>
+
+#include "common.h"
+#include "config.h"
+#include "Pixel.h"
+#include "boblightservice.h"
+
+
+//***************************************************************************
+// SEDU Thread
+//***************************************************************************
+
+class cAmbiThread : public cThread, public cAmbiService
+{
+ public:
+
+ cAmbiThread();
+ ~cAmbiThread();
+
+ int isRunning() { return Running(); }
+
+ // interface
+
+ void Stop();
+
+ private:
+
+ void Action(void);
+
+ int grabImage();
+ int detectCineBars();
+ int putData();
+
+ // data
+ cBoblight bob;
+
+ cMutex mutex;
+ cCondVar waitCondition;
+ int loopActive;
+
+ Pixel* image;
+ int cineBarsHor;
+ int cineBarsVer;
+ int imageSize;
+ int imageWidth;
+ int imageHeight;
+}; \ No newline at end of file