- Timestamp:
- Feb 27, 2009 5:37:35 PM (16 years ago)
- Location:
- pjproject/branches/projects/aps-direct
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/aps-direct/pjsip-apps/src/symbian_ua/ua.cpp
r2475 r2480 491 491 " a Answer call\n" 492 492 " g Hangup all calls\n" 493 #if PJMEDIA_SOUND_IMPLEMENTATION == PJMEDIA_SOUND_SYMB_APS_SOUND 494 " t Switch audio route\n" 495 #endif 493 " t Toggle audio route\n" 496 494 #if !defined(PJMEDIA_CONF_USE_SWITCH_BOARD) || PJMEDIA_CONF_USE_SWITCH_BOARD==0 497 " j Start/stop loopback audio device\n"495 " j Toggle loopback audio\n" 498 496 #endif 499 497 " s Subscribe " SIP_DST_URI "\n" … … 523 521 switch (kc) { 524 522 525 # if 0 && PJMEDIA_SOUND_IMPLEMENTATION == PJMEDIA_SOUND_SYMB_APS_SOUND526 523 case 't': 527 do { 528 static pjmedia_snd_route route = PJMEDIA_AUD_DEV_ROUTE_DEFAULT; 529 530 if (route == PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER) 531 route = PJMEDIA_AUD_DEV_ROUTE_EARPIECE; 532 else 533 route = PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER; 534 535 pjsua_set_snd_route(route); 536 } while(0); 524 { 525 pjmedia_aud_stream *aud_stream = pjsua_get_aud_stream(); 526 527 if (aud_stream) { 528 pjmedia_aud_dev_route route; 529 pj_status_t status; 530 531 status = pjmedia_aud_stream_get_cap( 532 aud_stream, 533 PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE, 534 &route); 535 if (status == PJ_SUCCESS) { 536 if (route == PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER) 537 route = PJMEDIA_AUD_DEV_ROUTE_EARPIECE; 538 else 539 route = PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER; 540 541 status = pjmedia_aud_stream_set_cap( 542 aud_stream, 543 PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE, 544 &route); 545 } 546 547 if (status != PJ_SUCCESS) 548 pjsua_perror(THIS_FILE, "Error switch audio route", status); 549 } else { 550 PJ_LOG(3,(THIS_FILE, "No active sound device.")); 551 } 552 } 537 553 break; 538 # endif539 554 540 555 case 'j': 541 do{556 { 542 557 static pj_bool_t loopback_active = PJ_FALSE; 543 558 if (!loopback_active) … … 546 561 pjsua_conf_disconnect(0, 0); 547 562 loopback_active = !loopback_active; 548 } while (0);563 } 549 564 break; 550 565 -
pjproject/branches/projects/aps-direct/pjsip/include/pjsua-lib/pjsua.h
r2468 r2480 4944 4944 4945 4945 4946 /** 4947 * Get active audio device stream instance. 4948 * 4949 * @return Audio device stream instance if any, otherwise 4950 * NULL will be returned. 4951 */ 4952 PJ_DECL(pjmedia_aud_stream*) pjsua_get_aud_stream(); 4953 4954 4946 4955 /***************************************************************************** 4947 4956 * Codecs. -
pjproject/branches/projects/aps-direct/pjsip/src/pjsua-lib/pjsua_media.c
r2469 r2480 2652 2652 2653 2653 2654 /* 2655 * Get active sound port instance. 2656 */ 2657 PJ_DEF(pjmedia_aud_stream*) pjsua_get_aud_stream() 2658 { 2659 pjmedia_aud_stream *aud_stream = NULL; 2660 2661 if (pjsua_var.snd_port) 2662 aud_stream = pjmedia_snd_port_get_snd_stream(pjsua_var.snd_port); 2663 2664 return aud_stream; 2665 } 2666 2667 2654 2668 /***************************************************************************** 2655 2669 * Codecs.
Note: See TracChangeset
for help on using the changeset viewer.