Changeset 865 for pjproject


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

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

Location:
pjproject/trunk/pjsip
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r864 r865  
    27082708PJ_DECL(pjsua_conf_port_id) pjsua_player_get_conf_port(pjsua_player_id id); 
    27092709 
     2710 
     2711/** 
     2712 * Get the media port for the player. 
     2713 * 
     2714 * @param id            The player ID. 
     2715 * @param p_port        The media port associated with the player. 
     2716 * 
     2717 * @return              PJ_SUCCESS on success. 
     2718 */ 
     2719PJ_DECL(pj_status_t) pjsua_player_get_port(pjsua_recorder_id id, 
     2720                                           pjmedia_port **p_port); 
    27102721 
    27112722/** 
     
    27812792 
    27822793/** 
     2794 * Get the media port for the recorder. 
     2795 * 
     2796 * @param id            The recorder ID. 
     2797 * @param p_port        The media port associated with the recorder. 
     2798 * 
     2799 * @return              PJ_SUCCESS on success. 
     2800 */ 
     2801PJ_DECL(pj_status_t) pjsua_recorder_get_port(pjsua_recorder_id id, 
     2802                                             pjmedia_port **p_port); 
     2803 
     2804 
     2805/** 
    27832806 * Destroy recorder (this will complete recording). 
    27842807 * 
  • 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.