Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added sdp_media_disabled API function #2

Merged
merged 1 commit into from
Jul 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/re_sdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ int sdp_media_set_alt_protos(struct sdp_media *m, unsigned protoc, ...);
void sdp_media_set_encode_handler(struct sdp_media *m, sdp_media_enc_h *ench,
void *arg);
void sdp_media_set_fmt_ignore(struct sdp_media *m, bool fmt_ignore);
bool sdp_media_disabled(struct sdp_media *m);
void sdp_media_set_disabled(struct sdp_media *m, bool disabled);
void sdp_media_set_lport(struct sdp_media *m, uint16_t port);
void sdp_media_set_laddr(struct sdp_media *m, const struct sa *laddr);
Expand Down
16 changes: 16 additions & 0 deletions src/sdp/media.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,22 @@ void sdp_media_set_disabled(struct sdp_media *m, bool disabled)
}


/**
* Check if an SDP Media line is disabled
*
* @param m SDP Media line
* @return True if disabled, otherwise false

*/
bool sdp_media_disabled(struct sdp_media *m)
{
if (!m)
return true;

return m->disabled;
}


/**
* Set the local port number of an SDP Media line
*
Expand Down