Changeset 875:df84c755d2d3 in mediastreamer2
- Timestamp:
- Feb 8, 2010 6:13:21 PM (3 years ago)
- Branch:
- default
- Children:
- 876:90fbe2af7437, 878:192a99c1b51e, 884:599504ee6fa1
- Files:
-
- 2 edited
-
include/mediastreamer2/msvideoout.h (modified) (2 diffs)
-
src/videoout.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
include/mediastreamer2/msvideoout.h
r869 r875 43 43 void (*lock)(struct _MSDisplay *);/*lock before writing to the framebuffer*/ 44 44 void (*unlock)(struct _MSDisplay *);/*unlock after writing to the framebuffer*/ 45 void (*update)(struct _MSDisplay * ); /*display the picture to the screen*/45 void (*update)(struct _MSDisplay *, int new_image, int new_selfview); /*display the picture to the screen*/ 46 46 void (*uninit)(struct _MSDisplay *); 47 47 bool_t (*pollevent)(struct _MSDisplay *, MSDisplayEvent *ev); … … 60 60 #define ms_display_lock(d) if ((d)->desc->lock) (d)->desc->lock(d) 61 61 #define ms_display_unlock(d) if ((d)->desc->unlock) (d)->desc->unlock(d) 62 #define ms_display_update(d) if ((d)->desc->update) (d)->desc->update(d) 62 #define ms_display_update(d, A, B) if ((d)->desc->update) (d)->desc->update(d, A, B) 63 63 64 bool_t ms_display_poll_event(MSDisplay *d, MSDisplayEvent *ev); 64 65 -
src/videoout.c
r869 r875 201 201 } 202 202 203 static void sdl_display_update(MSDisplay *obj ){203 static void sdl_display_update(MSDisplay *obj, int new_image, int new_selfview){ 204 204 SdlDisplay *wd = (SdlDisplay*)obj->data; 205 205 SDL_Rect rect; … … 531 531 } 532 532 533 static void win_display_update(MSDisplay *obj ){533 static void win_display_update(MSDisplay *obj, int new_image, int new_selfview){ 534 534 WinDisplay *wd=(WinDisplay*)obj->data; 535 535 HDC hdc; … … 555 555 return; 556 556 } 557 yuv420p_to_rgb(wd, &wd->fb, wd->rgb); 557 if (new_image>0) 558 yuv420p_to_rgb(wd, &wd->fb, wd->rgb); 558 559 memset(&bi,0,sizeof(bi)); 559 560 bi.biSize=sizeof(bi); … … 656 657 int x_sv; 657 658 int y_sv; 658 yuv420p_to_rgb_selfview(wd, &wd->fb_selfview, wd->rgb_selfview); 659 if (new_selfview>0) 660 yuv420p_to_rgb_selfview(wd, &wd->fb_selfview, wd->rgb_selfview); 659 661 660 662 //HPEN hpenDot; … … 709 711 reduce(&ratiow, &ratioh); 710 712 711 yuv420p_to_rgb_selfview(wd, &wd->fb_selfview, wd->rgb_selfview); 713 if (new_selfview>0) 714 yuv420p_to_rgb_selfview(wd, &wd->fb_selfview, wd->rgb_selfview); 712 715 if (w_selfview >= w/sv_scalefactor) 713 716 { … … 1024 1027 VideoOut *obj=(VideoOut*)f->data; 1025 1028 mblk_t *inm; 1029 int update=0; 1030 int update_selfview=0; 1026 1031 1027 1032 ms_filter_lock(f); … … 1058 1063 if (!mblk_get_precious_flag(inm)) yuv_buf_mirror(&obj->fbuf_selfview); 1059 1064 ms_display_unlock(obj->display); 1065 update_selfview=1; 1060 1066 } 1061 1067 }else{ … … 1079 1085 } 1080 1086 if (!mblk_get_precious_flag(inm)) yuv_buf_mirror(&obj->local_pic); 1087 update=1; 1081 1088 } 1082 1089 } … … 1123 1130 ms_display_unlock(obj->display); 1124 1131 } 1132 update=1; 1125 1133 ms_queue_flush(f->inputs[0]); 1126 1134 } … … 1144 1152 } 1145 1153 1146 ms_display_update(obj->display );1154 ms_display_update(obj->display, update, update_selfview); 1147 1155 ms_filter_unlock(f); 1148 1156 }
Note: See TracChangeset
for help on using the changeset viewer.
