Ignore:
Timestamp:
May 13, 2006 10:46:23 PM (18 years ago)
Author:
bennylp
Message:

Another major modifications in PJMEDIA:

  • handle multiple frames in one packet
  • split stream creation into two steps to allow customization
  • PLC framework and implementation with G.711 and speex
  • stream returns NO_FRAME correctly.
  • added ptime argument in pjsua
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/session.h

    r414 r438  
    6767 
    6868 
    69 /** 
    70  * Initialize stream info from SDP media lines. 
    71  * 
    72  * @param si            Stream info structure to be initialized. 
    73  * @param pool          Pool. 
     69/**  
     70 * Opaque declaration of media session.  
     71 */ 
     72typedef struct pjmedia_session pjmedia_session; 
     73 
     74 
     75/** 
     76 * @see pjmedia_session_info. 
     77 */ 
     78typedef struct pjmedia_session_info pjmedia_session_info; 
     79 
     80 
     81/** 
     82 * This function will initialize the session info based on information 
     83 * in both SDP session descriptors. The remaining information will be 
     84 * taken from default codec parameters. If socket info array is specified, 
     85 * the socket will be copied to the session info as well. 
     86 * 
     87 * @param pool          Pool to allocate memory. 
    7488 * @param endpt         Pjmedia endpoint. 
     89 * @param max_streams   Maximum number of stream infos to be created. 
     90 * @param si            Session info structure to be initialized. 
     91 * @param skinfo        Optional array of media socket info to be copied 
     92 *                      to the stream info. If this argument is specified, 
     93 *                      the array must contain sufficient elements for 
     94 *                      each stream to be initialized. 
    7595 * @param local         Local SDP session descriptor. 
    7696 * @param remote        Remote SDP session descriptor. 
     
    7999 * @return              PJ_SUCCESS if stream info is successfully initialized. 
    80100 */ 
    81 PJ_DECL(pj_status_t) pjmedia_stream_info_from_sdp(  
    82                                            pjmedia_stream_info *si, 
    83                                            pj_pool_t *pool, 
    84                                            pjmedia_endpt *endpt, 
    85                                            const pjmedia_sdp_session *local, 
    86                                            const pjmedia_sdp_session *remote, 
    87                                            unsigned stream_idx); 
    88  
     101PJ_DECL(pj_status_t) 
     102pjmedia_session_info_from_sdp( pj_pool_t *pool, 
     103                               pjmedia_endpt *endpt, 
     104                               unsigned max_streams, 
     105                               pjmedia_session_info *si, 
     106                               const pjmedia_sock_info skinfo[], 
     107                               const pjmedia_sdp_session *local, 
     108                               const pjmedia_sdp_session *remote); 
     109 
     110 
     111/* 
     112 * This function will initialize the stream info based on information 
     113 * in both SDP session descriptors for the specified stream index.  
     114 * The remaining information will be taken from default codec parameters.  
     115 * If socket info array is specified, the socket will be copied to the  
     116 * session info as well. 
     117 * 
     118 * @param si            Stream info structure to be initialized. 
     119 * @param pool          Pool to allocate memory. 
     120 * @param endpt         PJMEDIA endpoint instance. 
     121 * @param skinfo        Optional socket info to be copied to the stream info. 
     122 * @param local         Local SDP session descriptor. 
     123 * @param remote        Remote SDP session descriptor. 
     124 * @param stream_idx    Media stream index in the session descriptor. 
     125 * 
     126 * @return              PJ_SUCCESS if stream info is successfully initialized. 
     127 */ 
     128PJ_DECL(pj_status_t) 
     129pjmedia_stream_info_from_sdp( pjmedia_stream_info *si, 
     130                              pj_pool_t *pool, 
     131                              pjmedia_endpt *endpt, 
     132                              const pjmedia_sock_info *skinfo, 
     133                              const pjmedia_sdp_session *local, 
     134                              const pjmedia_sdp_session *remote, 
     135                              unsigned stream_idx); 
    89136 
    90137/** 
     
    102149 *                      also denotes the number of elements in the 
    103150 *                      socket information. 
    104  * @param skinfo        Array of socket informations. The argument stream_cnt 
    105  *                      specifies the number of elements in this array. One 
    106  *                      element is needed for each media stream to be 
    107  *                      created in the session. 
    108151 * @param local_sdp     The SDP describing local capability. 
    109152 * @param rem_sdp       The SDP describing remote capability. 
     
    116159PJ_DECL(pj_status_t)  
    117160pjmedia_session_create( pjmedia_endpt *endpt,  
    118                         unsigned stream_cnt, 
    119                         const pjmedia_sock_info skinfo[], 
    120                         const pjmedia_sdp_session *local_sdp, 
    121                         const pjmedia_sdp_session *rem_sdp, 
     161                        const pjmedia_session_info *si, 
    122162                        void *user_data, 
    123163                        pjmedia_session **p_session ); 
Note: See TracChangeset for help on using the changeset viewer.