res_stasis.c: Add new type 'sdp_label' for bridge creation.

Add new type 'sdp_label' when creating a bridge using the ARI. This will
add labels to the SDP for each stream, the label is set to the
corresponding channel id.

Resolves: #91

UserNote: When creating a bridge using the ARI the 'type' argument now
accepts a new value 'sdp_label' which will configure the bridge to add
labels for each stream in the SDP with the corresponding channel id.
This commit is contained in:
Joe Searle
2023-05-25 10:58:45 +01:00
committed by George Joseph
parent 8a6379f36b
commit 8462154a03
5 changed files with 14 additions and 7 deletions

View File

@@ -295,7 +295,7 @@ static void bridge_stasis_pull(struct ast_bridge *self, struct ast_bridge_channe
ast_bridge_base_v_table.pull(self, bridge_channel);
}
struct ast_bridge *bridge_stasis_new(uint32_t capabilities, unsigned int flags, const char *name, const char *id, enum ast_bridge_video_mode_type video_mode)
struct ast_bridge *bridge_stasis_new(uint32_t capabilities, unsigned int flags, const char *name, const char *id, enum ast_bridge_video_mode_type video_mode, unsigned int send_sdp_label)
{
void *bridge;
@@ -317,6 +317,10 @@ struct ast_bridge *bridge_stasis_new(uint32_t capabilities, unsigned int flags,
ast_bridge_set_talker_src_video_mode(bridge);
}
if (send_sdp_label) {
ast_bridge_set_send_sdp_label(bridge, 1);
}
bridge = bridge_register(bridge);
return bridge;