📄 conference.h
字号:
* @param p_port Pointer to receive the port instance.
*
* @return PJ_SUCCESS on success, or the appropriate error
* code.
*/
PJ_DECL(pj_status_t) pjmedia_conf_add_passive_port( pjmedia_conf *conf,
pj_pool_t *pool,
const pj_str_t *name,
unsigned clock_rate,
unsigned channel_count,
unsigned samples_per_frame,
unsigned bits_per_sample,
unsigned options,
unsigned *p_slot,
pjmedia_port **p_port );
/**
* Change TX and RX settings for the port.
*
* @param conf The conference bridge.
* @param slot Port number/slot in the conference bridge.
* @param tx Settings for the transmission TO this port.
* @param rx Settings for the receipt FROM this port.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_conf_configure_port( pjmedia_conf *conf,
unsigned slot,
pjmedia_port_op tx,
pjmedia_port_op rx);
/**
* Enable unidirectional audio from the specified source slot to the
* specified sink slot.
*
* @param conf The conference bridge.
* @param src_slot Source slot.
* @param sink_slot Sink slot.
* @param level This argument is reserved for future improvements
* where it is possible to adjust the level of signal
* transmitted in a specific connection. For now,
* this argument MUST be zero.
*
* @return PJ_SUCCES on success.
*/
PJ_DECL(pj_status_t) pjmedia_conf_connect_port( pjmedia_conf *conf,
unsigned src_slot,
unsigned sink_slot,
int level );
/**
* Disconnect unidirectional audio from the specified source to the specified
* sink slot.
*
* @param conf The conference bridge.
* @param src_slot Source slot.
* @param sink_slot Sink slot.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_conf_disconnect_port( pjmedia_conf *conf,
unsigned src_slot,
unsigned sink_slot );
/**
* Get number of ports currently registered to the conference bridge.
*
* @param conf The conference bridge.
*
* @return Number of ports currently registered to the conference
* bridge.
*/
PJ_DECL(unsigned) pjmedia_conf_get_port_count(pjmedia_conf *conf);
/**
* Get total number of ports connections currently set up in the bridge.
*
* @param conf The conference bridge.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(unsigned) pjmedia_conf_get_connect_count(pjmedia_conf *conf);
/**
* Remove the specified port from the conference bridge.
*
* @param conf The conference bridge.
* @param slot The port index to be removed.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_conf_remove_port( pjmedia_conf *conf,
unsigned slot );
/**
* Enumerate occupied ports in the bridge.
*
* @param conf The conference bridge.
* @param ports Array of port numbers to be filled in.
* @param count On input, specifies the maximum number of ports
* in the array. On return, it will be filled with
* the actual number of ports.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_conf_enum_ports( pjmedia_conf *conf,
unsigned ports[],
unsigned *count );
/**
* Get port info.
*
* @param conf The conference bridge.
* @param slot Port index.
* @param info Pointer to receive the info.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_conf_get_port_info( pjmedia_conf *conf,
unsigned slot,
pjmedia_conf_port_info *info);
/**
* Get occupied ports info.
*
* @param conf The conference bridge.
* @param size On input, contains maximum number of infos
* to be retrieved. On output, contains the actual
* number of infos that have been copied.
* @param info Array of info.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_conf_get_ports_info(pjmedia_conf *conf,
unsigned *size,
pjmedia_conf_port_info info[]
);
/**
* Get last signal level transmitted to or received from the specified port.
* This will retrieve the "real-time" signal level of the audio as they are
* transmitted or received by the specified port. Application may call this
* function periodically to display the signal level to a VU meter.
*
* The signal level is an integer value in zero to 255, with zero indicates
* no signal, and 255 indicates the loudest signal level.
*
* @param conf The conference bridge.
* @param slot Slot number.
* @param tx_level Optional argument to receive the level of signal
* transmitted to the specified port (i.e. the direction
* is from the bridge to the port).
* @param rx_level Optional argument to receive the level of signal
* received from the port (i.e. the direction is from the
* port to the bridge).
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_conf_get_signal_level(pjmedia_conf *conf,
unsigned slot,
unsigned *tx_level,
unsigned *rx_level);
/**
* Adjust the level of signal received from the specified port.
* Application may adjust the level to make signal received from the port
* either louder or more quiet. The level adjustment is calculated with this
* formula: <b><tt>output = input * (adj_level+128) / 128</tt></b>. Using
* this, zero indicates no adjustment, the value -128 will mute the signal,
* and the value of +128 will make the signal 100% louder, +256 will make it
* 200% louder, etc.
*
* The level adjustment value will stay with the port until the port is
* removed from the bridge or new adjustment value is set. The current
* level adjustment value is reported in the media port info when
* the #pjmedia_conf_get_port_info() function is called.
*
* @param conf The conference bridge.
* @param slot Slot number of the port.
* @param adj_level Adjustment level, which must be greater than or equal
* to -128. A value of zero means there is no level
* adjustment to be made, the value -128 will mute the
* signal, and the value of +128 will make the signal
* 100% louder, +256 will make it 200% louder, etc.
* See the function description for the formula.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_conf_adjust_rx_level( pjmedia_conf *conf,
unsigned slot,
int adj_level );
/**
* Adjust the level of signal to be transmitted to the specified port.
* Application may adjust the level to make signal transmitted to the port
* either louder or more quiet. The level adjustment is calculated with this
* formula: <b><tt>output = input * (adj_level+128) / 128</tt></b>. Using
* this, zero indicates no adjustment, the value -128 will mute the signal,
* and the value of +128 will make the signal 100% louder, +256 will make it
* 200% louder, etc.
*
* The level adjustment value will stay with the port until the port is
* removed from the bridge or new adjustment value is set. The current
* level adjustment value is reported in the media port info when
* the #pjmedia_conf_get_port_info() function is called.
*
* @param conf The conference bridge.
* @param slot Slot number of the port.
* @param adj_level Adjustment level, which must be greater than or equal
* to -128. A value of zero means there is no level
* adjustment to be made, the value -128 will mute the
* signal, and the value of +128 will make the signal
* 100% louder, +256 will make it 200% louder, etc.
* See the function description for the formula.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_conf_adjust_tx_level( pjmedia_conf *conf,
unsigned slot,
int adj_level );
PJ_END_DECL
/**
* @}
*/
#endif /* __PJMEDIA_CONF_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -