Changeset 3590
- Timestamp:
- Jun 20, 2011 6:16:08 AM (13 years ago)
- Location:
- pjproject/branches/projects/2.0-dev/pjmedia
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjmedia/include/pjmedia-videodev/videodev.h
r3579 r3590 110 110 */ 111 111 PJMEDIA_VID_DEV_CAP_OUTPUT_RESIZE = 8, 112 113 /** 114 * Support for setting the video window's position. 115 * Value is pjmedia_coord specifying the window's new coordinate. 116 */ 117 PJMEDIA_VID_DEV_CAP_OUTPUT_POSITION = 16, 118 119 /** 120 * Support for setting the video output's visibility. 121 * The value of this capability is a pj_bool_t containing boolean 122 * PJ_TRUE or PJ_FALSE. 123 */ 124 PJMEDIA_VID_DEV_CAP_OUTPUT_HIDE = 32, 112 125 113 126 /** … … 299 312 pjmedia_rect_size disp_size; 300 313 314 /** 315 * Video window position. This setting is optional, and will only be used 316 * if PJMEDIA_VID_DEV_CAP_OUTPUT_POSITION is set in the flags. 317 */ 318 pjmedia_coord window_pos; 319 320 /** 321 * Video window's visibility. This setting is optional, and will only be 322 * used if PJMEDIA_VID_DEV_CAP_OUTPUT_HIDE is set in the flags. 323 */ 324 pj_bool_t window_hide; 325 301 326 } pjmedia_vid_param; 302 327 -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev/sdl_dev.c
r3580 r3590 1051 1051 goto on_error; 1052 1052 } 1053 1054 pjmedia_format_copy(&strm->conv_param.src, ¶m->fmt);1055 pjmedia_format_copy(&strm->conv_param.dst, ¶m->fmt);1056 /*1057 status = pjmedia_converter_create(NULL, pool, &strm->conv_param,1058 &strm->conv);1059 */1060 1053 } 1061 1054 1062 1055 /* Apply the remaining settings */ 1063 if (param->flags & PJMEDIA_VID_DEV_CAP_OUTPUT_ WINDOW) {1056 if (param->flags & PJMEDIA_VID_DEV_CAP_OUTPUT_POSITION) { 1064 1057 sdl_stream_set_cap(&strm->base, 1065 PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW, 1066 ¶m->window); 1058 PJMEDIA_VID_DEV_CAP_OUTPUT_POSITION, 1059 ¶m->window_pos); 1060 } 1061 if (param->flags & PJMEDIA_VID_DEV_CAP_OUTPUT_HIDE) { 1062 sdl_stream_set_cap(&strm->base, 1063 PJMEDIA_VID_DEV_CAP_OUTPUT_HIDE, 1064 ¶m->window_hide); 1067 1065 } 1068 1066 … … 1111 1109 if (cap == PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW) 1112 1110 { 1111 pval = strm->window; 1113 1112 return PJ_SUCCESS; 1114 } else if (cap == PJMEDIA_VID_DEV_CAP_FORMAT) { 1113 } else if (cap == PJMEDIA_VID_DEV_CAP_OUTPUT_POSITION) { 1114 SDL_GetWindowPosition(strm->window, &((pjmedia_coord *)pval)->x, 1115 &((pjmedia_coord *)pval)->y); 1115 1116 return PJ_SUCCESS; 1116 1117 } else { … … 1130 1131 PJ_ASSERT_RETURN(s && pval, PJ_EINVAL); 1131 1132 1132 if (cap == PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW) { 1133 if (cap == PJMEDIA_VID_DEV_CAP_OUTPUT_POSITION) { 1134 SDL_SetWindowPosition(strm->window, ((pjmedia_coord *)pval)->x, 1135 ((pjmedia_coord *)pval)->y); 1136 return PJ_SUCCESS; 1137 } else if (cap == PJMEDIA_VID_DEV_CAP_OUTPUT_HIDE) { 1138 if (*(pj_bool_t *)pval) 1139 SDL_HideWindow(strm->window); 1140 else 1141 SDL_ShowWindow(strm->window); 1133 1142 return PJ_SUCCESS; 1134 1143 } else if (cap == PJMEDIA_VID_DEV_CAP_FORMAT) {
Note: See TracChangeset
for help on using the changeset viewer.