- Timestamp:
- Jul 14, 2011 2:14:25 AM (13 years ago)
- Location:
- pjproject/branches/projects/2.0-dev
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjsip-apps/src/pjsua/pjsua_app.c
r3636 r3637 3317 3317 puts("| vid call tx on|off Enable/disable video tx for current call |"); 3318 3318 puts("| vid call add Add video stream for current call |"); 3319 puts("| vid call remove N Remove video stream #N for current call|");3320 puts("| vid call modify N CAP Modify capture dev of video stream #N|");3319 puts("| vid call enable/disable N Enable/disable stream #N for current call |"); 3320 puts("| vid call set-cap N ID Set capture dev ID for stream #N for current call |"); 3321 3321 puts("| vid dev list List all video devices |"); 3322 3322 puts("| vid dev refresh Refresh video device list |"); … … 3759 3759 pjsua_call_vid_strm_op_param param; 3760 3760 3761 if ( strcmp(argv[2], "rx")==0) {3761 if (argc == 4 && strcmp(argv[2], "rx")==0) { 3762 3762 pj_bool_t on = (strcmp(argv[3], "on") == 0); 3763 3763 PJ_TODO(vid_enable_disable_video_RX_on_call); 3764 3764 PJ_LOG(1,(THIS_FILE, "Not implemented")); 3765 3765 } 3766 else if ( strcmp(argv[2], "tx")==0) {3766 else if (argc == 4 && strcmp(argv[2], "tx")==0) { 3767 3767 pj_bool_t on = (strcmp(argv[3], "on") == 0); 3768 3768 pjsua_call_vid_strm_op op = on? PJSUA_CALL_VID_STRM_START_TRANSMIT : … … 3770 3770 pjsua_call_set_vid_strm(current_call, op, NULL); 3771 3771 } 3772 else if ( strcmp(argv[2], "add")==0) {3772 else if (argc == 3 && strcmp(argv[2], "add")==0) { 3773 3773 pjsua_call_set_vid_strm(current_call, PJSUA_CALL_VID_STRM_ADD, NULL); 3774 3774 } 3775 else if (strcmp(argv[2], "disable")==0 || strcmp(argv[2], "enable")==0) { 3775 else if (argc == 4 && 3776 (strcmp(argv[2], "disable")==0 || strcmp(argv[2], "enable")==0)) 3777 { 3776 3778 pj_bool_t enable = (strcmp(argv[2], "enable") == 0); 3777 3779 pjsua_call_vid_strm_op op = enable? PJSUA_CALL_VID_STRM_ENABLE : … … 3780 3782 pjsua_call_set_vid_strm(current_call, op, ¶m); 3781 3783 } 3782 else if ( strcmp(argv[2], "set-cap-dev")==0) {3784 else if (argc == 5 && strcmp(argv[2], "set-cap")==0) { 3783 3785 param.med_idx = argc >= 4? atoi(argv[3]) : -1; 3784 3786 param.cap_dev = argc >= 5? atoi(argv[4]) : PJMEDIA_VID_DEFAULT_CAPTURE_DEV; 3785 3787 pjsua_call_set_vid_strm(current_call, PJSUA_CALL_VID_STRM_CHANGE_CAP_DEV, ¶m); 3786 } 3788 } else 3789 goto on_error; 3787 3790 } else if (strcmp(argv[1], "dev")==0) { 3788 3791 if (strcmp(argv[2], "list")==0) { -
pjproject/branches/projects/2.0-dev/pjsip/src/pjsua-lib/pjsua_vid.c
r3636 r3637 335 335 if (show) { 336 336 pjmedia_vid_dev_stream *rdr; 337 pj_bool_t hide = PJ_FALSE; 337 338 338 339 rdr = pjmedia_vid_port_get_stream(pjsua_var.win[wid].vp_rend); … … 341 342 rdr, 342 343 PJMEDIA_VID_DEV_CAP_OUTPUT_HIDE, 343 & show);344 &hide); 344 345 } 345 346 … … 926 927 pjsua_vid_win *w; 927 928 pjmedia_vid_dev_stream *s; 929 pj_bool_t hide; 928 930 pj_status_t status; 929 931 … … 943 945 } 944 946 947 hide = !show; 945 948 status = pjmedia_vid_dev_stream_set_cap(s, 946 PJMEDIA_VID_DEV_CAP_OUTPUT_HIDE, & show);949 PJMEDIA_VID_DEV_CAP_OUTPUT_HIDE, &hide); 947 950 948 951 PJSUA_UNLOCK(); … … 1239 1242 if (status != PJ_SUCCESS) 1240 1243 goto on_error; 1241 1242 call_med->tp_st = PJSUA_MED_TP_INIT;1243 1244 1244 1245 /* Get transport address info */
Note: See TracChangeset
for help on using the changeset viewer.