Rev 3292 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3292 | Rev 3334 | ||
---|---|---|---|
Line 401... | Line 401... | ||
401 | // printf("systime %d pts %f time %f delay %f\n", |
401 | // printf("systime %d pts %f time %f delay %f\n", |
402 | // sys_time*10, frames[vfx].pts, ctime, fdelay); |
402 | // sys_time*10, frames[vfx].pts, ctime, fdelay); |
403 | 403 | ||
Line 404... | Line 404... | ||
404 | main_render->draw(main_render, &frames[vfx].picture); |
404 | main_render->draw(main_render, &frames[vfx].picture); |
- | 405 | if(main_render->win->win_state != FULLSCREEN) |
|
- | 406 | { |
|
405 | prg->current = frames[vfx].pts*1000; |
407 | prg->current = frames[vfx].pts*1000; |
406 | // printf("current %f\n", prg->current); |
408 | // printf("current %f\n", prg->current); |
407 | lvl->current = vfx & 1 ? sound_level_1 : sound_level_0; |
409 | lvl->current = vfx & 1 ? sound_level_1 : sound_level_0; |
Line 408... | Line 410... | ||
408 | 410 | ||
Line 409... | Line 411... | ||
409 | send_message(&prg->ctrl, PRG_PROGRESS, 0, 0); |
411 | send_message(&prg->ctrl, PRG_PROGRESS, 0, 0); |
410 | 412 | ||
- | 413 | if(main_render->win->panel.layout) |
|
Line 411... | Line 414... | ||
411 | if(main_render->win->panel.layout) |
414 | send_message(&lvl->ctrl, MSG_PAINT, 0, 0); |
412 | send_message(&lvl->ctrl, MSG_PAINT, 0, 0); |
415 | } |
413 | 416 | ||
414 | frames_count--; |
417 | frames_count--; |
Line 705... | Line 708... | ||
705 | uint32_t s, sw, sh; |
708 | uint32_t s, sw, sh; |
706 | uint8_t state; |
709 | uint8_t state; |
707 | 710 | ||
Line 708... | Line 711... | ||
708 | right = win->w; |
711 | right = win->w; |
- | 712 | bottom = win->h; |
|
- | 713 | ||
- | 714 | if(win->win_state != FULLSCREEN) |
|
709 | bottom = win->h-CAPTION_HEIGHT-PANEL_HEIGHT; |
715 | bottom-= CAPTION_HEIGHT+PANEL_HEIGHT; |
Line 710... | Line 716... | ||
710 | 716 | ||
711 | // printf("window width %d height %d\n", |
717 | // printf("window width %d height %d\n", |
Line 712... | Line 718... | ||
712 | // right, bottom); |
718 | // right, bottom); |
Line 722... | Line 728... | ||
722 | if( right == render->win_width && |
728 | if( right == render->win_width && |
723 | bottom == render->win_height) |
729 | bottom == render->win_height) |
724 | return; |
730 | return; |
Line -... | Line 731... | ||
- | 731 | ||
- | 732 | printf("%s r: %d b: %d\n", __FUNCTION__, right, bottom); |
|
725 | 733 | ||
726 | new_w = bottom*render->ctx_width/render->ctx_height; |
734 | new_w = bottom*render->ctx_width/render->ctx_height; |
Line 727... | Line 735... | ||
727 | new_h = right*render->ctx_height/render->ctx_width; |
735 | new_h = right*render->ctx_height/render->ctx_width; |
728 | 736 | ||
Line 736... | Line 744... | ||
736 | new_h = bottom; |
744 | new_h = bottom; |
737 | new_w = bottom*render->ctx_width/render->ctx_height; |
745 | new_w = bottom*render->ctx_width/render->ctx_height; |
738 | }; |
746 | }; |
739 | 747 | ||
Line 740... | Line 748... | ||
740 | render->win_width = win->w; |
748 | render->win_width = right; |
741 | render->win_height = win->h-CAPTION_HEIGHT-PANEL_HEIGHT; |
749 | render->win_height = bottom; |
742 | render_set_size(render, new_w, new_h); |
750 | render_set_size(render, new_w, new_h); |
Line 743... | Line 751... | ||
743 | 751 | ||
744 | if(render->caps & HW_TEX_BLIT) /* hw scaler */ |
752 | if(render->caps & HW_TEX_BLIT) /* hw scaler */ |
Line 813... | Line 821... | ||
813 | sws_scale(cvt_ctx, (const uint8_t* const *)picture->data, |
821 | sws_scale(cvt_ctx, (const uint8_t* const *)picture->data, |
814 | picture->linesize, 0, render->ctx_height, data, linesize); |
822 | picture->linesize, 0, render->ctx_height, data, linesize); |
815 | // printf("sws_scale\n"); |
823 | // printf("sws_scale\n"); |
Line -... | Line 824... | ||
- | 824 | ||
- | 825 | if(render->win->win_state == FULLSCREEN) |
|
- | 826 | blit_bitmap(bitmap,render->rcvideo.l,render->rcvideo.t, |
|
- | 827 | render->rcvideo.r, render->rcvideo.b); |
|
816 | 828 | else |
|
817 | blit_bitmap(bitmap, render->rcvideo.l, |
829 | blit_bitmap(bitmap, render->rcvideo.l, |
818 | CAPTION_HEIGHT+render->rcvideo.t, |
830 | CAPTION_HEIGHT+render->rcvideo.t, |
Line 819... | Line 831... | ||
819 | render->rcvideo.r, render->rcvideo.b); |
831 | render->rcvideo.r, render->rcvideo.b); |
Line 861... | Line 873... | ||
861 | 873 | ||
Line 862... | Line 874... | ||
862 | sws_scale(cvt_ctx, (const uint8_t* const *)picture->data, |
874 | sws_scale(cvt_ctx, (const uint8_t* const *)picture->data, |
863 | picture->linesize, 0, render->ctx_height, data, linesize); |
875 | picture->linesize, 0, render->ctx_height, data, linesize); |
Line -... | Line 876... | ||
- | 876 | ||
- | 877 | if(render->win->win_state == FULLSCREEN) |
|
- | 878 | blit_bitmap(&render->bitmap[0],render->rcvideo.l,render->rcvideo.t, |
|
- | 879 | render->rcvideo.r, render->rcvideo.b); |
|
864 | 880 | else |
|
865 | blit_bitmap(&render->bitmap[0], render->rcvideo.l, |
881 | blit_bitmap(&render->bitmap[0], render->rcvideo.l, |
866 | render->rcvideo.t+CAPTION_HEIGHT, |
882 | CAPTION_HEIGHT+render->rcvideo.t, |
- | 883 | render->rcvideo.r, render->rcvideo.b); |
|
867 | render->rcvideo.r, render->rcvideo.b); |
884 | |
868 | render->last_bitmap = &render->bitmap[0]; |
885 | render->last_bitmap = &render->bitmap[0]; |
Line 869... | Line 886... | ||
869 | } |
886 | } |
870 | 887 | ||
- | 888 | void render_draw_client(render_t *render) |
|
- | 889 | { |
|
871 | void render_draw_client(render_t *render) |
890 | int y; |
872 | { |
891 | |
873 | if(render->win_state == MINIMIZED || |
892 | if(render->win_state == MINIMIZED || |
- | 893 | render->win_state == ROLLED ) |
|
- | 894 | return; |
|
- | 895 | if(render->win_state == FULLSCREEN) |
|
- | 896 | y = 0; |
|
Line 874... | Line 897... | ||
874 | render->win_state == ROLLED) |
897 | else |
875 | return; |
898 | y = CAPTION_HEIGHT; |
876 | 899 | ||
877 | if(player_state == PAUSE) |
900 | if(player_state == PAUSE) |
878 | { |
901 | { |
879 | if(frames[vfx].ready == 1 ) |
902 | if(frames[vfx].ready == 1 ) |
880 | main_render->draw(main_render, &frames[vfx].picture); |
903 | main_render->draw(main_render, &frames[vfx].picture); |
881 | else |
904 | else |
882 | draw_bar(0, CAPTION_HEIGHT, render->win_width, |
905 | draw_bar(0, y, render->win_width, |
883 | render->rcvideo.b, 0); |
906 | render->rcvideo.b, 0); |
884 | } |
907 | } |
885 | else if( player_state == STOP ) |
908 | else if( player_state == STOP ) |
886 | { |
909 | { |
Line 887... | Line 910... | ||
887 | draw_bar(0, CAPTION_HEIGHT, render->win_width, |
910 | draw_bar(0,y, render->win_width, |
888 | render->rcvideo.b, 0); |
911 | render->rcvideo.b, 0); |
889 | }; |
912 | }; |
890 | 913 | ||
891 | if(render->layout & HAS_TOP) |
914 | if(render->layout & HAS_TOP) |
892 | draw_bar(0, CAPTION_HEIGHT, render->win_width, |
915 | draw_bar(0, y, render->win_width, |
893 | render->rctop.b, 0); |
916 | render->rctop.b, 0); |
894 | if(render->layout & HAS_LEFT) |
917 | if(render->layout & HAS_LEFT) |
895 | draw_bar(0, render->rcvideo.t+CAPTION_HEIGHT, render->rcleft.r, |
918 | draw_bar(0, render->rcvideo.t+y, render->rcleft.r, |
896 | render->rcvideo.b, 0); |
919 | render->rcvideo.b, 0); |
897 | if(render->layout & HAS_RIGHT) |
920 | if(render->layout & HAS_RIGHT) |
898 | draw_bar(render->rcright.l, render->rcvideo.t+CAPTION_HEIGHT, |
921 | draw_bar(render->rcright.l, render->rcvideo.t+y, |
899 | render->rcright.r, render->rcvideo.b, 0); |
922 | render->rcright.r, render->rcvideo.b, 0); |