Ignore:
Timestamp:
Jul 13, 2011 1:31:08 PM (13 years ago)
Author:
nanang
Message:

Re #1263:

  • Break down the operation type PJSUA_CALL_VID_STRM_MODIFY into PJSUA_CALL_VID_STRM_ENABLE, PJSUA_CALL_VID_STRM_DISABLE, PJSUA_CALL_VID_STRM_CHANGE_CAP_DEV.
  • Implemented video stream re-enabling (PJSUA_CALL_VID_STRM_ENABLE).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/2.0-dev/pjsip-apps/src/pjsua/pjsua_app.c

    r3634 r3636  
    33173317    puts("| vid call tx on|off        Enable/disable video tx for current call          |"); 
    33183318    puts("| vid call add              Add video stream for current call                 |"); 
    3319     puts("| vid call remove [idx]     Remove video stream #idx 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             |"); 
    33203321    puts("| vid dev list              List all video devices                            |"); 
    33213322    puts("| vid dev refresh           Refresh video device list                         |"); 
     
    37573758    } else if (strcmp(argv[1], "call")==0) { 
    37583759        pjsua_call_vid_strm_op_param param; 
    3759         pj_bool_t tx = (strcmp(argv[2], "tx") == 0); 
    3760         if (tx) { 
     3760 
     3761        if (strcmp(argv[2], "rx")==0) { 
    37613762            pj_bool_t on = (strcmp(argv[3], "on") == 0); 
    3762         } 
    3763  
    3764         if (strcmp(argv[2], "add")==0) { 
     3763            PJ_TODO(vid_enable_disable_video_RX_on_call); 
     3764            PJ_LOG(1,(THIS_FILE, "Not implemented")); 
     3765        } 
     3766        else if (strcmp(argv[2], "tx")==0) { 
     3767            pj_bool_t on = (strcmp(argv[3], "on") == 0); 
     3768            pjsua_call_vid_strm_op op = on? PJSUA_CALL_VID_STRM_START_TRANSMIT : 
     3769                                            PJSUA_CALL_VID_STRM_STOP_TRANSMIT; 
     3770            pjsua_call_set_vid_strm(current_call, op, NULL); 
     3771        } 
     3772        else if (strcmp(argv[2], "add")==0) { 
    37653773            pjsua_call_set_vid_strm(current_call, PJSUA_CALL_VID_STRM_ADD, NULL); 
    37663774        } 
    3767         if (strcmp(argv[2], "remove")==0) { 
     3775        else if (strcmp(argv[2], "disable")==0 || strcmp(argv[2], "enable")==0) { 
     3776            pj_bool_t enable = (strcmp(argv[2], "enable") == 0); 
     3777            pjsua_call_vid_strm_op op = enable? PJSUA_CALL_VID_STRM_ENABLE : 
     3778                                                PJSUA_CALL_VID_STRM_DISABLE; 
    37683779            param.med_idx = argc >= 4? atoi(argv[3]) : -1; 
    3769             pjsua_call_set_vid_strm(current_call, PJSUA_CALL_VID_STRM_REMOVE, &param); 
    3770         } 
    3771         PJ_TODO(vid_enable_disable_video_on_call); 
    3772         PJ_LOG(1,(THIS_FILE, "Not implemented")); 
     3780            pjsua_call_set_vid_strm(current_call, op, &param); 
     3781        } 
     3782        else if (strcmp(argv[2], "set-cap-dev")==0) { 
     3783            param.med_idx = argc >= 4? atoi(argv[3]) : -1; 
     3784            param.cap_dev = argc >= 5? atoi(argv[4]) : PJMEDIA_VID_DEFAULT_CAPTURE_DEV; 
     3785            pjsua_call_set_vid_strm(current_call, PJSUA_CALL_VID_STRM_CHANGE_CAP_DEV, &param); 
     3786        } 
    37733787    } else if (strcmp(argv[1], "dev")==0) { 
    37743788        if (strcmp(argv[2], "list")==0) { 
Note: See TracChangeset for help on using the changeset viewer.