summaryrefslogtreecommitdiff
path: root/seduservice.h
blob: 7079041368e77bf26c060f0c24962718a7995b0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*
 * seduservice.h: A plugin for the Video Disk Recorder
 *
 * See the README file for copyright information and how to reach the author.
 *
 * $Id: seduservice.h,v 1.3 2012/11/22 18:02:59 wendel Exp $
 */

#ifndef __SEDU_SERVICE_H
#define __SEDU_SERVICE_H

//***************************************************************************
// Pixel - format as provided by softhddevice 
//***************************************************************************

struct Pixel
{
   unsigned char b;
   unsigned char g;
   unsigned char r;
   unsigned char a;
};

//***************************************************************************
// Sedu Service
//***************************************************************************

class cSeduService
{
   public:

      enum Cinebars
      {
         cbHorizontal,
         cbVertical,
         cbBoth,
         cbCount
      };

      enum SeduMode
      {
         smMiniDMX,
         smTpm2,
         smCount
      };

      enum ViewMode
      {
         vmAtmo,
         vmFixedCol,
         vmRainbow,
         vmColorWheel,
         vmColorWheelStatic,
         vmBlack,
         vmDetached,
         vmCount
      };

      enum LedPosition
      {
         lpTop,
         lpLeft,
         lpBottom,
         lpRight
      };

      struct cLed
      {
         int x;
         int toX;
         int y;
         int toY;
         LedPosition lp;
      };

      // static

      void rgb2hsv(int r, int g, int b, double* h, double* s, double* v);
      Pixel hsv2rgb(int h, double s, double v);

      static const char* toName(ViewMode vm);
      static const char* viewModes[];
};

#endif // __SEDU_SERVICE_H