psl1ght
A free SDK for Sony's PS3 console
video.h
Go to the documentation of this file.
1 
5 #ifndef __LV2_VIDEO_H__
6 #define __LV2_VIDEO_H__
7 
8 #include <ppu-types.h>
9 
10 #define VIDEO_STATE_DISABLED 0
11 #define VIDEO_STATE_ENABLED 1
12 #define VIDEO_STATE_BUSY 3
13 
14 #define VIDEO_PRIMARY 0
15 #define VIDEO_SECONDARY 1
16 
17 #define VIDEO_SCANMODE_INTERLACE 0
18 #define VIDEO_SCANMODE_PROGRESSIVE 1
19 
20 #define VIDEO_SCANMODE2_AUTO 0
21 #define VIDEO_SCANMODE2_INTERLACE 1
22 #define VIDEO_SCANMODE2_PROGRESSIVE 2
23 
24 #define VIDEO_BUFFER_FORMAT_XRGB 0
25 #define VIDEO_BUFFER_FORMAT_XBGR 1
26 #define VIDEO_BUFFER_FORMAT_FLOAT 2
27 
28 #define VIDEO_ASPECT_AUTO 0
29 #define VIDEO_ASPECT_4_3 1
30 #define VIDEO_ASPECT_16_9 2
31 
32 #define VIDEO_RESOLUTION_UNDEFINED 0
33 #define VIDEO_RESOLUTION_1080 1
34 #define VIDEO_RESOLUTION_720 2
35 #define VIDEO_RESOLUTION_480 4
36 #define VIDEO_RESOLUTION_576 5
37 #define VIDEO_RESOLUTION_1600x1080 10
38 #define VIDEO_RESOLUTION_1440x1080 11
39 #define VIDEO_RESOLUTION_1280x1080 12
40 #define VIDEO_RESOLUTION_960x1080 13
41 
42 #define VIDEO_COLOR_RGB 0x01
43 #define VIDEO_COLOR_YUV 0x02
44 #define VIDEO_COLOR_XVYCC 0x04
45 
46 #define VIDEO_RESOLUTION_720_3D_FRAME_PACKING 0x81
47 #define VIDEO_RESOLUTION_1024x720_3D_FRAME_PACKING 0x88
48 #define VIDEO_RESOLUTION_960x720_3D_FRAME_PACKING 0x89
49 #define VIDEO_RESOLUTION_800x720_3D_FRAME_PACKING 0x8a
50 #define VIDEO_RESOLUTION_640x720_3D_FRAME_PACKING 0x8b
51 
52 #define VIDEO_REFRESH_AUTO 0x00
53 #define VIDEO_REFRESH_59_94HZ 0x01
54 #define VIDEO_REFRESH_50HZ 0x02
55 #define VIDEO_REFRESH_60HZ 0x04
56 #define VIDEO_REFRESH_30HZ 0x08
57 
58 #define VIDEO_PORT_NONE 0x00
59 #define VIDEO_PORT_HDMI 0x01
60 #define VIDEO_PORT_NETWORK 0x41
61 #define VIDEO_PORT_COMPOSITE 0x81
62 #define VIDEO_PORT_D 0x82
63 #define VIDEO_PORT_COMPONENT 0x83
64 #define VIDEO_PORT_RGB 0x84
65 #define VIDEO_PORT_SCART 0x85
66 #define VIDEO_PORT_DSUB 0x86
67 
68 #ifdef __cplusplus
69 extern "C" {
70 #endif
71 
74 typedef struct _videoresolution
75 {
76  u16 width;
77  u16 height;
79 
82 typedef struct _videodisplaymode
83 {
106  u8 aspect;
108  u8 padding[2];
113 
116 typedef struct _videostate
117 {
125  u8 state;
136  u8 padding[6];
139 } videoState;
140 
143 typedef struct _videoconfig
144 {
154 
162  u8 format;
163 
171  u8 aspect;
173  u8 padding[9];
174 
177  u32 pitch;
179 
180 typedef struct _videoColorInfo
181 {
182  u16 redX;
183  u16 redY;
184  u16 greenX;
185  u16 greenY;
186  u16 blueX;
187  u16 blueY;
188  u16 whiteX;
189  u16 whiteY;
190  u32 gamma;
192 
193 typedef struct _videoKSVList
194 {
195  u8 ksv[32*5];
196  u8 padding[4];
197  u32 count;
198 } videoKSVList;
199 
200 typedef struct _videoDeviceInfo
201 {
202  u8 portType;
203  u8 colorSpace;
204  u16 latency;
205  u8 availableModeCount;
206  u8 state;
207  u8 rgbOutputRange;
208  u8 padding[5];
209  videoColorInfo colorInfo;
210  videoDisplayMode availableModes[32];
211  videoKSVList ksvList;
213 
214 
224 s32 videoGetState(s32 videoOut,s32 deviceIndex,videoState *state);
225 
235 s32 videoGetResolution(s32 resolutionId,videoResolution *resolution);
236 
245 s32 videoConfigure(s32 videoOut,videoConfiguration *config,void *option,s32 blocking);
246 
247 s32 videoGetNumberOfDevice(u32 videoOut);
248 s32 videoGetDeviceInfo(u32 videoOut, u32 deviceIndex, videoDeviceInfo *info);
249 s32 videoGetConfiguration(u32 videoOut, videoConfiguration *config, void *option);
250 s32 videoGetResolutionAvailability(u32 videoOut, u32 resolutionId, u32 aspect, u32 option);
251 s32 videoDebugSetMonitorType(u32 videoOut, u32 monitorType);
252 s32 videoGetConvertCursorColorInfo(u8 *rgbOutputRange);
253 
254 /* TODO: typedef int (*videoCallback)(u32 slot, u32 videoOut, u32 deviceIndex, u32 event, videoDeviceInfo *info, void *userData ); */
255 /* TODO: s32 videoRegisterCallback(u32 slot, videoCallback function, void *userData); */
256 /* TODO: s32 videoUnregisterCallback(u32 slot); */
257 
258 #ifdef __cplusplus
259  }
260 #endif
261 
262 #endif
Video configuration structure.
Definition: video.h:143
Video state stucture.
Definition: video.h:116
u8 padding[6]
unused.
Definition: video.h:136
u8 padding[2]
unused.
Definition: video.h:108
Video resolution.
Definition: video.h:74
Video display mode.
Definition: video.h:82
u8 resolution
resolution id.
Definition: video.h:92
struct _videostate videoState
Video state stucture.
u16 height
Screen height in pixels.
Definition: video.h:77
Definition: video.h:200
s32 videoGetState(s32 videoOut, s32 deviceIndex, videoState *state)
Get video state.
Definition: video.h:193
u8 conversion
Conversion mode.
Definition: video.h:98
u16 refreshRates
Refresh rates.
Definition: video.h:111
u8 aspect
aspect ratio.
Definition: video.h:171
u8 aspect
aspect ratio.
Definition: video.h:106
u8 scanMode
Scan mode.
Definition: video.h:95
u8 resolution
resolution id.
Definition: video.h:153
struct _videodisplaymode videoDisplayMode
Video display mode.
u8 padding[9]
unused.
Definition: video.h:173
u16 width
Screen width in pixels.
Definition: video.h:76
u32 pitch
offset in bytes between the beginnings of consecutive lines.
Definition: video.h:177
u8 state
state value.
Definition: video.h:125
struct _videoconfig videoConfiguration
Video configuration structure.
videoDisplayMode displayMode
display mode.
Definition: video.h:138
Definition: video.h:180
s32 videoConfigure(s32 videoOut, videoConfiguration *config, void *option, s32 blocking)
Configure the video output.
struct _videoresolution videoResolution
Video resolution.
u8 format
video buffer format.
Definition: video.h:162
s32 videoGetResolution(s32 resolutionId, videoResolution *resolution)
Get video resolution from resolution id.
u8 colorSpace
color space.
Definition: video.h:134