sdp: added accessor function sdp_session_lbandwidth()
This commit is contained in:
parent
55a5d90e5b
commit
d29d6d6142
2 changed files with 20 additions and 0 deletions
|
@ -68,6 +68,8 @@ void sdp_session_set_lbandwidth(struct sdp_session *sess,
|
|||
int sdp_session_set_lattr(struct sdp_session *sess, bool replace,
|
||||
const char *name, const char *value, ...);
|
||||
void sdp_session_del_lattr(struct sdp_session *sess, const char *name);
|
||||
int32_t sdp_session_lbandwidth(const struct sdp_session *sess,
|
||||
enum sdp_bandwidth type);
|
||||
int32_t sdp_session_rbandwidth(const struct sdp_session *sess,
|
||||
enum sdp_bandwidth type);
|
||||
const char *sdp_session_rattr(const struct sdp_session *sess,
|
||||
|
|
|
@ -167,6 +167,24 @@ void sdp_session_del_lattr(struct sdp_session *sess, const char *name)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the local bandwidth of an SDP Session
|
||||
*
|
||||
* @param sess SDP Session
|
||||
* @param type Bandwidth type
|
||||
*
|
||||
* @return Bandwidth value
|
||||
*/
|
||||
int32_t sdp_session_lbandwidth(const struct sdp_session *sess,
|
||||
enum sdp_bandwidth type)
|
||||
{
|
||||
if (!sess || type >= SDP_BANDWIDTH_MAX)
|
||||
return 0;
|
||||
|
||||
return sess->lbwv[type];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the remote bandwidth of an SDP Session
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue