Rev 2693 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2693 | Rev 3068 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | #include "system.h" |
6 | #include "system.h" |
7 | #include "../winlib/winlib.h" |
7 | #include "../winlib/winlib.h" |
8 | #include "sound.h" |
8 | #include "sound.h" |
9 | #include "fplay.h" |
9 | #include "fplay.h" |
10 | 10 | #include |
|
11 | #define CAPTION_HEIGHT 24 |
- | |
12 | 11 | ||
Line 13... | Line 12... | ||
13 | extern int res_pause_btn[]; |
12 | extern int res_pause_btn[]; |
14 | extern int res_pause_btn_pressed[]; |
13 | extern int res_pause_btn_pressed[]; |
Line 15... | Line 14... | ||
15 | 14 | ||
16 | extern int res_play_btn[]; |
15 | extern int res_play_btn[]; |
Line 17... | Line 16... | ||
17 | extern int res_play_btn_pressed[]; |
16 | extern int res_play_btn_pressed[]; |
- | 17 | ||
- | 18 | extern int64_t stream_duration; |
|
Line 18... | Line 19... | ||
18 | 19 | extern volatile int sound_level_0; |
|
19 | extern int64_t stream_duration; |
20 | extern volatile int sound_level_1; |
20 | 21 | ||
21 | typedef struct |
22 | typedef struct |
22 | { |
23 | { |
23 | AVPicture picture; |
24 | AVPicture picture; |
Line 24... | Line 25... | ||
24 | double pts; |
25 | double pts; |
- | 26 | volatile int ready; |
|
Line 25... | Line 27... | ||
25 | volatile int ready; |
27 | }vframe_t; |
Line 26... | Line 28... | ||
26 | }vframe_t; |
28 | |
27 | 29 | vframe_t frames[4]; |
|
Line 52... | Line 54... | ||
52 | { |
54 | { |
53 | frames[i].pts = 0; |
55 | frames[i].pts = 0; |
54 | frames[i].ready = 0; |
56 | frames[i].ready = 0; |
55 | }; |
57 | }; |
56 | vfx = 0; |
58 | frames_count = 0; |
- | 59 | vfx = 0; |
|
57 | dfx = 0; |
60 | dfx = 0; |
58 | }; |
61 | }; |
59 | 62 | ||
Line 60... | Line 63... | ||
60 | int init_video(AVCodecContext *ctx) |
63 | int init_video(AVCodecContext *ctx) |
Line 63... | Line 66... | ||
63 | 66 | ||
Line 64... | Line 67... | ||
64 | width = ctx->width; |
67 | width = ctx->width; |
65 | height = ctx->height; |
68 | height = ctx->height; |
Line 66... | Line -... | ||
66 | - | ||
67 | 69 | ||
Line 68... | Line 70... | ||
68 | printf("w = %d h = %d\n\r", width, height); |
70 | printf("w = %d h = %d\n\r", ctx->width, ctx->height); |
Line 69... | Line 71... | ||
69 | 71 | ||
70 | // __asm__ __volatile__("int3"); |
72 | // __asm__ __volatile__("int3"); |
71 | - | ||
72 | main_render = create_render(ctx->width, ctx->height, |
- | |
73 | ctx->pix_fmt, HW_BIT_BLIT|HW_TEX_BLIT); |
- | |
74 | // render = create_render(ctx->width, ctx->height, |
73 | |
75 | // ctx->pix_fmt, 0); |
74 | main_render = create_render(ctx->width, ctx->height, |
76 | // |
75 | ctx->pix_fmt, HW_BIT_BLIT|HW_TEX_BLIT); |
77 | if( main_render == NULL) |
76 | if( main_render == NULL) |
78 | { |
77 | { |
Line 119... | Line 118... | ||
119 | int frameFinished; |
118 | int frameFinished; |
120 | double current_clock; |
119 | double current_clock; |
121 | 120 | ||
Line 122... | Line 121... | ||
122 | if(frames[dfx].ready != 0 ) |
121 | if(frames[dfx].ready != 0 ) |
123 | return 1; |
122 | return -1; |
Line 124... | Line 123... | ||
124 | 123 | ||
125 | if( get_packet(qv, &pkt) == 0 ) |
124 | if( get_packet(qv, &pkt) == 0 ) |
Line -... | Line 125... | ||
- | 125 | return 0; |
|
126 | return 0; |
126 | |
Line 127... | Line 127... | ||
127 | 127 | /* |
|
128 | current_clock = -90.0 + get_master_clock(); |
128 | current_clock = -90.0 + get_master_clock(); |
129 | 129 | ||
Line 136... | Line 136... | ||
136 | pts= 0; |
136 | pts= 0; |
137 | 137 | ||
Line 138... | Line 138... | ||
138 | 138 | ||
139 | pts *= av_q2d(video_time_base)*1000.0; |
139 | pts *= av_q2d(video_time_base)*1000.0; |
140 | 140 | */ |
|
141 | if( 1 /*pts > current_clock*/) |
141 | if( 1 /*pts > current_clock*/) |
142 | { |
142 | { |
Line 143... | Line 143... | ||
143 | frameFinished = 0; |
143 | frameFinished = 0; |
Line 179... | Line 179... | ||
179 | frames[dfx].ready = 1; |
179 | frames[dfx].ready = 1; |
Line 180... | Line 180... | ||
180 | 180 | ||
181 | dfx++; |
181 | dfx++; |
- | 182 | dfx&= 3; |
|
182 | dfx&= 3; |
183 | frames_count++; |
183 | }; |
184 | }; |
184 | }; |
185 | }; |
Line 185... | Line 186... | ||
185 | av_free_packet(&pkt); |
186 | av_free_packet(&pkt); |
186 | 187 | ||
Line 187... | Line 188... | ||
187 | return 1; |
188 | return 1; |
- | 189 | } |
|
- | 190 | ||
- | 191 | extern volatile enum player_state player_state; |
|
188 | } |
192 | extern volatile enum player_state decoder_state; |
Line 189... | Line 193... | ||
189 | 193 | extern volatile enum player_state sound_state; |
|
Line -... | Line 194... | ||
- | 194 | ||
- | 195 | //rect_t win_rect; |
|
- | 196 | ||
- | 197 | extern int64_t rewind_pos; |
|
- | 198 | ||
- | 199 | static void player_stop() |
|
- | 200 | { |
|
- | 201 | window_t *win; |
|
- | 202 | ||
- | 203 | win = main_render->win; |
|
- | 204 | ||
- | 205 | rewind_pos = 0; |
|
- | 206 | ||
- | 207 | win->panel.play_btn->img_default = res_play_btn; |
|
- | 208 | win->panel.play_btn->img_hilite = res_play_btn; |
|
- | 209 | win->panel.play_btn->img_pressed = res_play_btn_pressed; |
|
- | 210 | win->panel.prg->current = rewind_pos; |
|
- | 211 | ||
- | 212 | send_message(&win->panel.ctrl, MSG_PAINT, 0, 0); |
|
- | 213 | player_state = STOP; |
|
- | 214 | decoder_state = PLAY_2_STOP; |
|
- | 215 | sound_state = PLAY_2_STOP; |
|
190 | extern volatile enum player_state player_state; |
216 | render_draw_client(main_render); |
191 | //rect_t win_rect; |
217 | // printf("stop player\n"); |
192 | 218 | ||
Line 193... | Line 219... | ||
193 | extern int64_t rewind_pos; |
219 | }; |
Line 209... | Line 235... | ||
209 | render_draw_client(main_render); |
235 | render_draw_client(main_render); |
210 | break; |
236 | break; |
211 | 237 | ||
Line 212... | Line 238... | ||
212 | case MSG_LBTNDOWN: |
238 | case MSG_LBTNDOWN: |
- | 239 | ||
213 | if(player_state == PAUSE) |
240 | if(player_state == PAUSE) |
214 | { |
241 | { |
215 | win->panel.play_btn->img_default = res_pause_btn; |
242 | win->panel.play_btn->img_default = res_pause_btn; |
216 | win->panel.play_btn->img_hilite = res_pause_btn; |
243 | win->panel.play_btn->img_hilite = res_pause_btn; |
217 | win->panel.play_btn->img_pressed = res_pause_btn_pressed; |
244 | win->panel.play_btn->img_pressed = res_pause_btn_pressed; |
218 | send_message(win->panel.play_btn, MSG_PAINT, 0, 0); |
245 | send_message(&win->panel.play_btn->ctrl, MSG_PAINT, 0, 0); |
- | 246 | player_state = PLAY; |
|
219 | player_state = PAUSE_2_PLAY; |
247 | sound_state = PAUSE_2_PLAY; |
Line 220... | Line 248... | ||
220 | 248 | ||
221 | } |
249 | } |
222 | else if(player_state == PLAY) |
250 | else if(player_state == PLAY) |
223 | { |
251 | { |
224 | win->panel.play_btn->img_default = res_play_btn; |
252 | win->panel.play_btn->img_default = res_play_btn; |
225 | win->panel.play_btn->img_hilite = res_play_btn; |
253 | win->panel.play_btn->img_hilite = res_play_btn; |
226 | win->panel.play_btn->img_pressed = res_play_btn_pressed; |
254 | win->panel.play_btn->img_pressed = res_play_btn_pressed; |
227 | send_message(win->panel.play_btn, MSG_PAINT, 0, 0); |
255 | send_message(&win->panel.play_btn->ctrl, MSG_PAINT, 0, 0); |
- | 256 | player_state = PAUSE; |
|
228 | player_state = PAUSE; |
257 | sound_state = PLAY_2_PAUSE; |
229 | } |
258 | } |
Line 230... | Line 259... | ||
230 | break; |
259 | break; |
231 | 260 | ||
Line 237... | Line 266... | ||
237 | { |
266 | { |
238 | win->panel.play_btn->img_default = res_pause_btn; |
267 | win->panel.play_btn->img_default = res_pause_btn; |
239 | win->panel.play_btn->img_hilite = res_pause_btn; |
268 | win->panel.play_btn->img_hilite = res_pause_btn; |
240 | win->panel.play_btn->img_pressed = res_pause_btn_pressed; |
269 | win->panel.play_btn->img_pressed = res_pause_btn_pressed; |
241 | player_state = PAUSE_2_PLAY; |
270 | player_state = PLAY; |
- | 271 | sound_state = PAUSE_2_PLAY; |
|
242 | } |
272 | } |
243 | else if(player_state == PLAY) |
273 | else if(player_state == PLAY) |
244 | { |
274 | { |
245 | win->panel.play_btn->img_default = res_play_btn; |
275 | win->panel.play_btn->img_default = res_play_btn; |
246 | win->panel.play_btn->img_hilite = res_play_btn; |
276 | win->panel.play_btn->img_hilite = res_play_btn; |
247 | win->panel.play_btn->img_pressed = res_play_btn_pressed; |
277 | win->panel.play_btn->img_pressed = res_play_btn_pressed; |
248 | player_state = PAUSE; |
278 | player_state = PAUSE; |
249 | } |
279 | sound_state = PLAY_2_PAUSE; |
- | 280 | } |
|
250 | break; |
281 | else if(player_state == STOP) |
- | 282 | { |
|
- | 283 | win->panel.play_btn->img_default = res_pause_btn; |
|
- | 284 | win->panel.play_btn->img_hilite = res_pause_btn; |
|
- | 285 | win->panel.play_btn->img_pressed = res_pause_btn_pressed; |
|
- | 286 | rewind_pos = 0; |
|
- | 287 | send_message(&win->panel.ctrl, MSG_PAINT, 0, 0); |
|
- | 288 | player_state = PLAY; |
|
- | 289 | decoder_state = PREPARE; |
|
- | 290 | } |
|
- | 291 | break; |
|
- | 292 | ||
- | 293 | case ID_STOP: |
|
- | 294 | player_stop(); |
|
- | 295 | break; |
|
251 | 296 | ||
Line 252... | Line 297... | ||
252 | case 101: //ID_PROGRESS: |
297 | case ID_PROGRESS: |
253 | if(player_state != REWIND) |
298 | if(player_state != REWIND) |
254 | { |
299 | { |
255 | progress_t *prg = (progress_t*)arg2; |
300 | progress_t *prg = (progress_t*)arg2; |
Line 256... | Line -... | ||
256 | - | ||
257 | rewind_pos = (int64_t)prg->pos * |
301 | |
Line 258... | Line 302... | ||
258 | (prg->max - prg->min)/prg->ctrl.w; |
302 | rewind_pos = (prg->max - prg->min)*prg->pos/prg->ctrl.w; |
259 | 303 | ||
- | 304 | // printf("progress action pos: %d time: %f\n", prg->pos, (double)rewind_pos); |
|
- | 305 | player_state = REWIND; |
|
- | 306 | decoder_state = REWIND; |
|
- | 307 | sound_state = PLAY_2_STOP; |
|
260 | // printf("progress action %f\n", (double)rewind_pos); |
308 | if(rewind_pos < prg->current) |
- | 309 | { |
|
- | 310 | prg->current = rewind_pos; |
|
- | 311 | rewind_pos = -rewind_pos; |
|
- | 312 | } |
|
- | 313 | else |
|
- | 314 | prg->current = rewind_pos; |
|
- | 315 | ||
- | 316 | win->panel.play_btn->img_default = res_pause_btn; |
|
261 | player_state = REWIND; |
317 | win->panel.play_btn->img_hilite = res_pause_btn; |
262 | main_render->win->panel.prg->current = rewind_pos; |
318 | win->panel.play_btn->img_pressed = res_pause_btn_pressed; |
263 | send_message(&main_render->win->panel.ctrl, MSG_PAINT, 0, 0); |
319 | send_message(&prg->ctrl, MSG_PAINT, 0, 0); |
Line -... | Line 320... | ||
- | 320 | }; |
|
- | 321 | break; |
|
- | 322 | ||
- | 323 | case ID_VOL_CTRL: |
|
- | 324 | { |
|
- | 325 | slider_t *sld = (slider_t*)arg2; |
|
- | 326 | int peak; |
|
- | 327 | int level; |
|
- | 328 | ||
- | 329 | peak = sld->min + sld->pos * (sld->max - sld->min)/(96); |
|
- | 330 | // level = (log2(peak+16384)*10000.0)/15 - 10000; |
|
- | 331 | level = peak; |
|
- | 332 | ||
- | 333 | // printf("level %d\n", level); |
|
- | 334 | set_audio_volume(level, level); |
|
- | 335 | send_message(&sld->ctrl, MSG_PAINT, 0, 0); |
|
264 | }; |
336 | win->panel.lvl->vol = level; |
265 | break; |
337 | } |
266 | 338 | ||
267 | default: |
339 | default: |
Line 278... | Line 350... | ||
278 | #define VERSION_A 1 |
350 | #define VERSION_A 1 |
Line 279... | Line 351... | ||
279 | 351 | ||
280 | void render_time(render_t *render) |
352 | void render_time(render_t *render) |
- | 353 | { |
|
- | 354 | progress_t *prg = main_render->win->panel.prg; |
|
- | 355 | level_t *lvl = main_render->win->panel.lvl; |
|
281 | { |
356 | |
282 | double ctime; /* milliseconds */ |
357 | double ctime; /* milliseconds */ |
Line 283... | Line 358... | ||
283 | double fdelay; /* milliseconds */ |
358 | double fdelay; /* milliseconds */ |
Line 284... | Line 359... | ||
284 | 359 | ||
285 | //again: |
360 | //again: |
286 | 361 | ||
287 | if(player_state == CLOSED) |
362 | if(player_state == CLOSED) |
288 | { |
363 | { |
- | 364 | render->win->win_command = WIN_CLOSED; |
|
- | 365 | return; |
|
- | 366 | } |
|
- | 367 | else if(player_state == REWIND) |
|
- | 368 | { |
|
- | 369 | yield(); |
|
- | 370 | return; |
|
- | 371 | } |
|
- | 372 | else if (decoder_state == STOP && frames_count == 0 && |
|
- | 373 | player_state != STOP) |
|
289 | render->win->win_command = WIN_CLOSED; |
374 | { |
290 | return; |
375 | player_stop(); |
291 | } |
376 | } |
292 | else if(player_state != PLAY) |
377 | else if(player_state != PLAY) |
293 | { |
378 | { |
Line -... | Line 379... | ||
- | 379 | yield(); |
|
294 | yield(); |
380 | return; |
295 | return; |
381 | }; |
296 | }; |
382 | |
297 | 383 | ||
Line 322... | Line 408... | ||
322 | // printf("systime %d pts %f time %f delay %f\n", |
408 | // printf("systime %d pts %f time %f delay %f\n", |
323 | // sys_time*10, frames[vfx].pts, ctime, fdelay); |
409 | // sys_time*10, frames[vfx].pts, ctime, fdelay); |
324 | 410 | ||
Line 325... | Line 411... | ||
325 | main_render->draw(main_render, &frames[vfx].picture); |
411 | main_render->draw(main_render, &frames[vfx].picture); |
326 | main_render->win->panel.prg->current = frames[vfx].pts*1000; |
412 | prg->current = frames[vfx].pts*1000; |
- | 413 | // printf("current %f\n", prg->current); |
|
- | 414 | lvl->current = vfx & 1 ? sound_level_1 : sound_level_0; |
|
- | 415 | ||
- | 416 | send_message(&prg->ctrl, PRG_PROGRESS, 0, 0); |
|
- | 417 | ||
- | 418 | if(main_render->win->panel.layout) |
|
327 | send_message(&render->win->panel.prg->ctrl, MSG_PAINT, 0, 0); |
419 | send_message(&lvl->ctrl, MSG_PAINT, 0, 0); |
- | 420 | ||
- | 421 | frames_count--; |
|
328 | frames[vfx].ready = 0; |
422 | frames[vfx].ready = 0; |
329 | vfx++; |
423 | vfx++; |
330 | vfx&= 3; |
424 | vfx&= 3; |
331 | } |
425 | } |
332 | else yield(); |
426 | else yield(); |
Line 394... | Line 488... | ||
394 | 488 | ||
Line 395... | Line 489... | ||
395 | } |
489 | } |
Line 396... | Line -... | ||
396 | - | ||
397 | - | ||
398 | 490 | ||
Line 399... | Line 491... | ||
399 | 491 | ||
400 | extern char *movie_file; |
492 | extern char *movie_file; |
401 | 493 | ||
Line 402... | Line 494... | ||
402 | int video_thread(void *param) |
494 | int video_thread(void *param) |
Line 403... | Line 495... | ||
403 | { |
495 | { |
404 | window_t *MainWindow; |
496 | window_t *MainWindow; |
Line 405... | Line 497... | ||
405 | 497 | ||
406 | init_winlib(); |
498 | init_winlib(); |
Line 407... | Line 499... | ||
407 | 499 | ||
Line 408... | Line 500... | ||
408 | MainWindow = create_window(movie_file,0, |
500 | MainWindow = create_window(movie_file,0, |
Line 409... | Line 501... | ||
409 | 10,10,width,height+29+55,MainWindowProc); |
501 | 10,10,width,height+CAPTION_HEIGHT+PANEL_HEIGHT,MainWindowProc); |
410 | 502 | ||
Line 411... | Line 503... | ||
411 | MainWindow->panel.prg->max = stream_duration; |
503 | MainWindow->panel.prg->max = stream_duration; |
Line 412... | Line 504... | ||
412 | // printf("MainWindow %x\n", MainWindow); |
504 | // printf("MainWindow %x\n", MainWindow); |
- | 505 | ||
413 | 506 | main_render->win = MainWindow; |
|
414 | main_render->win = MainWindow; |
507 | |
415 | 508 | show_window(MainWindow, NORMAL); |
|
Line 471... | Line 564... | ||
471 | render->rcvideo.t = 0; |
564 | render->rcvideo.t = 0; |
472 | render->rcvideo.r = width; |
565 | render->rcvideo.r = width; |
473 | render->rcvideo.b = height; |
566 | render->rcvideo.b = height; |
474 | 567 | ||
Line -... | Line 568... | ||
- | 568 | // printf("render width %d height %d\n",width, height); |
|
- | 569 | ||
475 | if( render->win_height > height ) |
570 | if( render->win_height > height ) |
476 | { |
571 | { |
477 | int yoffs; |
572 | int yoffs; |
478 | yoffs = (render->win_height-height)/2; |
573 | yoffs = (render->win_height-height)/2; |
479 | if(yoffs) |
574 | if(yoffs) |
Line 559... | Line 654... | ||
559 | uint32_t right, bottom, new_w, new_h; |
654 | uint32_t right, bottom, new_w, new_h; |
560 | uint32_t s, sw, sh; |
655 | uint32_t s, sw, sh; |
561 | uint8_t state; |
656 | uint8_t state; |
562 | 657 | ||
Line 563... | Line -... | ||
563 | - | ||
564 | right = win->w; |
658 | right = win->w; |
565 | bottom = win->h-CAPTION_HEIGHT-55; |
659 | bottom = win->h-CAPTION_HEIGHT-PANEL_HEIGHT; |
- | 660 | ||
- | 661 | // printf("window width %d height %d\n", |
|
- | 662 | // right, bottom); |
|
- | 663 | ||
566 | render->win_state = win->win_state; |
664 | render->win_state = win->win_state; |
Line 567... | Line 665... | ||
567 | 665 | ||
568 | if(render->win_state == MINIMIZED) |
666 | if(render->win_state == MINIMIZED) |
Line 577... | Line 675... | ||
577 | 675 | ||
Line 578... | Line 676... | ||
578 | new_w = bottom*render->ctx_width/render->ctx_height; |
676 | new_w = bottom*render->ctx_width/render->ctx_height; |
579 | new_h = right*render->ctx_height/render->ctx_width; |
677 | new_h = right*render->ctx_height/render->ctx_width; |
Line 580... | Line -... | ||
580 | - | ||
581 | // printf("new_w %d new_h %d\n", new_w, new_h); |
- | |
582 | - | ||
583 | s = right * bottom; |
- | |
584 | sw = right * new_h; |
- | |
585 | sh = bottom * new_w; |
- | |
586 | - | ||
587 | if( abs(s-sw) > abs(s-sh)) |
678 | |
588 | new_h = bottom; |
679 | if(new_w > right) |
589 | else |
680 | { |
- | 681 | new_w = right; |
|
590 | new_w = right; |
682 | new_h = right*render->ctx_height/render->ctx_width; |
591 | 683 | }; |
|
592 | if(new_w < 64) |
684 | if(new_h > bottom) |
593 | { |
685 | { |
594 | new_w = 64; |
686 | new_h = bottom; |
595 | new_h = 64*render->ctx_height/render->ctx_width; |
687 | new_w = bottom*render->ctx_width/render->ctx_height; |
Line 596... | Line 688... | ||
596 | }; |
688 | }; |
597 | 689 | ||
598 | render->win_width = win->w; |
690 | render->win_width = win->w; |
599 | render->win_height = win->h-CAPTION_HEIGHT-55; |
691 | render->win_height = win->h-CAPTION_HEIGHT-PANEL_HEIGHT; |
Line 600... | Line 692... | ||
600 | render_set_size(render, new_w, new_h); |
692 | render_set_size(render, new_w, new_h); |
601 | }; |
693 | }; |
Line 618... | Line 710... | ||
618 | dst_height = render->ctx_height; |
710 | dst_height = render->ctx_height; |
619 | } |
711 | } |
620 | else |
712 | else |
621 | { |
713 | { |
622 | dst_width = render->win_width; |
714 | dst_width = render->rcvideo.r; |
623 | dst_height = render->win_height; |
715 | dst_height = render->rcvideo.b; |
624 | }; |
716 | }; |
625 | 717 | ||
Line 626... | Line 718... | ||
626 | cvt_ctx = sws_getCachedContext(cvt_ctx, |
718 | cvt_ctx = sws_getCachedContext(cvt_ctx, |
627 | render->ctx_width, render->ctx_height, render->ctx_format, |
719 | render->ctx_width, render->ctx_height, render->ctx_format, |
628 | dst_width, dst_height, PIX_FMT_BGRA, |
720 | dst_width, dst_height, PIX_FMT_BGRA, |
Line 637... | Line 729... | ||
637 | 729 | ||
Line 638... | Line 730... | ||
638 | ret = lock_bitmap(bitmap); |
730 | ret = lock_bitmap(bitmap); |
639 | if( ret != 0) |
731 | if( ret != 0) |
640 | { |
732 | { |
641 | printf("Cannot lock the bitmap!\n"); |
733 | printf("Cannot lock bitmap!\n"); |
642 | return ; |
734 | return ; |
643 | } |
735 | } |
Line 644... | Line 736... | ||
644 | 736 | ||
645 | // printf("sws_getCachedContext\n"); |
737 | // printf("sws_getCachedContext\n"); |
Line 659... | Line 751... | ||
659 | 751 | ||
Line 660... | Line 752... | ||
660 | blit_bitmap(bitmap, render->rcvideo.l, |
752 | blit_bitmap(bitmap, render->rcvideo.l, |
661 | CAPTION_HEIGHT+render->rcvideo.t, |
753 | CAPTION_HEIGHT+render->rcvideo.t, |
662 | render->rcvideo.r, render->rcvideo.b); |
754 | render->rcvideo.r, render->rcvideo.b); |
- | 755 | ||
663 | render->last_bitmap = bitmap; |
756 | render->last_bitmap = bitmap; |
664 | // printf("blit_bitmap\n"); |
757 | // printf("blit_bitmap\n"); |
Line 665... | Line 758... | ||
665 | 758 | ||
666 | 759 | ||
667 | render->target++; |
760 | // render->target++; |
Line 668... | Line 761... | ||
668 | render->target&= 3; |
761 | // render->target&= 3; |
669 | } |
762 | } |
670 | 763 | ||
Line 713... | Line 806... | ||
713 | if(render->win_state == MINIMIZED || |
806 | if(render->win_state == MINIMIZED || |
714 | render->win_state == ROLLED) |
807 | render->win_state == ROLLED) |
715 | return; |
808 | return; |
716 | 809 | ||
Line 717... | Line 810... | ||
717 | if((player_state == PAUSE) || |
810 | if(player_state == PAUSE) |
718 | (player_state == PLAY_INIT) ) |
- | |
719 | { |
811 | { |
720 | if(frames[vfx].ready == 1 ) |
812 | if(frames[vfx].ready == 1 ) |
721 | main_render->draw(main_render, &frames[vfx].picture); |
813 | main_render->draw(main_render, &frames[vfx].picture); |
722 | else |
814 | else |
723 | draw_bar(0, CAPTION_HEIGHT, render->win_width, |
815 | draw_bar(0, CAPTION_HEIGHT, render->win_width, |
724 | render->rcvideo.b, 0); |
816 | render->rcvideo.b, 0); |
- | 817 | } |
|
- | 818 | else if( player_state == STOP ) |
|
- | 819 | { |
|
- | 820 | draw_bar(0, CAPTION_HEIGHT, render->win_width, |
|
- | 821 | render->rcvideo.b, 0); |
|
725 | }; |
822 | }; |
Line 726... | Line 823... | ||
726 | 823 | ||
727 | if(render->layout & HAS_TOP) |
824 | if(render->layout & HAS_TOP) |
728 | draw_bar(0, CAPTION_HEIGHT, render->win_width, |
825 | draw_bar(0, CAPTION_HEIGHT, render->win_width, |