Ignore:
Timestamp:
Jul 13, 2011 8:51:10 AM (13 years ago)
Author:
nanang
Message:

Re #1263:

  • Renamed API pjsua_call_set_vid_out() with pjsua_call_set_vid_strm().
  • Implemented initial version of the function, features covered:
    • add, remove video media stream during the call
    • change which device to use during the call
    • start/stop video stream transmission
File:
1 edited

Legend:

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

    r3632 r3634  
    14521452            cur_acc->vid_in_auto_show = PJ_TRUE; 
    14531453            cur_acc->vid_out_auto_transmit = PJ_TRUE; 
    1454             PJ_TODO(implement_pjsua_option_for_vid_auto_show_transmit); 
     1454            PJ_TODO(implement_pjsua_option_for_vid_auto_show_and_transmit); 
    14551455            break; 
    14561456        case OPT_EXTRA_AUDIO: 
     
    33163316    puts("| vid call rx on|off        Enable/disable incoming video for current call    |"); 
    33173317    puts("| vid call tx on|off        Enable/disable video tx for current call          |"); 
     3318    puts("| vid call add              Add video stream for current call                 |"); 
     3319    puts("| vid call remove [idx]     Remove video stream #idx for current call         |"); 
    33183320    puts("| vid dev list              List all video devices                            |"); 
    33193321    puts("| vid dev refresh           Refresh video device list                         |"); 
     
    37543756        vid_show_help(); 
    37553757    } else if (strcmp(argv[1], "call")==0) { 
     3758        pjsua_call_vid_strm_op_param param; 
    37563759        pj_bool_t tx = (strcmp(argv[2], "tx") == 0); 
    3757         pj_bool_t on = (strcmp(argv[3], "on") == 0); 
    3758  
     3760        if (tx) { 
     3761            pj_bool_t on = (strcmp(argv[3], "on") == 0); 
     3762        } 
     3763 
     3764        if (strcmp(argv[2], "add")==0) { 
     3765            pjsua_call_set_vid_strm(current_call, PJSUA_CALL_VID_STRM_ADD, NULL); 
     3766        } 
     3767        if (strcmp(argv[2], "remove")==0) { 
     3768            param.med_idx = argc >= 4? atoi(argv[3]) : -1; 
     3769            pjsua_call_set_vid_strm(current_call, PJSUA_CALL_VID_STRM_REMOVE, &param); 
     3770        } 
    37593771        PJ_TODO(vid_enable_disable_video_on_call); 
    37603772        PJ_LOG(1,(THIS_FILE, "Not implemented")); 
Note: See TracChangeset for help on using the changeset viewer.