comparison libvo/vo_corevideo.m @ 34825:5ed9693f8071

Remove pointless global variables.
author reimar
date Thu, 17 May 2012 22:10:19 +0000
parents 1237a0a79119
children 444a6a469743
comparison
equal deleted inserted replaced
34824:59bac49bba26 34825:5ed9693f8071
73 static uint8_t image_page = 0; 73 static uint8_t image_page = 0;
74 static unsigned char *image_datas[2]; 74 static unsigned char *image_datas[2];
75 75
76 static uint32_t image_width; 76 static uint32_t image_width;
77 static uint32_t image_height; 77 static uint32_t image_height;
78 static uint32_t image_depth;
79 static uint32_t image_bytes; 78 static uint32_t image_bytes;
80 static uint32_t image_format; 79 static uint32_t image_format;
81 80
82 //vo 81 //vo
83 static int isFullscreen; 82 static int isFullscreen;
84 static int isOntop; 83 static int isOntop;
85 static int isRootwin; 84 static int isRootwin;
86 85
87 static float winAlpha = 1; 86 static float winAlpha = 1;
88 static int int_pause = 0;
89 87
90 static BOOL isLeopardOrLater; 88 static BOOL isLeopardOrLater;
91 89
92 static vo_info_t info = 90 static vo_info_t info =
93 { 91 {
171 image_width = width; 169 image_width = width;
172 image_height = height; 170 image_height = height;
173 switch (image_format) 171 switch (image_format)
174 { 172 {
175 case IMGFMT_RGB24: 173 case IMGFMT_RGB24:
176 image_depth = 24; 174 image_bytes = 3;
177 break; 175 break;
178 case IMGFMT_ARGB: 176 case IMGFMT_ARGB:
179 case IMGFMT_BGRA: 177 case IMGFMT_BGRA:
180 image_depth = 32; 178 image_bytes = 4;
181 break; 179 break;
182 case IMGFMT_YUY2: 180 case IMGFMT_YUY2:
183 image_depth = 16; 181 image_bytes = 2;
184 break; 182 break;
185 } 183 }
186 image_bytes = (image_depth + 7) / 8;
187 184
188 if(!shared_buffer) 185 if(!shared_buffer)
189 { 186 {
190 config_movie_aspect((float)d_width/d_height); 187 config_movie_aspect((float)d_width/d_height);
191 188
422 static int control(uint32_t request, void *data) 419 static int control(uint32_t request, void *data)
423 { 420 {
424 switch (request) 421 switch (request)
425 { 422 {
426 case VOCTRL_DRAW_IMAGE: return draw_image(data); 423 case VOCTRL_DRAW_IMAGE: return draw_image(data);
427 case VOCTRL_PAUSE: return int_pause = 1; 424 case VOCTRL_PAUSE:
428 case VOCTRL_RESUME: return int_pause = 0; 425 case VOCTRL_RESUME:
426 return VO_TRUE;
429 case VOCTRL_QUERY_FORMAT: return query_format(*(uint32_t*)data); 427 case VOCTRL_QUERY_FORMAT: return query_format(*(uint32_t*)data);
430 case VOCTRL_ONTOP: vo_ontop = !vo_ontop; if(!shared_buffer){ [mpGLView ontop]; } else { [mplayerosxProto ontop]; } return VO_TRUE; 428 case VOCTRL_ONTOP: vo_ontop = !vo_ontop; if(!shared_buffer){ [mpGLView ontop]; } else { [mplayerosxProto ontop]; } return VO_TRUE;
431 case VOCTRL_ROOTWIN: vo_rootwin = !vo_rootwin; [mpGLView rootwin]; return VO_TRUE; 429 case VOCTRL_ROOTWIN: vo_rootwin = !vo_rootwin; [mpGLView rootwin]; return VO_TRUE;
432 case VOCTRL_FULLSCREEN: vo_fs = !vo_fs; if(!shared_buffer){ [mpGLView fullscreen: NO]; } else { [mplayerosxProto toggleFullscreen]; } return VO_TRUE; 430 case VOCTRL_FULLSCREEN: vo_fs = !vo_fs; if(!shared_buffer){ [mpGLView fullscreen: NO]; } else { [mplayerosxProto toggleFullscreen]; } return VO_TRUE;
433 case VOCTRL_GET_PANSCAN: return VO_TRUE; 431 case VOCTRL_GET_PANSCAN: return VO_TRUE;