Changeset 3864 for pjproject/trunk/pjmedia/src/pjmedia-videodev/sdl_dev.c
- Timestamp:
- Oct 26, 2011 9:01:53 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-videodev/sdl_dev.c
r3794 r3864 494 494 PJMEDIA_VID_DEV_CAP_OUTPUT_RESIZE; 495 495 ddi->info.caps |= PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW; 496 ddi->info.caps |= PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW_FLAGS; 496 497 497 498 for (j = 0; j < ddi->info.fmt_cnt; j++) { … … 700 701 701 702 if (!strm->window) { 702 Uint32 flags = /*SDL_WINDOW_RESIZABLE; */ SDL_WINDOW_BORDERLESS; 703 Uint32 flags = 0; 704 705 if (strm->param.flags & PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW_FLAGS) { 706 if (!(strm->param.window_flags & PJMEDIA_VID_DEV_WND_BORDER)) 707 flags |= SDL_WINDOW_BORDERLESS; 708 if (strm->param.window_flags & PJMEDIA_VID_DEV_WND_RESIZABLE) 709 flags |= SDL_WINDOW_RESIZABLE; 710 } else { 711 flags |= SDL_WINDOW_BORDERLESS; 712 } 703 713 704 714 if (!((strm->param.flags & PJMEDIA_VID_DEV_CAP_OUTPUT_HIDE) && … … 971 981 { 972 982 pi->flags |= PJMEDIA_VID_DEV_CAP_OUTPUT_HIDE; 983 } 984 if (sdl_stream_get_cap(s, PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW_FLAGS, 985 &pi->window_flags) == PJ_SUCCESS) 986 { 987 pi->flags |= PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW_FLAGS; 973 988 } 974 989 … … 1038 1053 } else if (cap == PJMEDIA_VID_DEV_CAP_OUTPUT_HIDE) { 1039 1054 Uint32 flag = SDL_GetWindowFlags(strm->window); 1040 *((pj_bool_t *)pval) = (flag | SDL_WINDOW_HIDDEN)? PJ_TRUE: PJ_FALSE; 1055 *((pj_bool_t *)pval) = (flag & SDL_WINDOW_HIDDEN)? PJ_TRUE: PJ_FALSE; 1056 return PJ_SUCCESS; 1057 } else if (cap == PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW_FLAGS) { 1058 Uint32 flag = SDL_GetWindowFlags(strm->window); 1059 unsigned *wnd_flags = (unsigned *)pval; 1060 if (!(flag & SDL_WINDOW_BORDERLESS)) 1061 *wnd_flags |= PJMEDIA_VID_DEV_WND_BORDER; 1062 if (flag & SDL_WINDOW_RESIZABLE) 1063 *wnd_flags |= PJMEDIA_VID_DEV_WND_RESIZABLE; 1041 1064 return PJ_SUCCESS; 1042 1065 }
Note: See TracChangeset
for help on using the changeset viewer.