Changeset 2259


Ignore:
Timestamp:
Sep 2, 2008 11:25:07 AM (16 years ago)
Author:
bennylp
Message:

Ticket #608: Added API to retrieve media transport and session from pjsua call

Location:
pjproject/trunk/pjsip
Files:
2 edited

Legend:

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

    r2196 r2259  
    29362936 
    29372937/** 
     2938 * Retrieve the media session associated with this call. Note that the media 
     2939 * session may not be available depending on the current call's media status 
     2940 * (the pjsua_call_media_status information in pjsua_call_info). Application 
     2941 * may use the media session to retrieve more detailed information about the 
     2942 * call's media. 
     2943 * 
     2944 * @param call_id       Call identification. 
     2945 * 
     2946 * @return              Call media session. 
     2947 */ 
     2948PJ_DECL(pjmedia_session*) pjsua_call_get_media_session(pjsua_call_id call_id); 
     2949 
     2950 
     2951/** 
     2952 * Retrieve the media transport instance that is used for this call.  
     2953 * Application may use the media transport to query more detailed information 
     2954 * about the media transport. 
     2955 * 
     2956 * @param cid           Call identification (the call_id). 
     2957 * 
     2958 * @return              Call media transport. 
     2959 */ 
     2960PJ_DECL(pjmedia_transport*) pjsua_call_get_media_transport(pjsua_call_id cid); 
     2961 
     2962 
     2963/** 
    29382964 * Get the conference port identification associated with the call. 
    29392965 * 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r2241 r2259  
    10221022                     PJ_EINVAL); 
    10231023    return pjsua_var.calls[call_id].session != NULL; 
     1024} 
     1025 
     1026 
     1027/* 
     1028 * Retrieve the media session associated with this call. 
     1029 */ 
     1030PJ_DEF(pjmedia_session*) pjsua_call_get_media_session(pjsua_call_id call_id) 
     1031{ 
     1032    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls,  
     1033                     NULL); 
     1034    return pjsua_var.calls[call_id].session; 
     1035} 
     1036 
     1037 
     1038/* 
     1039 * Retrieve the media transport instance that is used for this call. 
     1040 */ 
     1041PJ_DEF(pjmedia_transport*) pjsua_call_get_media_transport(pjsua_call_id cid) 
     1042{ 
     1043    PJ_ASSERT_RETURN(cid>=0 && cid<(int)pjsua_var.ua_cfg.max_calls,  
     1044                     NULL); 
     1045    return pjsua_var.calls[cid].med_tp; 
    10241046} 
    10251047 
Note: See TracChangeset for help on using the changeset viewer.