vfs: check userland buffers before reading them.
[haiku.git] / src / add-ons / media / media-add-ons / radeon / Theater.h
blobac4d691964cda7131067649614119c0d5c8b4f4a
1 /******************************************************************************
3 / File: Theater.h
5 / Description: ATI Rage Theater Video Decoder interface.
7 / Copyright 2001, Carlos Hasan
9 *******************************************************************************/
10 #ifndef __THEATER_H__
11 #define __THEATER_H__
13 #include "Radeon.h"
14 #include "VIPPort.h"
16 enum theater_identifier {
17 // C_THEATER_VIP_VENDOR_ID = 0x1002,
18 C_THEATER100_VIP_DEVICE_ID = 0x4D541002,
19 C_THEATER200_VIP_DEVICE_ID = 0x4d4a1002
23 enum theater_standard {
24 // TK: rearranged to match spec order
25 C_THEATER_NTSC = 0,
26 C_THEATER_NTSC_JAPAN = 1,
27 C_THEATER_NTSC_443 = 2,
28 C_THEATER_PAL_M = 3,
29 C_THEATER_PAL_N = 4,
30 C_THEATER_PAL_NC = 5,
31 C_THEATER_PAL_BDGHI = 6,
32 C_THEATER_PAL_60 = 7,
33 C_THEATER_SECAM = 8
36 enum theater_source {
37 C_THEATER_TUNER = 0,
38 C_THEATER_COMPOSITE = 1,
39 C_THEATER_SVIDEO = 2
42 class CTheater {
43 public:
44 CTheater(CRadeon & radeon, int device);
46 virtual ~CTheater();
48 virtual status_t InitCheck() const = 0;
50 virtual void Reset() = 0;
52 virtual void SetEnable(bool enable, bool vbi) = 0;
54 virtual void SetStandard(theater_standard standard, theater_source source) = 0;
56 virtual void SetSize(int hactive, int vactive) = 0;
58 virtual void SetDeinterlace(bool deinterlace) = 0;
60 virtual void SetSharpness(int sharpness) = 0;
62 virtual void SetBrightness(int brightness) = 0;
64 virtual void SetContrast(int contrast) = 0;
66 virtual void SetSaturation(int saturation) = 0;
68 virtual void SetHue(int hue) = 0;
70 virtual int CurrentLine() = 0;
72 virtual void getActiveRange( theater_standard standard, CRadeonRect &rect ) = 0;
74 virtual void getVBIRange( theater_standard standard, CRadeonRect &rect ) = 0;
76 virtual void PrintToStream() = 0;
78 uint32 Capabilities() const;
80 public:
81 int Register(int index);
83 int Register(int index, int mask);
85 void SetRegister(int index, int value);
87 void SetRegister(int index, int mask, int value);
89 protected:
90 CVIPPort fPort;
91 int fDevice;
92 radeon_video_clock fClock;
93 int fTunerPort;
94 int fCompositePort;
95 int fSVideoPort;
96 theater_standard fStandard;
97 theater_source fSource;
98 int fBrightness;
99 int fContrast;
100 int fSaturation;
101 int fHue;
102 int fHActive;
103 int fVActive;
104 bool fDeinterlace;
107 #endif