Ignore:
Timestamp:
Feb 8, 2006 10:43:39 PM (18 years ago)
Author:
bennylp
Message:

Finished new pjmedia rewrite

File:
1 moved

Legend:

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

    r158 r159  
    2626 */ 
    2727/** 
    28  * @defgroup PJMED_MGR Media Manager 
     28 * @defgroup PJMED_ENDPT Media Endpoint 
    2929 * @ingroup PJMEDIA 
    3030 * @{ 
    3131 * 
    32  * The media manager acts as placeholder for endpoint capabilities. Each  
    33  * media manager will have a codec manager to manage list of codecs installed 
     32 * The media endpoint acts as placeholder for endpoint capabilities. Each  
     33 * media endpoint will have a codec manager to manage list of codecs installed 
    3434 * in the endpoint and a sound device factory. 
    3535 * 
    36  * A reference to media manager instance is required when application wants 
     36 * A reference to media endpoint instance is required when application wants 
    3737 * to create a media session (#pj_media_session_create or  
    3838 * #pj_media_session_create_from_sdp). 
     
    4646 
    4747 
    48 /** Opague declaration of media manager. */ 
    49 typedef struct pj_med_mgr_t pj_med_mgr_t; 
    5048 
    5149/** 
    52  * Create an instance of media manager. 
     50 * Create an instance of media endpoint. 
    5351 * 
    54  * @param pf            Pool factory. 
    55  * @param conn_addr     Connection address to be used by this media manager. 
     52 * @param pf            Pool factory, which will be used by the media endpoint 
     53 *                      throughout its lifetime. 
     54 * @param p_endpt       Pointer to receive the endpoint instance. 
    5655 * 
    57  * @return A new instance of media manager, or NULL if failed. 
     56 * @return              PJ_SUCCESS on success. 
    5857 */ 
    59 PJ_DECL(pj_med_mgr_t*) pj_med_mgr_create (pj_pool_factory *pf); 
     58PJ_DECL(pj_status_t) pjmedia_endpt_create( pj_pool_factory *pf, 
     59                                           pjmedia_endpt **p_endpt); 
    6060 
    6161/** 
    62  * Destroy media manager instance. 
     62 * Destroy media endpoint instance. 
    6363 * 
    64  * @param mgr           Media manager instance. 
     64 * @param endpt         Media endpoint instance. 
    6565 * 
    66  * @return zero on success. 
     66 * @return              PJ_SUCCESS on success. 
    6767 */ 
    68 PJ_DECL(pj_status_t) pj_med_mgr_destroy (pj_med_mgr_t *mgr); 
     68PJ_DECL(pj_status_t) pjmedia_endpt_destroy(pjmedia_endpt *endpt); 
     69 
    6970 
    7071/** 
    71  * Get pool factory of the media manager as specified when the media 
    72  * manager was created. 
     72 * Request the media endpoint to create pool. 
    7373 * 
    74  * @param mgr           The media manager instance. 
     74 * @param endpt         The media endpoint instance. 
     75 * @param name          Name to be assigned to the pool. 
     76 * @param initial       Initial pool size, in bytes. 
     77 * @param increment     Increment size, in bytes. 
    7578 * 
    76  * @return Pool factory instance of the media manager. 
     79 * @return              Memory pool. 
    7780 */ 
    78 PJ_DECL(pj_pool_factory*) pj_med_mgr_get_pool_factory (pj_med_mgr_t *mgr); 
     81PJ_DECL(pj_pool_t*) pjmedia_endpt_create_pool( pjmedia_endpt *endpt, 
     82                                               const char *name, 
     83                                               pj_size_t initial, 
     84                                               pj_size_t increment); 
    7985 
    8086/** 
    81  * Get the codec manager instance. 
     87 * Get the codec manager instance of the media endpoint. 
    8288 * 
    83  * @param mgr           The media manager instance. 
     89 * @param endpt         The media endpoint instance. 
    8490 * 
    85  * @return The instance of codec manager. 
     91 * @return              The instance of codec manager belonging to 
     92 *                      this media endpoint. 
    8693 */ 
    87 PJ_DECL(pj_codec_mgr*) pj_med_mgr_get_codec_mgr (pj_med_mgr_t *mgr); 
     94PJ_DECL(pjmedia_codec_mgr*) pjmedia_endpt_get_codec_mgr(pjmedia_endpt *mgr); 
     95 
     96 
     97/** 
     98 * Create a SDP session description that describes the endpoint 
     99 * capability. 
     100 * 
     101 * @param endpt         The media endpoint. 
     102 * @param pool          Pool to use to create the SDP descriptor. 
     103 * @param stream_cnt    Number of elements in the sock_info array. This 
     104 *                      also denotes the maximum number of streams (i.e. 
     105 *                      the "m=" lines) that will be created in the SDP. 
     106 * @param sock_info     Array of socket transport information. One  
     107 *                      transport is needed for each media stream, and 
     108 *                      each transport consists of an RTP and RTCP socket 
     109 *                      pair. 
     110 * @param p_sdp         Pointer to receive SDP session descriptor. 
     111 * 
     112 * @return              PJ_SUCCESS on success. 
     113 */ 
     114PJ_DECL(pj_status_t) pjmedia_endpt_create_sdp( pjmedia_endpt *endpt, 
     115                                               pj_pool_t *pool, 
     116                                               unsigned stream_cnt, 
     117                                               const pjmedia_sock_info sock_info[], 
     118                                               pjmedia_sdp_session **p_sdp ); 
    88119 
    89120 
Note: See TracChangeset for help on using the changeset viewer.