Changeset 3626
- Timestamp:
- Jul 12, 2011 10:29:46 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev/sdl_dev.c
r3621 r3626 1084 1084 pj_memcpy(pi, &strm->param, sizeof(*pi)); 1085 1085 1086 /*1087 1086 if (sdl_stream_get_cap(s, PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW, 1088 &pi-> fmt.info_size) == PJ_SUCCESS)1087 &pi->window) == PJ_SUCCESS) 1089 1088 { 1090 1089 pi->flags |= PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW; 1091 1090 } 1092 */ 1091 if (sdl_stream_get_cap(s, PJMEDIA_VID_DEV_CAP_OUTPUT_POSITION, 1092 &pi->window_pos) == PJ_SUCCESS) 1093 { 1094 pi->flags |= PJMEDIA_VID_DEV_CAP_OUTPUT_POSITION; 1095 } 1096 if (sdl_stream_get_cap(s, PJMEDIA_VID_DEV_CAP_OUTPUT_RESIZE, 1097 &pi->disp_size) == PJ_SUCCESS) 1098 { 1099 pi->flags |= PJMEDIA_VID_DEV_CAP_OUTPUT_RESIZE; 1100 } 1101 if (sdl_stream_get_cap(s, PJMEDIA_VID_DEV_CAP_OUTPUT_HIDE, 1102 &pi->window_hide) == PJ_SUCCESS) 1103 { 1104 pi->flags |= PJMEDIA_VID_DEV_CAP_OUTPUT_HIDE; 1105 } 1106 1093 1107 return PJ_SUCCESS; 1094 1108 } … … 1108 1122 if (cap == PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW) 1109 1123 { 1110 pval= strm->window;1124 *((void **)pval) = strm->window; 1111 1125 return PJ_SUCCESS; 1112 1126 } else if (cap == PJMEDIA_VID_DEV_CAP_OUTPUT_POSITION) { 1113 1127 SDL_GetWindowPosition(strm->window, &((pjmedia_coord *)pval)->x, 1114 1128 &((pjmedia_coord *)pval)->y); 1129 return PJ_SUCCESS; 1130 } else if (cap == PJMEDIA_VID_DEV_CAP_OUTPUT_RESIZE) { 1131 SDL_GetWindowSize(strm->window, (int *)&((pjmedia_rect_size *)pval)->w, 1132 (int *)&((pjmedia_rect_size *)pval)->h); 1133 return PJ_SUCCESS; 1134 } else if (cap == PJMEDIA_VID_DEV_CAP_OUTPUT_HIDE) { 1135 Uint32 flag = SDL_GetWindowFlags(strm->window); 1136 *((pj_bool_t *)pval) = (flag | SDL_WINDOW_HIDDEN)? PJ_TRUE: PJ_FALSE; 1115 1137 return PJ_SUCCESS; 1116 1138 }
Note: See TracChangeset
for help on using the changeset viewer.