Mercurial > mplayer.hg
annotate libvo/vesa_lvo.c @ 35418:cedb0ba2b5c6
Move the code to set guiInfo's Track, Chapter and Angle start values.
Set them before checking whether there is any media opened, because
with no media opened we clear the counters.
author | ib |
---|---|
date | Thu, 29 Nov 2012 14:11:03 +0000 |
parents | ddb45e9443ec |
children |
rev | line source |
---|---|
2869 | 1 /* |
27509
d97a607821f1
Replace casual GPL notices by proper license headers.
diego
parents:
25527
diff
changeset
|
2 * vo_vesa interface to Linux Video Overlay |
d97a607821f1
Replace casual GPL notices by proper license headers.
diego
parents:
25527
diff
changeset
|
3 * (partly based on vo_mga.c) |
2869 | 4 * |
27509
d97a607821f1
Replace casual GPL notices by proper license headers.
diego
parents:
25527
diff
changeset
|
5 * copyright (C) 2001 Nick Kurshev <nickols_k@mail.ru> |
d97a607821f1
Replace casual GPL notices by proper license headers.
diego
parents:
25527
diff
changeset
|
6 * |
d97a607821f1
Replace casual GPL notices by proper license headers.
diego
parents:
25527
diff
changeset
|
7 * This file is part of MPlayer. |
2869 | 8 * |
27509
d97a607821f1
Replace casual GPL notices by proper license headers.
diego
parents:
25527
diff
changeset
|
9 * MPlayer is free software; you can redistribute it and/or modify |
d97a607821f1
Replace casual GPL notices by proper license headers.
diego
parents:
25527
diff
changeset
|
10 * it under the terms of the GNU General Public License as published by |
d97a607821f1
Replace casual GPL notices by proper license headers.
diego
parents:
25527
diff
changeset
|
11 * the Free Software Foundation; either version 2 of the License, or |
d97a607821f1
Replace casual GPL notices by proper license headers.
diego
parents:
25527
diff
changeset
|
12 * (at your option) any later version. |
2869 | 13 * |
27509
d97a607821f1
Replace casual GPL notices by proper license headers.
diego
parents:
25527
diff
changeset
|
14 * MPlayer is distributed in the hope that it will be useful, |
d97a607821f1
Replace casual GPL notices by proper license headers.
diego
parents:
25527
diff
changeset
|
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
d97a607821f1
Replace casual GPL notices by proper license headers.
diego
parents:
25527
diff
changeset
|
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
d97a607821f1
Replace casual GPL notices by proper license headers.
diego
parents:
25527
diff
changeset
|
17 * GNU General Public License for more details. |
d97a607821f1
Replace casual GPL notices by proper license headers.
diego
parents:
25527
diff
changeset
|
18 * |
d97a607821f1
Replace casual GPL notices by proper license headers.
diego
parents:
25527
diff
changeset
|
19 * You should have received a copy of the GNU General Public License along |
d97a607821f1
Replace casual GPL notices by proper license headers.
diego
parents:
25527
diff
changeset
|
20 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
d97a607821f1
Replace casual GPL notices by proper license headers.
diego
parents:
25527
diff
changeset
|
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
2869 | 22 */ |
23 | |
24 #include <inttypes.h> | |
25 #include <sys/ioctl.h> | |
26 #include <unistd.h> | |
27 #include <fcntl.h> | |
28 #include <sys/mman.h> | |
29 #include <stdio.h> | |
30 #include <stdlib.h> | |
31 #include <string.h> | |
32 | |
3205 | 33 #include "config.h" |
17932 | 34 #include "mp_msg.h" |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17932
diff
changeset
|
35 #include "help_mp.h" |
3205 | 36 |
2869 | 37 #include "vesa_lvo.h" |
19431
ac69ba536915
Explicitly include libmpcodecs/img_format.h and libvo/fastmemcpy.h.
diego
parents:
18234
diff
changeset
|
38 #include "libmpcodecs/img_format.h" |
13787
e047e70a9767
Handle "xxx.h" vs "../xxx.h" include paths in a consistent way.
diego
parents:
6817
diff
changeset
|
39 #include "drivers/mga_vid.h" /* <- should be changed to "linux/'something'.h" */ |
2869 | 40 #include "fastmemcpy.h" |
32469
3fef2e17a03f
Move osd.[ch] and osd_template.c from libvo to sub.
cigaes
parents:
32467
diff
changeset
|
41 #include "sub/osd.h" |
3202 | 42 #include "video_out.h" |
32467 | 43 #include "sub/sub.h" |
15212
05aa13cdf92f
replace VO and VF numeric flags with #defined identifiers
henry
parents:
13787
diff
changeset
|
44 #include "libmpcodecs/vfcap.h" |
3202 | 45 |
3165 | 46 #define WIDTH_ALIGN 32 /* should be 16 for rage:422 and 32 for rage:420 */ |
3266
ff90589b635f
Fixed single buffering problems and -vo mga compatibility by number of buffers
nick
parents:
3205
diff
changeset
|
47 #define NUM_FRAMES 10 |
3205 | 48 |
2869 | 49 static uint8_t *frames[NUM_FRAMES]; |
50 | |
51 static int lvo_handler = -1; | |
52 static uint8_t *lvo_mem = NULL; | |
53 static uint8_t next_frame; | |
54 static mga_vid_config_t mga_vid_config; | |
2974
49199909c939
Ugly YV12 support on Radeon BES. (Only radeon_vid currently work with this stuff :( Sorry!)
nick
parents:
2971
diff
changeset
|
55 static unsigned image_bpp,image_height,image_width,src_format; |
33305
ddb45e9443ec
Remove the variable arguments from the libvo control() functions.
iive
parents:
32469
diff
changeset
|
56 uint32_t vlvo_control(uint32_t request, void *data); |
2869 | 57 |
58 #define PIXEL_SIZE() ((video_mode_info.BitsPerPixel+7)/8) | |
59 #define SCREEN_LINE_SIZE(pixel_size) (video_mode_info.XResolution*(pixel_size) ) | |
60 #define IMAGE_LINE_SIZE(pixel_size) (image_width*(pixel_size)) | |
61 | |
2971 | 62 int vlvo_init(unsigned src_width,unsigned src_height, |
2869 | 63 unsigned x_org,unsigned y_org,unsigned dst_width, |
64 unsigned dst_height,unsigned format,unsigned dest_bpp) | |
65 { | |
66 size_t i,awidth; | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17932
diff
changeset
|
67 mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_ThisBranchIsNoLongerSupported); |
4493 | 68 return -1; |
17932 | 69 if( mp_msg_test(MSGT_VO,MSGL_DBG2) ) { |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17932
diff
changeset
|
70 mp_msg(MSGT_VO,MSGL_DBG2, "vesa_lvo: vlvo_init() was called\n");} |
2869 | 71 image_width = src_width; |
72 image_height = src_height; | |
73 mga_vid_config.version=MGA_VID_VERSION; | |
2974
49199909c939
Ugly YV12 support on Radeon BES. (Only radeon_vid currently work with this stuff :( Sorry!)
nick
parents:
2971
diff
changeset
|
74 src_format = mga_vid_config.format=format; |
2869 | 75 awidth = (src_width + (WIDTH_ALIGN-1)) & ~(WIDTH_ALIGN-1); |
76 switch(format){ | |
77 case IMGFMT_YV12: | |
78 case IMGFMT_I420: | |
79 case IMGFMT_IYUV: | |
80 image_bpp=16; | |
81 mga_vid_config.frame_size = awidth*src_height+(awidth*src_height)/2; | |
82 break; | |
83 case IMGFMT_YUY2: | |
84 case IMGFMT_UYVY: | |
85 image_bpp=16; | |
86 mga_vid_config.frame_size = awidth*src_height*2; | |
87 break; | |
88 case IMGFMT_RGB15: | |
89 case IMGFMT_BGR15: | |
90 case IMGFMT_RGB16: | |
91 case IMGFMT_BGR16: | |
92 image_bpp=16; | |
93 mga_vid_config.frame_size = awidth*src_height*2; | |
94 break; | |
95 case IMGFMT_RGB24: | |
96 case IMGFMT_BGR24: | |
97 image_bpp=24; | |
98 mga_vid_config.frame_size = awidth*src_height*3; | |
99 break; | |
100 case IMGFMT_RGB32: | |
101 case IMGFMT_BGR32: | |
102 image_bpp=32; | |
103 mga_vid_config.frame_size = awidth*src_height*4; | |
104 break; | |
105 default: | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17932
diff
changeset
|
106 mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_InvalidOutputFormat,vo_format_name(format),format); |
2869 | 107 return -1; |
108 } | |
109 mga_vid_config.colkey_on=0; | |
110 mga_vid_config.src_width = src_width; | |
111 mga_vid_config.src_height= src_height; | |
112 mga_vid_config.dest_width = dst_width; | |
113 mga_vid_config.dest_height= dst_height; | |
114 mga_vid_config.x_org=x_org; | |
115 mga_vid_config.y_org=y_org; | |
116 mga_vid_config.num_frames=NUM_FRAMES; | |
117 if (ioctl(lvo_handler,MGA_VID_CONFIG,&mga_vid_config)) | |
118 { | |
2971 | 119 perror("vesa_lvo: Error in mga_vid_config ioctl()"); |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17932
diff
changeset
|
120 mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_IncompatibleDriverVersion); |
2869 | 121 return -1; |
122 } | |
123 ioctl(lvo_handler,MGA_VID_ON,0); | |
124 | |
125 frames[0] = (char*)mmap(0,mga_vid_config.frame_size*mga_vid_config.num_frames,PROT_WRITE,MAP_SHARED,lvo_handler,0); | |
126 for(i=1;i<NUM_FRAMES;i++) | |
127 frames[i] = frames[i-1] + mga_vid_config.frame_size; | |
128 next_frame = 0; | |
129 lvo_mem = frames[next_frame]; | |
130 | |
131 /*clear the buffer*/ | |
132 memset(frames[0],0x80,mga_vid_config.frame_size*mga_vid_config.num_frames); | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27509
diff
changeset
|
133 return 0; |
2869 | 134 } |
135 | |
136 void vlvo_term( void ) | |
137 { | |
17932 | 138 if( mp_msg_test(MSGT_VO,MSGL_DBG2) ) { |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17932
diff
changeset
|
139 mp_msg(MSGT_VO,MSGL_DBG2, "vesa_lvo: vlvo_term() was called\n");} |
2869 | 140 ioctl( lvo_handler,MGA_VID_OFF,0 ); |
141 munmap(frames[0],mga_vid_config.frame_size*mga_vid_config.num_frames); | |
142 if(lvo_handler != -1) close(lvo_handler); | |
143 } | |
144 | |
32202
6c9a3a4c93a7
Mark vlvo_draw_slice_420() as static, it is not used outside the file; fixes:
diego
parents:
32201
diff
changeset
|
145 static uint32_t vlvo_draw_slice_420(uint8_t *image[], int stride[], |
6c9a3a4c93a7
Mark vlvo_draw_slice_420() as static, it is not used outside the file; fixes:
diego
parents:
32201
diff
changeset
|
146 int w, int h, int x, int y) |
2869 | 147 { |
148 uint8_t *src; | |
149 uint8_t *dest; | |
3020 | 150 uint32_t bespitch,bespitch2; |
2869 | 151 int i; |
152 | |
153 bespitch = (mga_vid_config.src_width + (WIDTH_ALIGN-1)) & ~(WIDTH_ALIGN-1); | |
154 bespitch2 = bespitch/2; | |
155 | |
156 dest = lvo_mem + bespitch * y + x; | |
157 src = image[0]; | |
158 for(i=0;i<h;i++){ | |
23457
a124f3abc1ec
Replace implicit use of fast_memcpy via macro by explicit use to allow
reimar
parents:
19431
diff
changeset
|
159 fast_memcpy(dest,src,w); |
2869 | 160 src+=stride[0]; |
161 dest += bespitch; | |
162 } | |
163 | |
164 w/=2;h/=2;x/=2;y/=2; | |
165 | |
166 dest = lvo_mem + bespitch*mga_vid_config.src_height + bespitch2 * y + x; | |
167 src = image[1]; | |
168 for(i=0;i<h;i++){ | |
23457
a124f3abc1ec
Replace implicit use of fast_memcpy via macro by explicit use to allow
reimar
parents:
19431
diff
changeset
|
169 fast_memcpy(dest,src,w); |
2869 | 170 src+=stride[1]; |
171 dest += bespitch2; | |
172 } | |
173 | |
174 dest = lvo_mem + bespitch*mga_vid_config.src_height | |
175 + bespitch*mga_vid_config.src_height / 4 | |
176 + bespitch2 * y + x; | |
177 src = image[2]; | |
178 for(i=0;i<h;i++){ | |
23457
a124f3abc1ec
Replace implicit use of fast_memcpy via macro by explicit use to allow
reimar
parents:
19431
diff
changeset
|
179 fast_memcpy(dest,src,w); |
2869 | 180 src+=stride[2]; |
181 dest += bespitch2; | |
182 } | |
3020 | 183 return 0; |
184 } | |
185 | |
32204
0a81c931ecb5
Mark functs not used outside of the file as static, remove from header; fixes:
diego
parents:
32203
diff
changeset
|
186 static uint32_t vlvo_draw_slice(uint8_t *image[], int stride[], |
0a81c931ecb5
Mark functs not used outside of the file as static, remove from header; fixes:
diego
parents:
32203
diff
changeset
|
187 int w, int h, int x, int y) |
3020 | 188 { |
17932 | 189 if( mp_msg_test(MSGT_VO,MSGL_DBG2) ) { |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17932
diff
changeset
|
190 mp_msg(MSGT_VO,MSGL_DBG2, "vesa_lvo: vlvo_draw_slice() was called\n");} |
3165 | 191 if(src_format == IMGFMT_YV12 || src_format == IMGFMT_I420 || src_format == IMGFMT_IYUV) |
3202 | 192 vlvo_draw_slice_420(image,stride,w,h,x,y); |
2974
49199909c939
Ugly YV12 support on Radeon BES. (Only radeon_vid currently work with this stuff :( Sorry!)
nick
parents:
2971
diff
changeset
|
193 else |
3202 | 194 { |
195 uint8_t *dst; | |
196 uint8_t bytpp; | |
197 bytpp = (image_bpp+7)/8; | |
198 dst = lvo_mem + (image_width * y + x)*bytpp; | |
199 /* vlvo_draw_slice_422(image,stride,w,h,x,y); just for speed */ | |
23457
a124f3abc1ec
Replace implicit use of fast_memcpy via macro by explicit use to allow
reimar
parents:
19431
diff
changeset
|
200 fast_memcpy(dst,image[0],mga_vid_config.frame_size); |
3202 | 201 } |
2924 | 202 return 0; |
2869 | 203 } |
204 | |
32204
0a81c931ecb5
Mark functs not used outside of the file as static, remove from header; fixes:
diego
parents:
32203
diff
changeset
|
205 static uint32_t vlvo_draw_frame(uint8_t *image[]) |
2869 | 206 { |
3017 | 207 /* Note it's very strange but sometime for YUY2 draw_frame is called */ |
23457
a124f3abc1ec
Replace implicit use of fast_memcpy via macro by explicit use to allow
reimar
parents:
19431
diff
changeset
|
208 fast_memcpy(lvo_mem,image[0],mga_vid_config.frame_size); |
17932 | 209 if( mp_msg_test(MSGT_VO,MSGL_DBG2) ) { |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17932
diff
changeset
|
210 mp_msg(MSGT_VO,MSGL_DBG2, "vesa_lvo: vlvo_flip_page() was called\n");} |
3017 | 211 return 0; |
2869 | 212 } |
213 | |
32204
0a81c931ecb5
Mark functs not used outside of the file as static, remove from header; fixes:
diego
parents:
32203
diff
changeset
|
214 static void vlvo_flip_page(void) |
2869 | 215 { |
17932 | 216 if( mp_msg_test(MSGT_VO,MSGL_DBG2) ) { |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17932
diff
changeset
|
217 mp_msg(MSGT_VO,MSGL_DBG2, "vesa_lvo: vlvo_draw_osd() was called\n");} |
3266
ff90589b635f
Fixed single buffering problems and -vo mga compatibility by number of buffers
nick
parents:
3205
diff
changeset
|
218 if(vo_doublebuffering) |
ff90589b635f
Fixed single buffering problems and -vo mga compatibility by number of buffers
nick
parents:
3205
diff
changeset
|
219 { |
2869 | 220 ioctl(lvo_handler,MGA_VID_FSEL,&next_frame); |
221 next_frame=(next_frame+1)%mga_vid_config.num_frames; | |
222 lvo_mem=frames[next_frame]; | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27509
diff
changeset
|
223 } |
2869 | 224 } |
225 | |
25519 | 226 #if 0 |
3205 | 227 static void draw_alpha_null(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride) |
228 { | |
229 } | |
230 | |
231 static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride) | |
232 { | |
233 uint32_t bespitch = /*(*/mga_vid_config.src_width;// + 15) & ~15; | |
234 switch(mga_vid_config.format){ | |
235 case IMGFMT_BGR15: | |
236 case IMGFMT_RGB15: | |
237 vo_draw_alpha_rgb15(w,h,src,srca,stride,lvo_mem+2*(y0*bespitch+x0),2*bespitch); | |
238 break; | |
239 case IMGFMT_BGR16: | |
240 case IMGFMT_RGB16: | |
241 vo_draw_alpha_rgb16(w,h,src,srca,stride,lvo_mem+2*(y0*bespitch+x0),2*bespitch); | |
242 break; | |
243 case IMGFMT_BGR24: | |
244 case IMGFMT_RGB24: | |
245 vo_draw_alpha_rgb24(w,h,src,srca,stride,lvo_mem+3*(y0*bespitch+x0),3*bespitch); | |
246 break; | |
247 case IMGFMT_BGR32: | |
248 case IMGFMT_RGB32: | |
249 vo_draw_alpha_rgb32(w,h,src,srca,stride,lvo_mem+4*(y0*bespitch+x0),4*bespitch); | |
250 break; | |
251 case IMGFMT_YV12: | |
252 case IMGFMT_IYUV: | |
253 case IMGFMT_I420: | |
254 vo_draw_alpha_yv12(w,h,src,srca,stride,lvo_mem+bespitch*y0+x0,bespitch); | |
255 break; | |
256 case IMGFMT_YUY2: | |
257 vo_draw_alpha_yuy2(w,h,src,srca,stride,lvo_mem+2*(bespitch*y0+x0),bespitch); | |
258 break; | |
259 case IMGFMT_UYVY: | |
260 vo_draw_alpha_yuy2(w,h,src,srca,stride,lvo_mem+2*(bespitch*y0+x0)+1,bespitch); | |
261 break; | |
262 default: | |
263 draw_alpha_null(x0,y0,w,h,src,srca,stride); | |
264 } | |
265 } | |
25519 | 266 #endif |
3205 | 267 |
32204
0a81c931ecb5
Mark functs not used outside of the file as static, remove from header; fixes:
diego
parents:
32203
diff
changeset
|
268 static void vlvo_draw_osd(void) |
2869 | 269 { |
17932 | 270 if( mp_msg_test(MSGT_VO,MSGL_DBG2) ) { |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17932
diff
changeset
|
271 mp_msg(MSGT_VO,MSGL_DBG2,"vesa_lvo: vlvo_draw_osd() was called\n"); } |
2869 | 272 /* TODO: hw support */ |
3205 | 273 #if 0 |
274 /* disable this stuff until new fbvid.h interface will be implemented | |
275 because in different fourcc radeon_vid and rage128_vid have different | |
276 width alignment */ | |
277 vo_draw_text(mga_vid_config.src_width,mga_vid_config.src_height,draw_alpha); | |
278 #endif | |
2869 | 279 } |
280 | |
32203
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
281 extern vo_functions_t video_out_vesa; |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
282 |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
283 int vlvo_preinit(const char *drvname) |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
284 { |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
285 mp_msg(MSGT_VO, MSGL_WARN, MSGTR_LIBVO_VESA_ThisBranchIsNoLongerSupported); |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
286 return -1; |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
287 if (mp_msg_test(MSGT_VO, MSGL_DBG2)) { |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
288 mp_msg(MSGT_VO, MSGL_DBG2, |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
289 "vesa_lvo: vlvo_preinit(%s) was called\n", drvname); |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
290 } |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
291 lvo_handler = open(drvname,O_RDWR); |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
292 if (lvo_handler == -1) { |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
293 mp_msg(MSGT_VO, MSGL_WARN, MSGTR_LIBVO_VESA_CouldntOpen, drvname); |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
294 return -1; |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
295 } |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
296 /* we are able to tune up this stuff depend on fourcc format */ |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
297 video_out_vesa.draw_slice = vlvo_draw_slice; |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
298 video_out_vesa.draw_frame = vlvo_draw_frame; |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
299 video_out_vesa.flip_page = vlvo_flip_page; |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
300 video_out_vesa.draw_osd = vlvo_draw_osd; |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
301 video_out_vesa.control = vlvo_control; |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
302 return 0; |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
303 } |
42536d4a06a8
cosmetics: Move vlvo_preinit() below the functions that it uses.
diego
parents:
32202
diff
changeset
|
304 |
32204
0a81c931ecb5
Mark functs not used outside of the file as static, remove from header; fixes:
diego
parents:
32203
diff
changeset
|
305 static uint32_t vlvo_query_info(uint32_t format) |
2869 | 306 { |
17932 | 307 if( mp_msg_test(MSGT_VO,MSGL_DBG2) ) { |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17932
diff
changeset
|
308 mp_msg(MSGT_VO,MSGL_DBG2, "vesa_lvo: query_format was called: %x (%s)\n",format,vo_format_name(format)); } |
15212
05aa13cdf92f
replace VO and VF numeric flags with #defined identifiers
henry
parents:
13787
diff
changeset
|
309 return VFCAP_CSP_SUPPORTED; |
2869 | 310 } |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4493
diff
changeset
|
311 |
33305
ddb45e9443ec
Remove the variable arguments from the libvo control() functions.
iive
parents:
32469
diff
changeset
|
312 uint32_t vlvo_control(uint32_t request, void *data) |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4493
diff
changeset
|
313 { |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4493
diff
changeset
|
314 switch (request) { |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4493
diff
changeset
|
315 case VOCTRL_QUERY_FORMAT: |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4493
diff
changeset
|
316 return vlvo_query_info(*((uint32_t*)data)); |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4493
diff
changeset
|
317 } |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4493
diff
changeset
|
318 return VO_NOTIMPL; |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4493
diff
changeset
|
319 } |