comparison mplayer.c @ 560:28ae99036574

Separated dvdsub code to be able to work with it easier
author lgb
date Sat, 21 Apr 2001 15:38:01 +0000
parents e4aca0d51268
children 36fd71db0d33
comparison
equal deleted inserted replaced
559:6fbd39309b87 560:28ae99036574
49 #include "wine/avifmt.h" 49 #include "wine/avifmt.h"
50 50
51 #include "codec-cfg.h" 51 #include "codec-cfg.h"
52 52
53 #include "dvdauth.h" 53 #include "dvdauth.h"
54 #include "spudec.h"
54 55
55 #ifdef USE_DIRECTSHOW 56 #ifdef USE_DIRECTSHOW
56 #include "DirectShow/DS_VideoDec.h" 57 #include "DirectShow/DS_VideoDec.h"
57 #include "DirectShow/DS_AudioDec.h" 58 #include "DirectShow/DS_AudioDec.h"
58 #endif 59 #endif
181 182
182 printf("SUB ERROR: %d ? %d --- %d [%d] \n",key,vo_sub->start,vo_sub->end,current_sub); 183 printf("SUB ERROR: %d ? %d --- %d [%d] \n",key,vo_sub->start,vo_sub->end,current_sub);
183 184
184 vo_sub=NULL; // no sub here 185 vo_sub=NULL; // no sub here
185 } 186 }
186
187
188
189
190
191 void spudec_process_control(unsigned char *control, int size, int* d1, int* d2)
192 {
193 int off = 2;
194 int a,b; /* Temporary vars */
195
196 do {
197 int type = control[off];
198 off++;
199 printf("cmd=%d ",type);
200
201 switch(type) {
202 case 0x00:
203 /* Menu ID, 1 byte */
204 printf("Menu ID\n");
205 break;
206 case 0x01:
207 /* Start display */
208 printf("Start display!\n");
209 // gSpudec.geom.bIsVisible = 1;
210 break;
211 case 0x03:
212 /* Palette */
213 printf("Palette\n");
214 // palette[3] = &(gSpudec.clut[(control[off] >> 4)]);
215 // palette[2] = &(gSpudec.clut[control[off] & 0xf]);
216 // palette[1] = &(gSpudec.clut[(control[off+1] >> 4)]);
217 // palette[0] = &(gSpudec.clut[control[off+1] & 0xf]);
218 off+=2;
219 break;
220 case 0x04:
221 /* Alpha */
222 printf("Alpha\n");
223 // alpha[3] = control[off] & 0xf0;
224 // alpha[2] = (control[off] & 0xf) << 4;
225 // alpha[1] = control[off+1] & 0xf0;
226 // alpha[0] = (control[off+1] & 0xf) << 4;
227 off+=2;
228 break;
229 case 0x05:
230 /* Co-ords */
231 a = (control[off] << 16) + (control[off+1] << 8) + control[off+2];
232 b = (control[off+3] << 16) + (control[off+4] << 8) + control[off+5];
233
234 printf("Coords col: %d - %d row: %d - %d\n",a >> 12,a & 0xfff,b >> 12,b & 0xfff);
235
236 // gSpudec.geom.start_col = a >> 12;
237 // gSpudec.geom.end_col = a & 0xfff;
238 // gSpudec.geom.start_row = b >> 12;
239 // gSpudec.geom.end_row = b & 0xfff;
240
241 off+=6;
242 break;
243 case 0x06:
244 /* Graphic lines */
245 *(d1) = (control[off] << 8) + control[off+1];
246 *(d2) = (control[off+2] << 8) + control[off+3];
247 printf("Graphic pos color: %d b/w: %d\n",*d1,*d2);
248 off+=4;
249 break;
250 case 0xff:
251 /* All done, bye-bye */
252 printf("Done!\n");
253 return;
254 break;
255 default:
256 printf("spudec: Error determining control type 0x%02x.\n",type);
257 return;
258 break;
259 }
260
261 /* printf("spudec: Processsed control type 0x%02x.\n",type); */
262 } while(off < size);
263 }
264
265 187
266 188
267 //**************************************************************************// 189 //**************************************************************************//
268 // Config file 190 // Config file
269 //**************************************************************************// 191 //**************************************************************************//