Home --> Documentations --> PJMEDIA Reference
|
void | pjmedia_endpt_create_sdp_param_default (pjmedia_endpt_create_sdp_param *param) |
|
pj_status_t | pjmedia_endpt_create2 (pj_pool_factory *pf, pj_ioqueue_t *ioqueue, unsigned worker_cnt, pjmedia_endpt **p_endpt) |
|
pj_status_t | pjmedia_endpt_create (pj_pool_factory *pf, pj_ioqueue_t *ioqueue, unsigned worker_cnt, pjmedia_endpt **p_endpt) |
|
pj_status_t | pjmedia_endpt_destroy2 (pjmedia_endpt *endpt) |
|
pj_status_t | pjmedia_endpt_destroy (pjmedia_endpt *endpt) |
|
pj_status_t | pjmedia_endpt_set_flag (pjmedia_endpt *endpt, pjmedia_endpt_flag flag, const void *value) |
|
pj_status_t | pjmedia_endpt_get_flag (pjmedia_endpt *endpt, pjmedia_endpt_flag flag, void *value) |
|
pj_ioqueue_t * | pjmedia_endpt_get_ioqueue (pjmedia_endpt *endpt) |
|
unsigned | pjmedia_endpt_get_thread_count (pjmedia_endpt *endpt) |
|
pj_thread_t * | pjmedia_endpt_get_thread (pjmedia_endpt *endpt, unsigned index) |
|
pj_status_t | pjmedia_endpt_stop_threads (pjmedia_endpt *endpt) |
|
pj_pool_t * | pjmedia_endpt_create_pool (pjmedia_endpt *endpt, const char *name, pj_size_t initial, pj_size_t increment) |
|
pjmedia_codec_mgr * | pjmedia_endpt_get_codec_mgr (pjmedia_endpt *endpt) |
|
pj_status_t | pjmedia_endpt_create_sdp (pjmedia_endpt *endpt, pj_pool_t *pool, unsigned stream_cnt, const pjmedia_sock_info sock_info[], pjmedia_sdp_session **p_sdp) |
|
pj_status_t | pjmedia_endpt_create_base_sdp (pjmedia_endpt *endpt, pj_pool_t *pool, const pj_str_t *sess_name, const pj_sockaddr *origin, pjmedia_sdp_session **p_sdp) |
|
pj_status_t | pjmedia_endpt_create_audio_sdp (pjmedia_endpt *endpt, pj_pool_t *pool, const pjmedia_sock_info *si, const pjmedia_endpt_create_sdp_param *options, pjmedia_sdp_media **p_m) |
|
pj_status_t | pjmedia_endpt_create_video_sdp (pjmedia_endpt *endpt, pj_pool_t *pool, const pjmedia_sock_info *si, const pjmedia_endpt_create_sdp_param *options, pjmedia_sdp_media **p_m) |
|
pj_status_t | pjmedia_endpt_dump (pjmedia_endpt *endpt) |
|
pj_status_t | pjmedia_endpt_atexit (pjmedia_endpt *endpt, pjmedia_endpt_exit_callback func) |
|
The media endpoint acts as placeholder for endpoint capabilities. Each media endpoint will have a codec manager to manage list of codecs installed in the endpoint and a sound device factory.
A reference to media endpoint instance is required when application wants to create a media session (pjmedia_session_create()).
◆ pjmedia_endpt_exit_callback
typedef void(* pjmedia_endpt_exit_callback) (pjmedia_endpt *endpt) |
◆ pjmedia_endpt_flag
This enumeration describes various flags that can be set or retrieved in the media endpoint, by using pjmedia_endpt_set_flag() and pjmedia_endpt_get_flag() respectively.
Enumerator |
---|
PJMEDIA_ENDPT_HAS_TELEPHONE_EVENT_FLAG | This flag controls whether telephony-event should be offered in SDP. Value is boolean.
|
◆ pjmedia_endpt_create_sdp_param_default()
◆ pjmedia_endpt_create2()
Create an instance of media endpoint.
- Parameters
-
pf | Pool factory, which will be used by the media endpoint throughout its lifetime. |
ioqueue | Optional ioqueue instance to be registered to the endpoint. The ioqueue instance is used to poll all RTP and RTCP sockets. If this argument is NULL, the endpoint will create an internal ioqueue instance. |
worker_cnt | Specify the number of worker threads to be created to poll the ioqueue. |
p_endpt | Pointer to receive the endpoint instance. |
- Returns
- PJ_SUCCESS on success.
Referenced by pjmedia_endpt_create().
◆ pjmedia_endpt_create()
Create an instance of media endpoint and initialize audio subsystem.
- Parameters
-
pf | Pool factory, which will be used by the media endpoint throughout its lifetime. |
ioqueue | Optional ioqueue instance to be registered to the endpoint. The ioqueue instance is used to poll all RTP and RTCP sockets. If this argument is NULL, the endpoint will create an internal ioqueue instance. |
worker_cnt | Specify the number of worker threads to be created to poll the ioqueue. |
p_endpt | Pointer to receive the endpoint instance. |
- Returns
- PJ_SUCCESS on success.
References PJ_SUCCESS, pjmedia_aud_subsys_init(), pjmedia_aud_subsys_shutdown(), and pjmedia_endpt_create2().
◆ pjmedia_endpt_destroy2()
Destroy media endpoint instance.
- Parameters
-
endpt | Media endpoint instance. |
- Returns
- PJ_SUCCESS on success.
Referenced by pjmedia_endpt_destroy().
◆ pjmedia_endpt_destroy()
◆ pjmedia_endpt_set_flag()
Change the value of a flag.
- Parameters
-
endpt | Media endpoint. |
flag | The flag. |
value | Pointer to the value to be set. |
- Returns
- PJ_SUCCESS on success.
◆ pjmedia_endpt_get_flag()
Retrieve the value of a flag.
- Parameters
-
endpt | Media endpoint. |
flag | The flag. |
value | Pointer to store the result. |
- Returns
- PJ_SUCCESS on success.
◆ pjmedia_endpt_get_ioqueue()
Get the ioqueue instance of the media endpoint.
- Parameters
-
endpt | The media endpoint instance. |
- Returns
- The ioqueue instance of the media endpoint.
◆ pjmedia_endpt_get_thread_count()
Get the number of worker threads on the media endpoint
- Parameters
-
endpt | The media endpoint instance. |
- Returns
- The number of worker threads on the media endpoint
◆ pjmedia_endpt_get_thread()
Get a reference to one of the worker threads of the media endpoint
- Parameters
-
endpt | The media endpoint instance. |
index | The index of the thread: 0<= index < thread_cnt |
- Returns
- pj_thread_t or NULL
◆ pjmedia_endpt_stop_threads()
Stop and destroy the worker threads of the media endpoint
- Parameters
-
endpt | The media endpoint instance. |
- Returns
- PJ_SUCCESS on success.
◆ pjmedia_endpt_create_pool()
Request the media endpoint to create pool.
- Parameters
-
endpt | The media endpoint instance. |
name | Name to be assigned to the pool. |
initial | Initial pool size, in bytes. |
increment | Increment size, in bytes. |
- Returns
- Memory pool.
◆ pjmedia_endpt_get_codec_mgr()
Get the codec manager instance of the media endpoint.
- Parameters
-
endpt | The media endpoint instance. |
- Returns
- The instance of codec manager belonging to this media endpoint.
◆ pjmedia_endpt_create_sdp()
Create a SDP session description that describes the endpoint capability.
- Parameters
-
endpt | The media endpoint. |
pool | Pool to use to create the SDP descriptor. |
stream_cnt | Number of elements in the sock_info array. This also denotes the maximum number of streams (i.e. the "m=" lines) that will be created in the SDP. By convention, if this value is greater than one, the first media will be audio and the remaining media is video. |
sock_info | Array of socket transport information. One transport is needed for each media stream, and each transport consists of an RTP and RTCP socket pair. |
p_sdp | Pointer to receive SDP session descriptor. |
- Returns
- PJ_SUCCESS on success.
◆ pjmedia_endpt_create_base_sdp()
Create a "blank" SDP session description. The SDP will contain basic SDP fields such as origin, time, and name, but without any media lines.
- Parameters
-
endpt | The media endpoint. |
pool | Pool to allocate memory from. |
sess_name | Optional SDP session name, or NULL to use default value. |
origin | Address to put in the origin field. |
p_sdp | Pointer to receive the created SDP session. |
- Returns
- PJ_SUCCESS on success, or the appropriate error code.
◆ pjmedia_endpt_create_audio_sdp()
Create SDP media line for audio media.
- Parameters
-
endpt | The media endpoint. |
pool | Pool to allocate memory from. |
si | Socket information. |
options | Options parameter, can be NULL. If set to NULL, default values will be used. |
p_m | Pointer to receive the created SDP media. |
- Returns
- PJ_SUCCESS on success, or the appropriate error code.
◆ pjmedia_endpt_create_video_sdp()
Create SDP media line for video media.
- Parameters
-
endpt | The media endpoint. |
pool | Pool to allocate memory from. |
si | Socket information. |
options | Options parameter, can be NULL. If set to NULL, default values will be used. |
p_m | Pointer to receive the created SDP media. |
- Returns
- PJ_SUCCESS on success, or the appropriate error code.
◆ pjmedia_endpt_dump()
Dump media endpoint capabilities.
- Parameters
-
- Returns
- PJ_SUCCESS on success.
◆ pjmedia_endpt_atexit()
Register cleanup function to be called by media endpoint when pjmedia_endpt_destroy() is called. Note that application should not use or access any endpoint resource (such as pool, ioqueue) from within the callback as such resource may have been released when the callback function is invoked.
- Parameters
-
endpt | The media endpoint. |
func | The function to be registered. |
- Returns
- PJ_SUCCESS on success.
PJMEDIA small footprint Open Source media stack
Copyright (C) 2006-2008 Teluu Inc.
|