- Timestamp:
- Jun 20, 2011 6:16:08 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.