Ignore:
Timestamp:
Dec 26, 2006 3:05:17 AM (14 years ago)
Author:
bennylp
Message:

(Ticket #52) Added functions to retrieve media port of player and recorder in PJSUA-API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c

    r864 r865  
    785785} 
    786786 
     787/* 
     788 * Get the media port for the player. 
     789 */ 
     790PJ_DEF(pj_status_t) pjsua_player_get_port( pjsua_recorder_id id, 
     791                                           pjmedia_port **p_port) 
     792{ 
     793    PJ_ASSERT_RETURN(id>=0 && id<PJ_ARRAY_SIZE(pjsua_var.player), PJ_EINVAL); 
     794    PJ_ASSERT_RETURN(pjsua_var.player[id].port != NULL, PJ_EINVAL); 
     795    PJ_ASSERT_RETURN(p_port != NULL, PJ_EINVAL); 
     796     
     797    *p_port = pjsua_var.player[id].port; 
     798 
     799    return PJ_SUCCESS; 
     800} 
    787801 
    788802/* 
     
    953967} 
    954968 
     969/* 
     970 * Get the media port for the recorder. 
     971 */ 
     972PJ_DEF(pj_status_t) pjsua_recorder_get_port( pjsua_recorder_id id, 
     973                                             pjmedia_port **p_port) 
     974{ 
     975    PJ_ASSERT_RETURN(id>=0 && id<PJ_ARRAY_SIZE(pjsua_var.recorder), PJ_EINVAL); 
     976    PJ_ASSERT_RETURN(pjsua_var.recorder[id].port != NULL, PJ_EINVAL); 
     977    PJ_ASSERT_RETURN(p_port != NULL, PJ_EINVAL); 
     978 
     979    *p_port = pjsua_var.recorder[id].port; 
     980    return PJ_SUCCESS; 
     981} 
    955982 
    956983/* 
Note: See TracChangeset for help on using the changeset viewer.