Rev 1696 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1696 | serge | 1 | |
2 | #define BLACK_MAGIC_VIDEO |
||
3 | |||
4 | |||
2349 | Serge | 5 | typedef unsigned int count_t; |
6 | |||
7 | |||
1696 | serge | 8 | { |
9 | int left; |
||
2349 | Serge | 10 | int top; |
11 | int right; |
||
12 | int bottom; |
||
13 | }rect_t; |
||
14 | |||
15 | |||
16 | { |
||
17 | uint32_t width; |
||
18 | uint32_t height; |
||
19 | uint32_t pitch; |
||
20 | uint32_t handle; |
||
21 | uint8_t *data; |
||
22 | }bitmap_t; |
||
23 | |||
24 | |||
25 | |||
26 | |||
27 | { |
||
28 | uint32_t caps; |
||
29 | uint32_t ctx_width; |
||
30 | uint32_t ctx_height; |
||
31 | uint32_t win_width; |
||
32 | uint32_t win_height; |
||
33 | |||
34 | |||
35 | uint32_t ctx_format; |
||
36 | int target; |
||
37 | enum{ |
||
38 | EMPTY, INIT }state; |
||
39 | enum{ |
||
40 | NORMAL, MINIMIZED, ROLLED |
||
41 | }win_state; |
||
42 | |||
43 | |||
44 | }; |
||
45 | |||
46 | |||
47 | { |
||
48 | volatile uint32_t lock; |
||
1696 | serge | 49 | char *buffer; |
50 | volatile uint32_t count; |
||
51 | }astream_t; |
||
52 | |||
53 | |||
54 | { |
||
55 | unsigned int code; |
||
56 | unsigned int sender; |
||
57 | unsigned int stream; |
||
58 | unsigned int offset; |
||
59 | unsigned int size; |
||
60 | unsigned int unused[2]; |
||
61 | }SND_EVENT; |
||
62 | |||
63 | |||
2349 | Serge | 64 | { |
65 | unsigned handle; |
||
66 | unsigned io_code; |
||
67 | void *input; |
||
68 | int inp_size; |
||
69 | void *output; |
||
70 | int out_size; |
||
71 | }ioctl_t; |
||
72 | |||
73 | |||
74 | AVPacketList *first_pkt; |
||
75 | AVPacketList *last_pkt; |
||
76 | int size; |
||
77 | int count; |
||
78 | volatile uint32_t lock; |
||
79 | } queue_t; |
||
80 | |||
81 | |||
82 | int get_packet(queue_t *q, AVPacket *pkt); |
||
83 | |||
84 | |||
85 | |||
1696 | serge | 86 | extern AVRational video_time_base; |
87 | |||
88 | |||
2349 | Serge | 89 | uint32_t ctx_format, uint32_t flags); |
90 | |||
91 | |||
92 | void render_adjust_size(render_t *render); |
||
93 | |||
94 | |||
1696 | serge | 95 | int audio_thread(void *param); |
2349 | Serge | 96 | |
97 | |||
1696 | serge | 98 | int video_thread(void *param); |
2349 | Serge | 99 | |
100 | |||
101 | int decode_audio(AVCodecContext *ctx, queue_t *qa); |
||
102 | |||
103 | |||
1696 | serge | 104 | |
105 | |||
106 | |||
2349 | Serge | 107 | |
1696 | serge | 108 | |
2349 | Serge | 109 | |
1696 | serge | 110 | |
2349 | Serge | 111 | { |
1696 | serge | 112 | *val = 0; |
113 | } |
||
114 | |||
115 | |||
116 | { |
||
117 | __asm__ __volatile__ ( |
||
118 | "int $0x40" |
||
119 | ::"a"(68),"b"(14),"c"(event)); |
||
120 | } |
||
121 | |||
122 | |||
123 | { |
||
124 | uint32_t val; |
||
125 | __asm__ __volatile__( |
||
126 | "int $0x40" |
||
127 | :"=a"(val) |
||
128 | :"a"(11)); |
||
129 | return val; |
||
130 | }; |
||
131 | |||
132 | |||
133 | { |
||
134 | uint32_t val; |
||
135 | __asm__ __volatile__( |
||
136 | "int $0x40" |
||
137 | :"=a"(val) |
||
138 | :"a"(17)); |
||
139 | return val>>8; |
||
140 | }; |
||
141 | |||
142 | |||
143 | { |
||
144 | __asm__ __volatile__( |
||
145 | "int $0x40" |
||
146 | ::"a"(68), "b"(1)); |
||
147 | }; |
||
148 | |||
149 | |||
150 | { |
||
151 | __asm__ __volatile__( |
||
152 | "int $0x40" |
||
153 | ::"a"(5), "b"(time)); |
||
154 | }; |
||
155 | |||
2349 | Serge | 156 | |
157 | { |
||
158 | __asm__ __volatile__( |
||
159 | "int $0x40" |
||
160 | ::"a"(7), "b"(bitmap), |
||
161 | "c"((w << 16) | h), |
||
162 | "d"((x << 16) | y)); |
||
163 | } |
||
164 | |||
165 | |||
166 | { |
||
167 | __asm__ __volatile__( |
||
168 | "int $0x40" ::"a"(12),"b"(1)); |
||
169 | }; |
||
170 | |||
171 | |||
172 | { |
||
173 | __asm__ __volatile__( |
||
174 | "int $0x40" ::"a"(12),"b"(2)); |
||
175 | }; |
||
176 | |||
177 | |||
178 | |||
179 | color_t workcolor, uint32_t style) |
||
180 | { |
||
181 | |||
182 | |||
183 | "int $0x40" |
||
184 | ::"a"(0), |
||
185 | "b"((x << 16) | (w & 0xFFFF)), |
||
186 | "c"((y << 16) | (h & 0xFFFF)), |
||
187 | "d"((style << 24) | (workcolor & 0xFFFFFF)), |
||
188 | "D"(name)); |
||
189 | }; |
||
190 | |||
191 | |||
192 | { |
||
193 | __asm__ __volatile__( |
||
194 | "int $0x40" |
||
195 | ::"a"(9), "b"(info), "c"(-1) |
||
196 | :"memory"); |
||
197 | } |
||
198 | |||
199 | |||
200 | #define HW_TEX_BLIT (1<<1) /* stretch blit */ |
||
201 | #define HW_VID_BLIT (1<<2) /* planar and packed video */ |
||
202 | |||
203 | |||
204 | |||
205 | |||
206 | int resize_bitmap(bitmap_t *bitmap); |
||
207 | int blit_bitmap(bitmap_t *bitmap, int dst_x, int dst_y, |
||
208 | int w, int h);2)><2)>1)><1)>0)><0)>><>><>><>><>><> |
||
209 |