1 /******************************************************************************
5 / Description: High-Level ATI Radeon Video Capture Interface.
7 / Copyright 2001, Carlos Hasan
9 *******************************************************************************/
11 #ifndef __VIDEO_IN_H__
12 #define __VIDEO_IN_H__
16 //#include "Overlay.h"
22 #include "Theater100.h"
23 #include "Theater200.h"
25 enum video_in_source
{
31 enum { C_VIDEO_IN_SOURCE_MAX
= 2 };
33 enum video_in_standard
{
35 C_VIDEO_IN_NTSC_JAPAN
,
46 enum { C_VIDEO_IN_STANDARD_MAX
= 8 };
48 enum video_in_capture_mode
{
54 enum { C_VIDEO_IN_CAPTURE_MODE_MAX
= 2 };
56 enum video_in_resolution
{
57 C_VIDEO_IN_NTSC_SQ_WIDTH
= 640,
58 C_VIDEO_IN_NTSC_SQ_HEIGHT
= 480,
60 C_VIDEO_IN_NTSC_CCIR_WIDTH
= 720,
61 C_VIDEO_IN_NTSC_CCIR_HEIGHT
= 480,
63 C_VIDEO_IN_PAL_SQ_WIDTH
= 768,
64 C_VIDEO_IN_PAL_SQ_HEIGHT
= 576,
66 C_VIDEO_IN_PAL_CCIR_WIDTH
= 720,
67 C_VIDEO_IN_PAL_CCIR_HEIGHT
= 576
70 /*enum video_in_frame_rate {
71 C_VIDEO_IN_NTSC_FRAME_RATE = 29976,
72 C_VIDEO_IN_PAL_FRAME_RATE = 25000
75 enum video_in_capabilities
{
76 C_VIDEO_IN_HAS_SOUND
= 1 << 0,
77 C_VIDEO_IN_HAS_TUNER
= 1 << 1,
78 C_VIDEO_IN_HAS_COMPOSITE
= 1 << 2,
79 C_VIDEO_IN_HAS_SVIDEO
= 1 << 3
84 CVideoIn( const char *dev_name
);
90 int Capabilities() const;
93 void Start(video_in_source source
, video_in_standard standard
,
94 video_in_capture_mode mode
, int width
, int height
);
98 int Capture(color_space colorSpace
, void * bits
, int bitsLength
,
99 int bytesPerRow
, int * sequence
, short * number
, bigtime_t
* when
);
102 void SetBrightness(int brightness
);
104 void SetContrast(int contrast
);
106 void SetSaturation(int saturation
);
108 void SetHue(int hue
);
110 void SetSharpness(int sharpness
);
112 void SetFrequency(float frequency
, float picture
);
114 float FrequencyForChannel(int channel
, video_in_standard standard
);
116 bool SetChannel(int channel
, video_in_standard standard
);
118 int32
getFrameRate( video_in_standard standard
);
120 void getActiveRange( video_in_standard standard
, CRadeonRect
&rect
);
125 void Trace(const char * message
) const;
136 int32 fBuffer0Handle
;
137 int32 fBuffer1Handle
;
138 void *convert_buffer
;
140 int fBufferBytesPerRow
;
142 bigtime_t fBufferPeriod
;