comparison libvo/vo_xvmc.c @ 14635:1c277cafd3b1

Query XV_COLORKEY only when listed in attribute list, fixes displaying with non overlay ports
author iive
date Wed, 02 Feb 2005 14:02:26 +0000
parents e047e70a9767
children 76d461a061df
comparison
equal deleted inserted replaced
14634:d92dab9e76b6 14635:1c277cafd3b1
207 if(keycolor_handling == AUTO_COLORKEY){ 207 if(keycolor_handling == AUTO_COLORKEY){
208 //XV_AUTOPING_COLORKEY doesn't work for XvMC yet(NVidia 43.63) 208 //XV_AUTOPING_COLORKEY doesn't work for XvMC yet(NVidia 43.63)
209 attributes = XvQueryPortAttributes(mDisplay, xv_port, &attrib_count); 209 attributes = XvQueryPortAttributes(mDisplay, xv_port, &attrib_count);
210 if(attributes!=NULL){ 210 if(attributes!=NULL){
211 for (i = 0; i < attrib_count; i++){ 211 for (i = 0; i < attrib_count; i++){
212 if (!strcmp(attributes[i].name, "XV_AUTOPAINT_COLORKEY")) 212 if (!strcmp(attributes[i].name, "XV_COLORKEY"))
213 { 213 {
214 xv_atom = XInternAtom(mDisplay, "XV_AUTOPAINT_COLORKEY", False); 214 xv_atom = XInternAtom(mDisplay, "XV_COLORKEY", False);
215 if(xv_atom!=None) 215 if(xv_atom!=None)
216 { 216 {
217 rez=XvSetPortAttribute(mDisplay, xv_port, xv_atom, 1); 217 rez=XvGetPortAttribute(mDisplay,xv_port, xv_atom, &colorkey);
218 if(rez == Success) 218 if(rez == Success){
219 keycolor_handling = AUTOPAINT_COLORKEY; 219 keycolor = colorkey;
220 keycolor_handling = MANUALFILL_COLORKEY;
221 }
220 } 222 }
221 break; 223 break;
222 } 224 }
223 } 225 }
224 XFree(attributes); 226 XFree(attributes);
225 }
226 }
227
228 xv_atom = XInternAtom(mDisplay, "XV_COLORKEY",False);
229 if(xv_atom == None) return;
230 rez=XvGetPortAttribute(mDisplay,xv_port, xv_atom, &colorkey);
231 if(rez == Success){
232 keycolor = colorkey;
233 if(keycolor_handling == AUTO_COLORKEY){
234 keycolor_handling = MANUALFILL_COLORKEY;
235 } 227 }
236 } 228 }
237 } 229 }
238 230
239 //from vo_xmga 231 //from vo_xmga
437 return -1; 429 return -1;
438 } 430 }
439 surface_render = NULL; 431 surface_render = NULL;
440 xv_port = 0; 432 xv_port = 0;
441 number_of_surfaces = 0; 433 number_of_surfaces = 0;
442 keycolor_handling = MANUALFILL_COLORKEY;//fixme 434 keycolor_handling = AUTO_COLORKEY;
443 subpicture_alloc = 0; 435 subpicture_alloc = 0;
444 436
445 benchmark = 0; //disable PutImageto allow faster display than screen refresh 437 benchmark = 0; //disable PutImageto allow faster display than screen refresh
446 busy_wait = 1; 438 busy_wait = 1;
447 use_queue = 0; 439 use_queue = 0;