Mercurial > mplayer.hg
annotate libvo/vosub_vidix.c @ 24001:bc29871be2fd
HAVE_INTTYPES_H is in config.h, HAVE_STDINT_H is never reached.
author | diego |
---|---|
date | Tue, 07 Aug 2007 08:57:20 +0000 |
parents | a107276371a8 |
children | 3c6a0cdfdd5b |
rev | line source |
---|---|
4010 | 1 /* |
2 * vosub_vidix.c | |
3 * | |
4 * Copyright (C) Nick Kurshev <nickols_k@mail.ru> - 2002 | |
4280 | 5 * Copyright (C) Alex Beregszaszi |
4010 | 6 * |
7 * You can redistribute this file under terms and conditions | |
8 * of GNU General Public licence v2. | |
9 * | |
10 * This file contains vidix interface to any mplayer's VO plugin. | |
11 * (Partly based on vesa_lvo.c from mplayer's package) | |
12 */ | |
13 | |
14 #include <inttypes.h> | |
15 #include <unistd.h> | |
16 #include <fcntl.h> | |
10981 | 17 #ifndef __MINGW32__ |
18 #include <sys/ioctl.h> | |
4010 | 19 #include <sys/mman.h> |
10981 | 20 #endif |
4010 | 21 #include <stdio.h> |
22 #include <stdlib.h> | |
23 #include <string.h> | |
4372 | 24 #include <errno.h> |
4010 | 25 |
26 #include "config.h" | |
17932 | 27 #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:
17988
diff
changeset
|
28 #include "help_mp.h" |
4010 | 29 |
30 #include "vosub_vidix.h" | |
13787
e047e70a9767
Handle "xxx.h" vs "../xxx.h" include paths in a consistent way.
diego
parents:
11865
diff
changeset
|
31 #include "vidix/vidixlib.h" |
4010 | 32 #include "fastmemcpy.h" |
33 #include "osd.h" | |
34 #include "video_out.h" | |
6550
991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
alex
parents:
6531
diff
changeset
|
35 #include "sub.h" |
4991 | 36 |
13787
e047e70a9767
Handle "xxx.h" vs "../xxx.h" include paths in a consistent way.
diego
parents:
11865
diff
changeset
|
37 #include "libmpcodecs/vfcap.h" |
e047e70a9767
Handle "xxx.h" vs "../xxx.h" include paths in a consistent way.
diego
parents:
11865
diff
changeset
|
38 #include "libmpcodecs/mp_image.h" |
4010 | 39 |
4929 | 40 #define NUM_FRAMES VID_PLAY_MAXFRAMES /* Temporary: driver will overwrite it */ |
4010 | 41 |
42 static VDL_HANDLE vidix_handler = NULL; | |
43 static uint8_t *vidix_mem = NULL; | |
44 static uint8_t next_frame; | |
5052
6f28d6ccbd91
Using yv12_to_yuy2 sw convertor for cards which have no native yv12 support
nick
parents:
5028
diff
changeset
|
45 static unsigned image_Bpp,image_height,image_width,src_format,forced_fourcc=0; |
4372 | 46 static int video_on=0; |
4010 | 47 |
48 static vidix_capability_t vidix_cap; | |
49 static vidix_playback_t vidix_play; | |
50 static vidix_fourcc_t vidix_fourcc; | |
4454 | 51 static vo_functions_t * vo_server; |
4999 | 52 static vidix_yuv_t dstrides; |
8254
772d6d27fd66
warning patch by (Dominik Mierzejewski <dominik at rangers dot eu dot org>)
michael
parents:
7694
diff
changeset
|
53 /*static uint32_t (*server_control)(uint32_t request, void *data, ...);*/ |
4739 | 54 |
4379 | 55 static int vidix_get_video_eq(vidix_video_eq_t *info); |
56 static int vidix_set_video_eq(const vidix_video_eq_t *info); | |
57 static int vidix_get_num_fx(unsigned *info); | |
58 static int vidix_get_oem_fx(vidix_oem_fx_t *info); | |
59 static int vidix_set_oem_fx(const vidix_oem_fx_t *info); | |
60 static int vidix_set_deint(const vidix_deinterlace_t *info); | |
4372 | 61 |
4234
0ec1d81c8f94
sorry, i really wanted to add vidix_start and stop as int, to detect if something went into the wrong way (also implement check in vo_xvidix)
alex
parents:
4231
diff
changeset
|
62 int vidix_start(void) |
4198
7e2bf04c9a7c
added vidix_start() and vidix_stop() for better runtime-resize support ;)
alex
parents:
4138
diff
changeset
|
63 { |
7e2bf04c9a7c
added vidix_start() and vidix_stop() for better runtime-resize support ;)
alex
parents:
4138
diff
changeset
|
64 int err; |
4270
178c84b1090e
clearing safely the buffer, queryfourcc returns 0x2 (hw accel, noconv.), setting eq only if drivers i able
alex
parents:
4255
diff
changeset
|
65 if((err=vdlPlaybackOn(vidix_handler))!=0) |
178c84b1090e
clearing safely the buffer, queryfourcc returns 0x2 (hw accel, noconv.), setting eq only if drivers i able
alex
parents:
4255
diff
changeset
|
66 { |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17988
diff
changeset
|
67 mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_CantStartPlayback,strerror(err)); |
4270
178c84b1090e
clearing safely the buffer, queryfourcc returns 0x2 (hw accel, noconv.), setting eq only if drivers i able
alex
parents:
4255
diff
changeset
|
68 return -1; |
178c84b1090e
clearing safely the buffer, queryfourcc returns 0x2 (hw accel, noconv.), setting eq only if drivers i able
alex
parents:
4255
diff
changeset
|
69 } |
4379 | 70 video_on=1; |
4234
0ec1d81c8f94
sorry, i really wanted to add vidix_start and stop as int, to detect if something went into the wrong way (also implement check in vo_xvidix)
alex
parents:
4231
diff
changeset
|
71 return 0; |
4198
7e2bf04c9a7c
added vidix_start() and vidix_stop() for better runtime-resize support ;)
alex
parents:
4138
diff
changeset
|
72 } |
7e2bf04c9a7c
added vidix_start() and vidix_stop() for better runtime-resize support ;)
alex
parents:
4138
diff
changeset
|
73 |
4234
0ec1d81c8f94
sorry, i really wanted to add vidix_start and stop as int, to detect if something went into the wrong way (also implement check in vo_xvidix)
alex
parents:
4231
diff
changeset
|
74 int vidix_stop(void) |
4198
7e2bf04c9a7c
added vidix_start() and vidix_stop() for better runtime-resize support ;)
alex
parents:
4138
diff
changeset
|
75 { |
7e2bf04c9a7c
added vidix_start() and vidix_stop() for better runtime-resize support ;)
alex
parents:
4138
diff
changeset
|
76 int err; |
7e2bf04c9a7c
added vidix_start() and vidix_stop() for better runtime-resize support ;)
alex
parents:
4138
diff
changeset
|
77 if((err=vdlPlaybackOff(vidix_handler))!=0) |
7e2bf04c9a7c
added vidix_start() and vidix_stop() for better runtime-resize support ;)
alex
parents:
4138
diff
changeset
|
78 { |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17988
diff
changeset
|
79 mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_CantStopPlayback,strerror(err)); |
4234
0ec1d81c8f94
sorry, i really wanted to add vidix_start and stop as int, to detect if something went into the wrong way (also implement check in vo_xvidix)
alex
parents:
4231
diff
changeset
|
80 return -1; |
4198
7e2bf04c9a7c
added vidix_start() and vidix_stop() for better runtime-resize support ;)
alex
parents:
4138
diff
changeset
|
81 } |
4372 | 82 video_on=0; |
4234
0ec1d81c8f94
sorry, i really wanted to add vidix_start and stop as int, to detect if something went into the wrong way (also implement check in vo_xvidix)
alex
parents:
4231
diff
changeset
|
83 return 0; |
4198
7e2bf04c9a7c
added vidix_start() and vidix_stop() for better runtime-resize support ;)
alex
parents:
4138
diff
changeset
|
84 } |
7e2bf04c9a7c
added vidix_start() and vidix_stop() for better runtime-resize support ;)
alex
parents:
4138
diff
changeset
|
85 |
4010 | 86 void vidix_term( void ) |
87 { | |
17932 | 88 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:
17988
diff
changeset
|
89 mp_msg(MSGT_VO,MSGL_DBG2, "vosub_vidix: vidix_term() was called\n"); } |
4198
7e2bf04c9a7c
added vidix_start() and vidix_stop() for better runtime-resize support ;)
alex
parents:
4138
diff
changeset
|
90 vidix_stop(); |
4010 | 91 vdlClose(vidix_handler); |
6550
991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
alex
parents:
6531
diff
changeset
|
92 // ((vo_functions_t *)vo_server)->control=server_control; |
4010 | 93 } |
94 | |
4430 | 95 static uint32_t vidix_draw_slice_420(uint8_t *image[], int stride[], int w,int h,int x,int y) |
4010 | 96 { |
97 uint8_t *src; | |
98 uint8_t *dest; | |
99 int i; | |
4324
09f15844c960
don't render UV planes if interleaved (also add support later)
alex
parents:
4317
diff
changeset
|
100 |
09f15844c960
don't render UV planes if interleaved (also add support later)
alex
parents:
4317
diff
changeset
|
101 /* Plane Y */ |
4032 | 102 dest = vidix_mem + vidix_play.offsets[next_frame] + vidix_play.offset.y; |
4999 | 103 dest += dstrides.y*y + x; |
4010 | 104 src = image[0]; |
105 for(i=0;i<h;i++){ | |
106 memcpy(dest,src,w); | |
107 src+=stride[0]; | |
4999 | 108 dest += dstrides.y; |
4010 | 109 } |
110 | |
4324
09f15844c960
don't render UV planes if interleaved (also add support later)
alex
parents:
4317
diff
changeset
|
111 if (vidix_play.flags & VID_PLAY_INTERLEAVED_UV) |
09f15844c960
don't render UV planes if interleaved (also add support later)
alex
parents:
4317
diff
changeset
|
112 { |
4744
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
113 int hi,wi; |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
114 uint8_t *src2; |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
115 dest = vidix_mem + vidix_play.offsets[next_frame] + vidix_play.offset.v; |
4999 | 116 dest += dstrides.y*y/2 + x; // <- is this correct ? |
4744
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
117 h/=2; |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
118 w/=2; |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
119 src = image[1]; |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
120 src2 = image[2]; |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
121 for(hi = 0; hi < h; hi++) |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
122 { |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
123 for(wi = 0; wi < w; wi++) |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
124 { |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
125 dest[2*wi+0] = src[wi]; |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
126 dest[2*wi+1] = src2[wi]; |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
127 } |
4999 | 128 dest += dstrides.y; |
4744
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
129 src += stride[1]; |
4999 | 130 src2+= stride[2]; |
131 } | |
132 } | |
133 else | |
134 { | |
4744
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
135 /* Plane V */ |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
136 dest = vidix_mem + vidix_play.offsets[next_frame] + vidix_play.offset.v; |
4999 | 137 dest += dstrides.v*y/4 + x; |
4744
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
138 src = image[1]; |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
139 for(i=0;i<h/2;i++){ |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
140 memcpy(dest,src,w/2); |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
141 src+=stride[1]; |
4999 | 142 dest+=dstrides.v/2; |
4744
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
143 } |
4324
09f15844c960
don't render UV planes if interleaved (also add support later)
alex
parents:
4317
diff
changeset
|
144 |
4744
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
145 /* Plane U */ |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
146 dest = vidix_mem + vidix_play.offsets[next_frame] + vidix_play.offset.u; |
4999 | 147 dest += dstrides.u*y/4 + x; |
4744
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
148 src = image[2]; |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
149 for(i=0;i<h/2;i++){ |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
150 memcpy(dest,src,w/2); |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
151 src+=stride[2]; |
4999 | 152 dest += dstrides.u/2; |
4744
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
153 } |
da595f0e882e
vidix interleaved U V planes (for g200) by Attila Kinali <kinali@gmx.net>
nick
parents:
4741
diff
changeset
|
154 return 0; |
4999 | 155 } |
6550
991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
alex
parents:
6531
diff
changeset
|
156 return -1; |
4010 | 157 } |
158 | |
6482
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
159 static uint32_t vidix_draw_slice_410(uint8_t *image[], int stride[], int w,int h,int x,int y) |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
160 { |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
161 uint8_t *src; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
162 uint8_t *dest; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
163 int i; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
164 |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
165 /* Plane Y */ |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
166 dest = vidix_mem + vidix_play.offsets[next_frame] + vidix_play.offset.y; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
167 dest += dstrides.y*y + x; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
168 src = image[0]; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
169 for(i=0;i<h;i++){ |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
170 memcpy(dest,src,w); |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
171 src+=stride[0]; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
172 dest += dstrides.y; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
173 } |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
174 |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
175 if (vidix_play.flags & VID_PLAY_INTERLEAVED_UV) |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
176 { |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17988
diff
changeset
|
177 mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_SUB_VIDIX_InterleavedUvForYuv410pNotSupported); |
6482
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
178 } |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
179 else |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
180 { |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
181 /* Plane V */ |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
182 dest = vidix_mem + vidix_play.offsets[next_frame] + vidix_play.offset.v; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
183 dest += dstrides.v*y/8 + x; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
184 src = image[1]; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
185 for(i=0;i<h/4;i++){ |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
186 memcpy(dest,src,w/4); |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
187 src+=stride[1]; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
188 dest+=dstrides.v/4; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
189 } |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
190 |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
191 /* Plane U */ |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
192 dest = vidix_mem + vidix_play.offsets[next_frame] + vidix_play.offset.u; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
193 dest += dstrides.u*y/8 + x; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
194 src = image[2]; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
195 for(i=0;i<h/4;i++){ |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
196 memcpy(dest,src,w/4); |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
197 src+=stride[2]; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
198 dest += dstrides.u/4; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
199 } |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
200 return 0; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
201 } |
6550
991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
alex
parents:
6531
diff
changeset
|
202 return -1; |
6482
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
203 } |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
204 |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
205 static uint32_t vidix_draw_slice_410_fast(uint8_t *image[], int stride[], int w, int h, int x, int y) |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
206 { |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
207 uint8_t *src; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
208 uint8_t *dest; |
6550
991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
alex
parents:
6531
diff
changeset
|
209 |
6482
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
210 dest = vidix_mem + vidix_play.offsets[next_frame] + vidix_play.offset.y; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
211 dest += dstrides.y*y + x; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
212 src = image[0]; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
213 memcpy(dest, src, dstrides.y*h*9/8); |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
214 return 0; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
215 } |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
216 |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
217 static uint32_t vidix_draw_slice_400(uint8_t *image[], int stride[], int w,int h,int x,int y) |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
218 { |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
219 uint8_t *src; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
220 uint8_t *dest; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
221 int i; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
222 |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
223 dest = vidix_mem + vidix_play.offsets[next_frame] + vidix_play.offset.y; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
224 dest += dstrides.y*y + x; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
225 src = image[0]; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
226 for(i=0;i<h;i++){ |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
227 memcpy(dest,src,w); |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
228 src+=stride[0]; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
229 dest += dstrides.y; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
230 } |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
231 return 0; |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
232 } |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
233 |
4999 | 234 static uint32_t vidix_draw_slice_packed(uint8_t *image[], int stride[], int w,int h,int x,int y) |
4010 | 235 { |
236 uint8_t *src; | |
237 uint8_t *dest; | |
238 int i; | |
6550
991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
alex
parents:
6531
diff
changeset
|
239 |
4032 | 240 dest = vidix_mem + vidix_play.offsets[next_frame] + vidix_play.offset.y; |
4999 | 241 dest += dstrides.y*y + x; |
4010 | 242 src = image[0]; |
243 for(i=0;i<h;i++){ | |
4999 | 244 memcpy(dest,src,w*image_Bpp); |
4010 | 245 src+=stride[0]; |
4999 | 246 dest += dstrides.y; |
4010 | 247 } |
4240 | 248 return 0; |
4010 | 249 } |
250 | |
251 uint32_t vidix_draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y) | |
252 { | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17988
diff
changeset
|
253 mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_SUB_VIDIX_DummyVidixdrawsliceWasCalled); |
10605 | 254 return -1; |
4010 | 255 } |
256 | |
7685 | 257 static uint32_t vidix_draw_image(mp_image_t *mpi){ |
17932 | 258 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:
17988
diff
changeset
|
259 mp_msg(MSGT_VO,MSGL_DBG2, "vosub_vidix: vidix_draw_image() was called\n"); } |
7685 | 260 |
261 // if -dr or -slices then do nothing: | |
262 if(mpi->flags&(MP_IMGFLAG_DIRECT|MP_IMGFLAG_DRAW_CALLBACK)) return VO_TRUE; | |
263 | |
264 vo_server->draw_slice(mpi->planes,mpi->stride, | |
265 vidix_play.src.w,vidix_play.src.h,vidix_play.src.x,vidix_play.src.y); | |
266 return VO_TRUE; | |
267 } | |
268 | |
4010 | 269 uint32_t vidix_draw_frame(uint8_t *image[]) |
270 { | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17988
diff
changeset
|
271 mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_SUB_VIDIX_DummyVidixdrawframeWasCalled); |
7685 | 272 return -1; |
4010 | 273 } |
274 | |
275 void vidix_flip_page(void) | |
276 { | |
17932 | 277 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:
17988
diff
changeset
|
278 mp_msg(MSGT_VO,MSGL_DBG2, "vosub_vidix: vidix_flip_page() was called\n"); } |
4010 | 279 if(vo_doublebuffering) |
280 { | |
4032 | 281 vdlPlaybackFrameSelect(vidix_handler,next_frame); |
4010 | 282 next_frame=(next_frame+1)%vidix_play.num_frames; |
283 } | |
284 } | |
285 | |
286 static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride) | |
287 { | |
4032 | 288 uint32_t apitch,bespitch; |
4010 | 289 void *lvo_mem; |
4032 | 290 lvo_mem = vidix_mem + vidix_play.offsets[next_frame] + vidix_play.offset.y; |
291 apitch = vidix_play.dest.pitch.y-1; | |
4010 | 292 switch(vidix_play.fourcc){ |
293 case IMGFMT_YV12: | |
294 case IMGFMT_IYUV: | |
295 case IMGFMT_I420: | |
6550
991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
alex
parents:
6531
diff
changeset
|
296 case IMGFMT_YVU9: |
991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
alex
parents:
6531
diff
changeset
|
297 case IMGFMT_IF09: |
991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
alex
parents:
6531
diff
changeset
|
298 case IMGFMT_Y8: |
991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
alex
parents:
6531
diff
changeset
|
299 case IMGFMT_Y800: |
4745
398e3663ed71
Allow using direct rendering with any HW pitches (even on matrox g400).
nick
parents:
4744
diff
changeset
|
300 bespitch = (vidix_play.src.w + apitch) & (~apitch); |
4010 | 301 vo_draw_alpha_yv12(w,h,src,srca,stride,lvo_mem+bespitch*y0+x0,bespitch); |
302 break; | |
303 case IMGFMT_YUY2: | |
4745
398e3663ed71
Allow using direct rendering with any HW pitches (even on matrox g400).
nick
parents:
4744
diff
changeset
|
304 bespitch = (vidix_play.src.w*2 + apitch) & (~apitch); |
398e3663ed71
Allow using direct rendering with any HW pitches (even on matrox g400).
nick
parents:
4744
diff
changeset
|
305 vo_draw_alpha_yuy2(w,h,src,srca,stride,lvo_mem+bespitch*y0+2*x0,bespitch); |
4010 | 306 break; |
307 case IMGFMT_UYVY: | |
4745
398e3663ed71
Allow using direct rendering with any HW pitches (even on matrox g400).
nick
parents:
4744
diff
changeset
|
308 bespitch = (vidix_play.src.w*2 + apitch) & (~apitch); |
398e3663ed71
Allow using direct rendering with any HW pitches (even on matrox g400).
nick
parents:
4744
diff
changeset
|
309 vo_draw_alpha_yuy2(w,h,src,srca,stride,lvo_mem+bespitch*y0+2*x0+1,bespitch); |
4010 | 310 break; |
4430 | 311 case IMGFMT_RGB32: |
312 case IMGFMT_BGR32: | |
4745
398e3663ed71
Allow using direct rendering with any HW pitches (even on matrox g400).
nick
parents:
4744
diff
changeset
|
313 bespitch = (vidix_play.src.w*4 + apitch) & (~apitch); |
398e3663ed71
Allow using direct rendering with any HW pitches (even on matrox g400).
nick
parents:
4744
diff
changeset
|
314 vo_draw_alpha_rgb32(w,h,src,srca,stride,lvo_mem+y0*bespitch+4*x0,bespitch); |
4430 | 315 break; |
316 case IMGFMT_RGB24: | |
317 case IMGFMT_BGR24: | |
4745
398e3663ed71
Allow using direct rendering with any HW pitches (even on matrox g400).
nick
parents:
4744
diff
changeset
|
318 bespitch = (vidix_play.src.w*3 + apitch) & (~apitch); |
398e3663ed71
Allow using direct rendering with any HW pitches (even on matrox g400).
nick
parents:
4744
diff
changeset
|
319 vo_draw_alpha_rgb24(w,h,src,srca,stride,lvo_mem+y0*bespitch+3*x0,bespitch); |
4430 | 320 break; |
321 case IMGFMT_RGB16: | |
322 case IMGFMT_BGR16: | |
4745
398e3663ed71
Allow using direct rendering with any HW pitches (even on matrox g400).
nick
parents:
4744
diff
changeset
|
323 bespitch = (vidix_play.src.w*2 + apitch) & (~apitch); |
398e3663ed71
Allow using direct rendering with any HW pitches (even on matrox g400).
nick
parents:
4744
diff
changeset
|
324 vo_draw_alpha_rgb16(w,h,src,srca,stride,lvo_mem+y0*bespitch+2*x0,bespitch); |
4430 | 325 break; |
326 case IMGFMT_RGB15: | |
327 case IMGFMT_BGR15: | |
4745
398e3663ed71
Allow using direct rendering with any HW pitches (even on matrox g400).
nick
parents:
4744
diff
changeset
|
328 bespitch = (vidix_play.src.w*2 + apitch) & (~apitch); |
398e3663ed71
Allow using direct rendering with any HW pitches (even on matrox g400).
nick
parents:
4744
diff
changeset
|
329 vo_draw_alpha_rgb15(w,h,src,srca,stride,lvo_mem+y0*bespitch+2*x0,bespitch); |
4430 | 330 break; |
4010 | 331 default: |
6786 | 332 return; |
4010 | 333 } |
334 } | |
335 | |
336 void vidix_draw_osd(void) | |
337 { | |
17932 | 338 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:
17988
diff
changeset
|
339 mp_msg(MSGT_VO,MSGL_DBG2, "vosub_vidix: vidix_draw_osd() was called\n"); } |
4010 | 340 /* TODO: hw support */ |
341 vo_draw_text(vidix_play.src.w,vidix_play.src.h,draw_alpha); | |
342 } | |
343 | |
344 uint32_t vidix_query_fourcc(uint32_t format) | |
345 { | |
17932 | 346 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:
17988
diff
changeset
|
347 mp_msg(MSGT_VO,MSGL_DBG2, "vosub_vidix: query_format was called: %x (%s)\n",format,vo_format_name(format)); } |
4010 | 348 vidix_fourcc.fourcc = format; |
349 vdlQueryFourcc(vidix_handler,&vidix_fourcc); | |
5052
6f28d6ccbd91
Using yv12_to_yuy2 sw convertor for cards which have no native yv12 support
nick
parents:
5028
diff
changeset
|
350 if (vidix_fourcc.depth == VID_DEPTH_NONE) |
5566 | 351 return 0; |
7694
b64f14fdadfb
also set VFCAP_ACCEPT_STRIDE when draw_image() is implemented
arpi
parents:
7685
diff
changeset
|
352 return VFCAP_CSP_SUPPORTED|VFCAP_CSP_SUPPORTED_BY_HW|VFCAP_HWSCALE_UP|VFCAP_HWSCALE_DOWN|VFCAP_OSD|VFCAP_ACCEPT_STRIDE; |
4010 | 353 } |
4240 | 354 |
4255 | 355 int vidix_grkey_support(void) |
356 { | |
4270
178c84b1090e
clearing safely the buffer, queryfourcc returns 0x2 (hw accel, noconv.), setting eq only if drivers i able
alex
parents:
4255
diff
changeset
|
357 return(vidix_fourcc.flags & VID_CAP_COLORKEY); |
4255 | 358 } |
359 | |
4240 | 360 int vidix_grkey_get(vidix_grkey_t *gr_key) |
361 { | |
362 return(vdlGetGrKeys(vidix_handler, gr_key)); | |
363 } | |
364 | |
365 int vidix_grkey_set(const vidix_grkey_t *gr_key) | |
366 { | |
367 return(vdlSetGrKeys(vidix_handler, gr_key)); | |
368 } | |
4372 | 369 |
4379 | 370 |
371 static int vidix_get_video_eq(vidix_video_eq_t *info) | |
372 { | |
373 if(!video_on) return EPERM; | |
374 return vdlPlaybackGetEq(vidix_handler, info); | |
375 } | |
376 | |
377 static int vidix_set_video_eq(const vidix_video_eq_t *info) | |
378 { | |
379 if(!video_on) return EPERM; | |
380 return vdlPlaybackSetEq(vidix_handler, info); | |
381 } | |
382 | |
383 static int vidix_get_num_fx(unsigned *info) | |
384 { | |
385 if(!video_on) return EPERM; | |
386 return vdlQueryNumOemEffects(vidix_handler, info); | |
387 } | |
388 | |
389 static int vidix_get_oem_fx(vidix_oem_fx_t *info) | |
390 { | |
391 if(!video_on) return EPERM; | |
392 return vdlGetOemEffect(vidix_handler, info); | |
393 } | |
394 | |
395 static int vidix_set_oem_fx(const vidix_oem_fx_t *info) | |
396 { | |
397 if(!video_on) return EPERM; | |
398 return vdlSetOemEffect(vidix_handler, info); | |
399 } | |
400 | |
401 static int vidix_set_deint(const vidix_deinterlace_t *info) | |
402 { | |
403 if(!video_on) return EPERM; | |
404 return vdlPlaybackSetDeint(vidix_handler, info); | |
405 } | |
4454 | 406 |
5028 | 407 static int is_422_planes_eq=0; |
4454 | 408 int vidix_init(unsigned src_width,unsigned src_height, |
409 unsigned x_org,unsigned y_org,unsigned dst_width, | |
410 unsigned dst_height,unsigned format,unsigned dest_bpp, | |
7124
eca7dbad0166
finally removed query_vaa, bes_da and vo_tune_info - the obsoleted libvo api
alex
parents:
7026
diff
changeset
|
411 unsigned vid_w,unsigned vid_h) |
4454 | 412 { |
17128
34f870d8e8a8
really clear frames to black instead of grey, and make sure one of those
reimar
parents:
13787
diff
changeset
|
413 void *tmp, *tmpa; |
6550
991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
alex
parents:
6531
diff
changeset
|
414 size_t i; |
5028 | 415 int err; |
4999 | 416 uint32_t sstride,apitch; |
17932 | 417 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:
17988
diff
changeset
|
418 mp_msg(MSGT_VO,MSGL_DBG2, "vosub_vidix: vidix_init() was called\n" |
4454 | 419 "src_w=%u src_h=%u dest_x_y_w_h = %u %u %u %u\n" |
420 "format=%s dest_bpp=%u vid_w=%u vid_h=%u\n" | |
421 ,src_width,src_height,x_org,y_org,dst_width,dst_height | |
422 ,vo_format_name(format),dest_bpp,vid_w,vid_h); | |
423 | |
7026
a3126e9099b4
should solve -vo vesa:vidix problem 'vosub_vidix: video server has
arpi
parents:
6806
diff
changeset
|
424 if(vidix_query_fourcc(format) == 0) |
a3126e9099b4
should solve -vo vesa:vidix problem 'vosub_vidix: video server has
arpi
parents:
6806
diff
changeset
|
425 { |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17988
diff
changeset
|
426 mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_UnsupportedFourccForThisVidixDriver, |
7026
a3126e9099b4
should solve -vo vesa:vidix problem 'vosub_vidix: video server has
arpi
parents:
6806
diff
changeset
|
427 format,vo_format_name(format)); |
a3126e9099b4
should solve -vo vesa:vidix problem 'vosub_vidix: video server has
arpi
parents:
6806
diff
changeset
|
428 return -1; |
a3126e9099b4
should solve -vo vesa:vidix problem 'vosub_vidix: video server has
arpi
parents:
6806
diff
changeset
|
429 } |
a3126e9099b4
should solve -vo vesa:vidix problem 'vosub_vidix: video server has
arpi
parents:
6806
diff
changeset
|
430 |
4454 | 431 if(((vidix_cap.maxwidth != -1) && (vid_w > vidix_cap.maxwidth)) || |
432 ((vidix_cap.minwidth != -1) && (vid_w < vidix_cap.minwidth)) || | |
433 ((vidix_cap.maxheight != -1) && (vid_h > vidix_cap.maxheight)) || | |
434 ((vidix_cap.minwidth != -1 ) && (vid_h < vidix_cap.minheight))) | |
435 { | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17988
diff
changeset
|
436 mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_VideoServerHasUnsupportedResolution, |
4454 | 437 vid_w, vid_h, vidix_cap.minwidth, vidix_cap.minheight, |
438 vidix_cap.maxwidth, vidix_cap.maxheight); | |
439 return -1; | |
440 } | |
441 | |
442 err = 0; | |
443 switch(dest_bpp) | |
444 { | |
445 case 1: err = ((vidix_fourcc.depth & VID_DEPTH_1BPP) != VID_DEPTH_1BPP); break; | |
446 case 2: err = ((vidix_fourcc.depth & VID_DEPTH_2BPP) != VID_DEPTH_2BPP); break; | |
447 case 4: err = ((vidix_fourcc.depth & VID_DEPTH_4BPP) != VID_DEPTH_4BPP); break; | |
448 case 8: err = ((vidix_fourcc.depth & VID_DEPTH_8BPP) != VID_DEPTH_8BPP); break; | |
449 case 12:err = ((vidix_fourcc.depth & VID_DEPTH_12BPP) != VID_DEPTH_12BPP); break; | |
4540 | 450 case 15:err = ((vidix_fourcc.depth & VID_DEPTH_15BPP) != VID_DEPTH_15BPP); break; |
4454 | 451 case 16:err = ((vidix_fourcc.depth & VID_DEPTH_16BPP) != VID_DEPTH_16BPP); break; |
452 case 24:err = ((vidix_fourcc.depth & VID_DEPTH_24BPP) != VID_DEPTH_24BPP); break; | |
453 case 32:err = ((vidix_fourcc.depth & VID_DEPTH_32BPP) != VID_DEPTH_32BPP); break; | |
454 default: err=1; break; | |
455 } | |
456 if(err) | |
457 { | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17988
diff
changeset
|
458 mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_VideoServerHasUnsupportedColorDepth |
4454 | 459 ,vidix_fourcc.depth); |
460 return -1; | |
461 } | |
462 if((dst_width > src_width || dst_height > src_height) && (vidix_cap.flags & FLAG_UPSCALER) != FLAG_UPSCALER) | |
463 { | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17988
diff
changeset
|
464 mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_DriverCantUpscaleImage, |
4454 | 465 src_width, src_height, dst_width, dst_height); |
466 return -1; | |
467 } | |
468 if((dst_width > src_width || dst_height > src_height) && (vidix_cap.flags & FLAG_DOWNSCALER) != FLAG_DOWNSCALER) | |
469 { | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17988
diff
changeset
|
470 mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_DriverCantDownscaleImage, |
4454 | 471 src_width, src_height, dst_width, dst_height); |
472 return -1; | |
473 } | |
474 image_width = src_width; | |
475 image_height = src_height; | |
476 src_format = format; | |
5052
6f28d6ccbd91
Using yv12_to_yuy2 sw convertor for cards which have no native yv12 support
nick
parents:
5028
diff
changeset
|
477 if(forced_fourcc) format = forced_fourcc; |
4454 | 478 memset(&vidix_play,0,sizeof(vidix_playback_t)); |
479 vidix_play.fourcc = format; | |
480 vidix_play.capability = vidix_cap.flags; /* every ;) */ | |
481 vidix_play.blend_factor = 0; /* for now */ | |
482 /* display the full picture. | |
483 Nick: we could implement here zooming to a specified area -- alex */ | |
484 vidix_play.src.x = vidix_play.src.y = 0; | |
485 vidix_play.src.w = src_width; | |
486 vidix_play.src.h = src_height; | |
487 vidix_play.dest.x = x_org; | |
488 vidix_play.dest.y = y_org; | |
489 vidix_play.dest.w = dst_width; | |
490 vidix_play.dest.h = dst_height; | |
8459
2ce7bbdcee15
this isn't mplayerxp...3 buffers are enough for double(triple)buffering (instead of 28 buffers ;)
alex
parents:
8254
diff
changeset
|
491 // vidix_play.num_frames=vo_doublebuffering?NUM_FRAMES-1:1; |
2ce7bbdcee15
this isn't mplayerxp...3 buffers are enough for double(triple)buffering (instead of 28 buffers ;)
alex
parents:
8254
diff
changeset
|
492 /* we aren't mad...3 buffers are more than enough */ |
2ce7bbdcee15
this isn't mplayerxp...3 buffers are enough for double(triple)buffering (instead of 28 buffers ;)
alex
parents:
8254
diff
changeset
|
493 vidix_play.num_frames=vo_doublebuffering?3:1; |
4454 | 494 vidix_play.src.pitch.y = vidix_play.src.pitch.u = vidix_play.src.pitch.v = 0; |
7124
eca7dbad0166
finally removed query_vaa, bes_da and vo_tune_info - the obsoleted libvo api
alex
parents:
7026
diff
changeset
|
495 |
4454 | 496 if((err=vdlConfigPlayback(vidix_handler,&vidix_play))!=0) |
497 { | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17988
diff
changeset
|
498 mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_CantConfigurePlayback,strerror(err)); |
4454 | 499 return -1; |
500 } | |
17932 | 501 if ( mp_msg_test(MSGT_VO,MSGL_V) ) { |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17988
diff
changeset
|
502 mp_msg(MSGT_VO,MSGL_V, "vosub_vidix: using %d buffer(s)\n", vidix_play.num_frames); } |
4454 | 503 |
504 vidix_mem = vidix_play.dga_addr; | |
505 | |
17128
34f870d8e8a8
really clear frames to black instead of grey, and make sure one of those
reimar
parents:
13787
diff
changeset
|
506 tmp = calloc(image_width, image_height); |
34f870d8e8a8
really clear frames to black instead of grey, and make sure one of those
reimar
parents:
13787
diff
changeset
|
507 tmpa = malloc(image_width * image_height); |
34f870d8e8a8
really clear frames to black instead of grey, and make sure one of those
reimar
parents:
13787
diff
changeset
|
508 memset(tmpa, 1, image_width * image_height); |
4454 | 509 /* clear every frame with correct address and frame_size */ |
17128
34f870d8e8a8
really clear frames to black instead of grey, and make sure one of those
reimar
parents:
13787
diff
changeset
|
510 /* HACK: use draw_alpha to clear Y component */ |
34f870d8e8a8
really clear frames to black instead of grey, and make sure one of those
reimar
parents:
13787
diff
changeset
|
511 for (i = 0; i < vidix_play.num_frames; i++) { |
34f870d8e8a8
really clear frames to black instead of grey, and make sure one of those
reimar
parents:
13787
diff
changeset
|
512 next_frame = i; |
4454 | 513 memset(vidix_mem + vidix_play.offsets[i], 0x80, |
514 vidix_play.frame_size); | |
17128
34f870d8e8a8
really clear frames to black instead of grey, and make sure one of those
reimar
parents:
13787
diff
changeset
|
515 draw_alpha(0, 0, image_width, image_height, tmp, tmpa, image_width); |
34f870d8e8a8
really clear frames to black instead of grey, and make sure one of those
reimar
parents:
13787
diff
changeset
|
516 } |
34f870d8e8a8
really clear frames to black instead of grey, and make sure one of those
reimar
parents:
13787
diff
changeset
|
517 free(tmp); |
34f870d8e8a8
really clear frames to black instead of grey, and make sure one of those
reimar
parents:
13787
diff
changeset
|
518 free(tmpa); |
34f870d8e8a8
really clear frames to black instead of grey, and make sure one of those
reimar
parents:
13787
diff
changeset
|
519 /* show one of the "clear" frames */ |
34f870d8e8a8
really clear frames to black instead of grey, and make sure one of those
reimar
parents:
13787
diff
changeset
|
520 vidix_flip_page(); |
34f870d8e8a8
really clear frames to black instead of grey, and make sure one of those
reimar
parents:
13787
diff
changeset
|
521 |
4999 | 522 switch(format) |
523 { | |
6550
991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
alex
parents:
6531
diff
changeset
|
524 case IMGFMT_YV12: |
991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
alex
parents:
6531
diff
changeset
|
525 case IMGFMT_I420: |
991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
alex
parents:
6531
diff
changeset
|
526 case IMGFMT_IYUV: |
6482
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
527 case IMGFMT_YVU9: |
4999 | 528 case IMGFMT_IF09: |
6550
991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
alex
parents:
6531
diff
changeset
|
529 case IMGFMT_Y800: |
991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
alex
parents:
6531
diff
changeset
|
530 case IMGFMT_Y8: |
4999 | 531 apitch = vidix_play.dest.pitch.y-1; |
532 dstrides.y = (image_width + apitch) & ~apitch; | |
533 apitch = vidix_play.dest.pitch.v-1; | |
534 dstrides.v = (image_width + apitch) & ~apitch; | |
535 apitch = vidix_play.dest.pitch.u-1; | |
536 dstrides.u = (image_width + apitch) & ~apitch; | |
537 image_Bpp=1; | |
538 break; | |
539 case IMGFMT_RGB32: | |
540 case IMGFMT_BGR32: | |
541 apitch = vidix_play.dest.pitch.y-1; | |
542 dstrides.y = (image_width*4 + apitch) & ~apitch; | |
543 dstrides.u = dstrides.v = 0; | |
544 image_Bpp=4; | |
545 break; | |
546 case IMGFMT_RGB24: | |
547 case IMGFMT_BGR24: | |
548 apitch = vidix_play.dest.pitch.y-1; | |
549 dstrides.y = (image_width*3 + apitch) & ~apitch; | |
550 dstrides.u = dstrides.v = 0; | |
551 image_Bpp=3; | |
552 break; | |
553 default: | |
554 apitch = vidix_play.dest.pitch.y-1; | |
555 dstrides.y = (image_width*2 + apitch) & ~apitch; | |
556 dstrides.u = dstrides.v = 0; | |
557 image_Bpp=2; | |
558 break; | |
559 } | |
4454 | 560 /* tune some info here */ |
6482
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
561 sstride = src_width*image_Bpp; |
5052
6f28d6ccbd91
Using yv12_to_yuy2 sw convertor for cards which have no native yv12 support
nick
parents:
5028
diff
changeset
|
562 if(!forced_fourcc) |
6f28d6ccbd91
Using yv12_to_yuy2 sw convertor for cards which have no native yv12 support
nick
parents:
5028
diff
changeset
|
563 { |
6f28d6ccbd91
Using yv12_to_yuy2 sw convertor for cards which have no native yv12 support
nick
parents:
5028
diff
changeset
|
564 is_422_planes_eq = sstride == dstrides.y; |
6482
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
565 |
5052
6f28d6ccbd91
Using yv12_to_yuy2 sw convertor for cards which have no native yv12 support
nick
parents:
5028
diff
changeset
|
566 if(src_format == IMGFMT_YV12 || src_format == IMGFMT_I420 || src_format == IMGFMT_IYUV) |
6f28d6ccbd91
Using yv12_to_yuy2 sw convertor for cards which have no native yv12 support
nick
parents:
5028
diff
changeset
|
567 vo_server->draw_slice = vidix_draw_slice_420; |
6482
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
568 else if (src_format == IMGFMT_YVU9 || src_format == IMGFMT_IF09) |
528216496060
YVU9,IF09,Y800 and Y8 support - and syªªnced with mpxp
alex
parents:
6018
diff
changeset
|
569 vo_server->draw_slice = vidix_draw_slice_410; |
7685 | 570 else vo_server->draw_slice = vidix_draw_slice_packed; |
5052
6f28d6ccbd91
Using yv12_to_yuy2 sw convertor for cards which have no native yv12 support
nick
parents:
5028
diff
changeset
|
571 } |
4454 | 572 return 0; |
573 } | |
574 | |
4991 | 575 static uint32_t vidix_get_image(mp_image_t *mpi) |
576 { | |
577 if(mpi->type==MP_IMGTYPE_STATIC && vidix_play.num_frames>1) return VO_FALSE; | |
578 if(mpi->flags&MP_IMGFLAG_READABLE) return VO_FALSE; /* slow video ram */ | |
7685 | 579 if(( (mpi->stride[0]==dstrides.y && (!(mpi->flags&MP_IMGFLAG_PLANAR) || |
580 (mpi->stride[1]==dstrides.u && mpi->stride[2]==dstrides.v)) ) | |
581 || (mpi->flags&(MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_ACCEPT_WIDTH))) && | |
6550
991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
alex
parents:
6531
diff
changeset
|
582 (!forced_fourcc && !(vidix_play.flags & VID_PLAY_INTERLEAVED_UV))) |
4991 | 583 { |
5373 | 584 if(mpi->flags&MP_IMGFLAG_ACCEPT_WIDTH){ |
585 // check if only width is enough to represent strides: | |
586 if(mpi->flags&MP_IMGFLAG_PLANAR){ | |
587 if((dstrides.y>>1)!=dstrides.v || dstrides.v!=dstrides.u) return VO_FALSE; | |
588 } else { | |
589 if(dstrides.y % (mpi->bpp/8)) return VO_FALSE; | |
590 } | |
591 } | |
5028 | 592 mpi->planes[0]=vidix_mem+vidix_play.offsets[next_frame]+vidix_play.offset.y; |
5373 | 593 mpi->width=mpi->stride[0]=dstrides.y; |
5028 | 594 if(mpi->flags&MP_IMGFLAG_PLANAR) |
595 { | |
11553 | 596 mpi->planes[1]=vidix_mem+vidix_play.offsets[next_frame]+vidix_play.offset.v; |
597 mpi->stride[1]=dstrides.v >> mpi->chroma_x_shift; | |
598 mpi->planes[2]=vidix_mem+vidix_play.offsets[next_frame]+vidix_play.offset.u; | |
599 mpi->stride[2]=dstrides.u >> mpi->chroma_x_shift; | |
5373 | 600 } else |
601 mpi->width/=mpi->bpp/8; | |
5028 | 602 mpi->flags|=MP_IMGFLAG_DIRECT; |
5373 | 603 return VO_TRUE; |
4991 | 604 } |
5373 | 605 return VO_FALSE; |
4991 | 606 } |
607 | |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4540
diff
changeset
|
608 uint32_t vidix_control(uint32_t request, void *data, ...) |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4540
diff
changeset
|
609 { |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4540
diff
changeset
|
610 switch (request) { |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4540
diff
changeset
|
611 case VOCTRL_QUERY_FORMAT: |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4540
diff
changeset
|
612 return vidix_query_fourcc(*((uint32_t*)data)); |
4991 | 613 case VOCTRL_GET_IMAGE: |
614 return vidix_get_image(data); | |
7685 | 615 case VOCTRL_DRAW_IMAGE: |
616 return vidix_draw_image(data); | |
5002 | 617 case VOCTRL_GET_FRAME_NUM: |
618 *(uint32_t *)data = next_frame; | |
619 return VO_TRUE; | |
620 case VOCTRL_SET_FRAME_NUM: | |
621 next_frame = *(uint32_t *)data; | |
622 return VO_TRUE; | |
623 case VOCTRL_GET_NUM_FRAMES: | |
624 *(uint32_t *)data = vidix_play.num_frames; | |
625 return VO_TRUE; | |
6786 | 626 case VOCTRL_SET_EQUALIZER: |
627 { | |
628 va_list ap; | |
629 int value; | |
630 vidix_video_eq_t info; | |
631 | |
632 if(!video_on) return VO_FALSE; | |
633 va_start(ap, data); | |
634 value = va_arg(ap, int); | |
635 va_end(ap); | |
636 | |
6806 | 637 // printf("vidix seteq %s -> %d \n",data,value); |
638 | |
6786 | 639 /* vidix eq ranges are -1000..1000 */ |
640 if (!strcasecmp(data, "brightness")) | |
641 { | |
642 info.brightness = value*10; | |
6806 | 643 info.cap = VEQ_CAP_BRIGHTNESS; |
6786 | 644 } |
645 else if (!strcasecmp(data, "contrast")) | |
646 { | |
647 info.contrast = value*10; | |
6806 | 648 info.cap = VEQ_CAP_CONTRAST; |
6786 | 649 } |
650 else if (!strcasecmp(data, "saturation")) | |
651 { | |
652 info.saturation = value*10; | |
6806 | 653 info.cap = VEQ_CAP_SATURATION; |
6786 | 654 } |
655 else if (!strcasecmp(data, "hue")) | |
656 { | |
657 info.hue = value*10; | |
6806 | 658 info.cap = VEQ_CAP_HUE; |
6786 | 659 } |
660 | |
661 if (vdlPlaybackSetEq(vidix_handler, &info) == 0) | |
662 return VO_TRUE; | |
663 return VO_FALSE; | |
664 } | |
665 case VOCTRL_GET_EQUALIZER: | |
666 { | |
667 va_list ap; | |
668 int *value; | |
669 vidix_video_eq_t info; | |
670 | |
671 if(!video_on) return VO_FALSE; | |
6806 | 672 if (vdlPlaybackGetEq(vidix_handler, &info) != 0) |
6786 | 673 return VO_FALSE; |
674 | |
675 va_start(ap, data); | |
6806 | 676 value = va_arg(ap, int*); |
6786 | 677 va_end(ap); |
678 | |
679 /* vidix eq ranges are -1000..1000 */ | |
680 if (!strcasecmp(data, "brightness")) | |
681 { | |
682 if (info.cap & VEQ_CAP_BRIGHTNESS) | |
683 *value = info.brightness/10; | |
684 } | |
685 else if (!strcasecmp(data, "contrast")) | |
686 { | |
687 if (info.cap & VEQ_CAP_CONTRAST) | |
688 *value = info.contrast/10; | |
689 } | |
690 else if (!strcasecmp(data, "saturation")) | |
691 { | |
692 if (info.cap & VEQ_CAP_SATURATION) | |
693 *value = info.saturation/10; | |
694 } | |
695 else if (!strcasecmp(data, "hue")) | |
696 { | |
697 if (info.cap & VEQ_CAP_HUE) | |
698 *value = info.hue/10; | |
699 } | |
700 | |
701 return VO_TRUE; | |
702 } | |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4540
diff
changeset
|
703 } |
6531 | 704 return VO_NOTIMPL; |
5319 | 705 // WARNING: we drop extra parameters (...) here! |
6531 | 706 // return server_control(request,data); //VO_NOTIMPL; |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4540
diff
changeset
|
707 } |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4540
diff
changeset
|
708 |
4454 | 709 int vidix_preinit(const char *drvname,void *server) |
710 { | |
711 int err; | |
17932 | 712 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:
17988
diff
changeset
|
713 mp_msg(MSGT_VO,MSGL_DBG2, "vosub_vidix: vidix_preinit(%s) was called\n",drvname); } |
4454 | 714 if(vdlGetVersion() != VIDIX_VERSION) |
715 { | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17988
diff
changeset
|
716 mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_YouHaveWrongVersionOfVidixLibrary); |
4454 | 717 return -1; |
718 } | |
11239 | 719 #ifndef __MINGW32__ |
17988 | 720 vidix_handler = vdlOpen(MP_VIDIX_PFX, |
4454 | 721 drvname ? drvname[0] == ':' ? &drvname[1] : drvname[0] ? drvname : NULL : NULL, |
722 TYPE_OUTPUT, | |
723 verbose); | |
11239 | 724 #else |
725 vidix_handler = vdlOpen(get_path("vidix/"), | |
726 drvname ? drvname[0] == ':' ? &drvname[1] : drvname[0] ? drvname : NULL : NULL, | |
727 TYPE_OUTPUT, | |
728 verbose); | |
729 #endif | |
730 | |
4454 | 731 if(vidix_handler == NULL) |
732 { | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17988
diff
changeset
|
733 mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_CouldntFindWorkingVidixDriver); |
4454 | 734 return -1; |
735 } | |
736 if((err=vdlGetCapability(vidix_handler,&vidix_cap)) != 0) | |
737 { | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17988
diff
changeset
|
738 mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_CouldntGetCapability,strerror(err)); |
4454 | 739 return -1; |
740 } | |
18234
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17988
diff
changeset
|
741 mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SUB_VIDIX_Description, vidix_cap.name); |
a107276371a8
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
reynaldo
parents:
17988
diff
changeset
|
742 mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SUB_VIDIX_Author, vidix_cap.author); |
4454 | 743 /* we are able to tune up this stuff depend on fourcc format */ |
744 ((vo_functions_t *)server)->draw_slice=vidix_draw_slice; | |
745 ((vo_functions_t *)server)->draw_frame=vidix_draw_frame; | |
746 ((vo_functions_t *)server)->flip_page=vidix_flip_page; | |
747 ((vo_functions_t *)server)->draw_osd=vidix_draw_osd; | |
6550
991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
alex
parents:
6531
diff
changeset
|
748 // server_control = ((vo_functions_t *)server)->control; |
991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
alex
parents:
6531
diff
changeset
|
749 // ((vo_functions_t *)server)->control=vidix_control; |
4454 | 750 vo_server = server; |
751 return 0; | |
752 } |