Ginga
0.13.6
Main Page
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
gingacc-player
include
player
GeodeVideo4Linux.h
1
#ifndef GEODEVIDEO4LINUX_H_
2
#define GEODEVIDEO4LINUX_H_
3
4
#ifdef GEODE
5
6
#ifdef __cplusplus
7
extern
"C"
{
8
#endif
9
#define _LARGEFILE64_SOURCE 1
10
11
#include <stdlib.h>
12
#include <stdio.h>
13
#include <unistd.h>
14
#include <sys/types.h>
15
#include <sys/stat.h>
16
#include <stdio.h>
17
#include <errno.h>
18
#include <signal.h>
19
#include <termios.h>
20
21
#include <sys/time.h>
22
#include <sys/ioctl.h>
23
#include <sys/mman.h>
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
#include <directfb.h>
29
#ifdef __cplusplus
30
}
31
#endif
32
33
#define _DEFINE_FMP_TYPES_
34
#include "fmp.h"
35
36
#define PLAYING 1
37
#define PAUSED 0
38
39
//===============================
40
/* These are needed to use the V4L2 driver */
41
#include <linux/fs.h>
42
#include <linux/kernel.h>
43
#include <linux/videodev.h>
/* Video for Linux Two */
44
#include <linux/ioctl_geode_v.h>
45
46
47
#define TRUE 1
48
#define FALSE 0
49
50
/* video standard */
51
52
#define VIDEOSTD_NTSC 0
53
#define VIDEOSTD_PAL 1
54
55
/* video input selection */
56
57
#define VID_TUNER 0
58
#define VID_COMPOSITE 1
59
#define VID_SVIDEO 2
60
#define VID_DIGITAL 3
61
62
/* alpha window id */
63
#define alpha0 0
64
#define alpha1 1
65
#define alpha2 2
66
67
/* overlay attributes */
68
#define OVERLAY_KEY 0x00f000f0
69
#define OVERLAY_MASK 0x00f0f0f0
70
71
/* mpeg operations */
72
#define MPEG_CLOSE 0
73
#define MPEG_STOP 1
74
#define MPEG_START 2
75
#define MPEG_UPDATE 3
76
#define MPEG_PLAY 4
77
#define MPEG_PAUSE 5
78
#define MPEG_ERROR 6
79
80
81
/* items ID */
82
#define IDC_GROUP1 11
83
#define IDC_GROUP2 12
84
#define IDC_GROUP3 13
85
#define IDC_GROUP4 14
86
#define IDC_GROUP5 15
87
88
#define IDC_TUNER 0x202
89
#define IDC_VIDEO 0x200
90
#define IDC_SVIDEO 0x201
91
#define IDC_DIGITAL 0x203
92
#define IDC_STREAM 0x204
93
#define IDC_PREF 0x205
94
#define IDC_CHNUM10x 0x206
95
#define IDC_CHNUM1x 0x207
96
#define IDC_PANLEFT 0x307
97
#define IDC_PANCENTER 0x308
98
#define IDC_PANRIGHT 0x309
99
#define IDC_STATUSWND 0x401
100
#define IDC_MUTE 0x402
101
#define IDC_CLOSECAPTION 0x403
102
#define IDC_VOLUMEUP 0x404
103
#define IDC_VOLUMEDOWN 0x405
104
#define IDC_CLOSEPREF 0x407
105
#define IDC_LOGO 0x408
106
#define IDC_SCALE 0x409
107
#define IDC_EXIT 0x40A
108
#define IDC_FULLSCREEN 0x506
109
#define IDC_DEBUGDUMP 0x507
110
#define IDC_CINEMA 0x509
111
#define IDC_DVIP 0x50A
112
#define IDC_STATUS 0x600
113
#define IDC_PREFPANEL 0x601
114
#define IDC_DISPLAY 0x602
115
#define IDC_PATTERN 0x701
116
/* timer */
117
#define mainTimerID 999
118
119
/* Close Caption display */
120
#define CCDISPLAY_W 32
121
#define CCDISPLAY_H 15
122
#define CCLEFT 80
123
#define CCTOP 180
124
#define CC_POP 1
125
#define CC_PAINT 0
126
#define CC_RU2 2
127
#define CC_RU3 3
128
#define CC_RU4 4
129
#define CCBKCOLOR BLACK
130
131
/* local command and debug */
132
#define READ_VIP 2
133
#define WRITE_VIP 3
134
#define READ_REG 4
135
#define WRITE_REG 5
136
#define READ_DEC 6
137
#define WRITE_DEC 7
138
#define READ_VID 8
139
#define WRITE_VID 9
140
141
142
/* gui operations */
143
#define ITEM_APPLY -2
144
#define ITEM_TOGGLE -1
145
#define ITEM_ON 1
146
#define ITEM_OFF 0
147
148
int
dvip(
int
enable);
149
int
video_set_control(
unsigned
long
id
,
unsigned
char
value);
150
int
video_brightness(
unsigned
char
bright);
151
int
video_contrast(
unsigned
char
contrast);
152
int
video_saturation(
unsigned
char
sat);
153
int
video_hue(
unsigned
char
hue);
154
int
video_sharpness(
unsigned
char
sharp);
155
int
open_devices();
156
void
close_devices();
157
int
get_vout_format(
int
* width,
int
* height);
158
int
set_color_key(
unsigned
long
key,
unsigned
long
mask);
159
int
set_graphic_on_video(
int
enable,
int
color_key_src);
160
int
set_alpha_window(
unsigned
char
num,
unsigned
short
x,
unsigned
short
y,
161
unsigned
short
width,
unsigned
short
height);
162
163
int
set_alpha_operation(
unsigned
char
num,
unsigned
char
alpha,
164
unsigned
long
color,
int
color_enable,
165
int
priority,
char
fade,
int
enable);
166
167
int
set_video_outside_alpha(
int
enable);
168
int
set_overlay_info(
unsigned
long
key,
unsigned
long
mask,
int
graphics,
169
int
enable);
170
171
int
set_alpha_blend_info(
int
window,
int
x,
int
y,
int
w,
int
h,
172
int
priority,
int
alpha,
int
delta,
int
enable,
173
unsigned
long
color);
174
175
int
set_video_fmt(
int
width,
int
height);
176
int
set_vout_window(
int
x,
int
y,
int
width,
int
height);
177
int
set_input(
int
inp);
178
int
capture_enable(
int
enable);
179
int
preview(
int
enable);
180
int
set_chan(
int
ch);
181
int
set_vout_control(
int
val);
182
int
DriverCapability();
183
void
open_port();
184
void
close_port();
185
int
kbhit();
186
int
readch();
187
DWORD setOutputMode(DWORD newvgatv);
188
int
SetAlphaBlend(
int
wnum,
int
x,
int
y,
int
w,
int
h,
int
subcolor,
int
alphaval,
int
xoff,
int
yoff);
189
190
/* driver wrapper */
191
#ifdef __cplusplus
192
}
193
#endif
194
195
#endif
/*GEODE*/
196
#endif
/*GEODEVIDEO4LINUX_H_*/
Generated on Tue Aug 5 2014 15:34:58 for Ginga by
1.8.6