Changeset 5118 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_vid.c
- Timestamp:
- Jun 25, 2015 8:17:52 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_vid.c
r5098 r5118 33 33 34 34 35 static pjsua_vid_win_id vid_preview_get_win(pjmedia_vid_dev_index id, 36 pj_bool_t running_only); 35 37 static void free_vid_win(pjsua_vid_win_id wid); 36 38 … … 212 214 { 213 215 return pjmedia_vid_dev_get_info(id, vdi); 216 } 217 218 /* 219 * Check whether the video device is currently active. 220 */ 221 PJ_DEF(pj_bool_t) pjsua_vid_dev_is_active(pjmedia_vid_dev_index id) 222 { 223 pjsua_vid_win_id wid = vid_preview_get_win(id, PJ_FALSE); 224 225 return (wid != PJSUA_INVALID_ID? PJ_TRUE: PJ_FALSE); 226 } 227 228 /* 229 * Set the orientation of the video device. 230 */ 231 PJ_DEF(pj_status_t) pjsua_vid_dev_set_orient( pjmedia_vid_dev_index id, 232 pjmedia_orient orient) 233 { 234 pjsua_vid_win *w; 235 pjmedia_vid_dev_stream *cap_dev; 236 pjsua_vid_win_id wid = vid_preview_get_win(id, PJ_FALSE); 237 238 if (wid == PJSUA_INVALID_ID) { 239 PJ_LOG(3, (THIS_FILE, "Unable to set orientation for video dev %d: " 240 "device not active", id)); 241 return PJ_ENOTFOUND; 242 } 243 244 w = &pjsua_var.win[wid]; 245 246 cap_dev = pjmedia_vid_port_get_stream(w->vp_cap); 247 248 return pjmedia_vid_dev_stream_set_cap(cap_dev, 249 PJMEDIA_VID_DEV_CAP_ORIENTATION, 250 &orient); 214 251 } 215 252
Note: See TracChangeset
for help on using the changeset viewer.