Changeset 5255 for pjproject/trunk/pjmedia/include/pjmedia/endpoint.h
- Timestamp:
- Mar 10, 2016 5:02:07 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/endpoint.h
r4474 r5255 41 41 #include <pjmedia/sdp.h> 42 42 #include <pjmedia/transport.h> 43 #include <pjmedia-audiodev/audiodev.h> 43 44 44 45 … … 82 83 * @return PJ_SUCCESS on success. 83 84 */ 84 PJ_DECL(pj_status_t) pjmedia_endpt_create (pj_pool_factory *pf,85 PJ_DECL(pj_status_t) pjmedia_endpt_create2(pj_pool_factory *pf, 85 86 pj_ioqueue_t *ioqueue, 86 87 unsigned worker_cnt, … … 88 89 89 90 /** 91 * Create an instance of media endpoint and initialize audio subsystem. 92 * 93 * @param pf Pool factory, which will be used by the media endpoint 94 * throughout its lifetime. 95 * @param ioqueue Optional ioqueue instance to be registered to the 96 * endpoint. The ioqueue instance is used to poll all RTP 97 * and RTCP sockets. If this argument is NULL, the 98 * endpoint will create an internal ioqueue instance. 99 * @param worker_cnt Specify the number of worker threads to be created 100 * to poll the ioqueue. 101 * @param p_endpt Pointer to receive the endpoint instance. 102 * 103 * @return PJ_SUCCESS on success. 104 */ 105 PJ_INLINE(pj_status_t) pjmedia_endpt_create(pj_pool_factory *pf, 106 pj_ioqueue_t *ioqueue, 107 unsigned worker_cnt, 108 pjmedia_endpt **p_endpt) 109 { 110 /* This function is inlined to avoid build problem due to circular 111 * dependency, i.e: this function prevents pjmedia's dependency on 112 * pjmedia-audiodev. 113 */ 114 115 pj_status_t status; 116 117 /* Sound */ 118 status = pjmedia_aud_subsys_init(pf); 119 if (status != PJ_SUCCESS) 120 return status; 121 122 status = pjmedia_endpt_create2(pf, ioqueue, worker_cnt, p_endpt); 123 if (status != PJ_SUCCESS) { 124 pjmedia_aud_subsys_shutdown(); 125 } 126 127 return status; 128 } 129 130 /** 90 131 * Destroy media endpoint instance. 91 132 * … … 94 135 * @return PJ_SUCCESS on success. 95 136 */ 96 PJ_DECL(pj_status_t) pjmedia_endpt_destroy(pjmedia_endpt *endpt); 137 PJ_DECL(pj_status_t) pjmedia_endpt_destroy2(pjmedia_endpt *endpt); 138 139 /** 140 * Destroy media endpoint instance and shutdown audio subsystem. 141 * 142 * @param endpt Media endpoint instance. 143 * 144 * @return PJ_SUCCESS on success. 145 */ 146 PJ_INLINE(pj_status_t) pjmedia_endpt_destroy(pjmedia_endpt *endpt) 147 { 148 /* This function is inlined to avoid build problem due to circular 149 * dependency, i.e: this function prevents pjmedia's dependency on 150 * pjmedia-audiodev. 151 */ 152 pj_status_t status = pjmedia_endpt_destroy2(endpt); 153 pjmedia_aud_subsys_shutdown(); 154 return status; 155 } 97 156 98 157 /**
Note: See TracChangeset
for help on using the changeset viewer.