stasis_bridge.c: Fixed wrong video_mode shown

Currently, if the bridge has created by the ARI, the video_mode
parameter was
not shown in the BridgeCreated event correctly.

Fixed it and added video_mode shown in the 'bridge show <bridge id>'
cli.

ASTERISK-28987

Change-Id: I8c205126724e34c2bdab9380f523eb62478e4295
changes/08/14708/5
sungtae kim 6 years ago committed by Kevin Harwell
parent 7379a54424
commit 53f9bbdc2d

@ -5126,6 +5126,7 @@ static char *handle_bridge_show_specific(struct ast_cli_entry *e, int cmd, struc
ast_cli(a->fd, "Subclass: %s\n", snapshot->subclass);
ast_cli(a->fd, "Creator: %s\n", snapshot->creator);
ast_cli(a->fd, "Name: %s\n", snapshot->name);
ast_cli(a->fd, "Video-Mode: %s\n", ast_bridge_video_mode_to_string(snapshot->video_mode));
ast_cli(a->fd, "Video-Source-Id: %s\n", snapshot->video_source_id);
ast_cli(a->fd, "Num-Channels: %u\n", snapshot->num_channels);
ast_cli(a->fd, "Num-Active: %u\n", snapshot->num_active);

@ -799,12 +799,12 @@ struct ast_bridge *stasis_app_bridge_create(const char *type, const char *name,
bridge = bridge_stasis_new(capabilities, flags, name, id);
if (bridge) {
ast_bridge_set_talker_src_video_mode(bridge);
if (!ao2_link(app_bridges, bridge)) {
ast_bridge_destroy(bridge, 0);
bridge = NULL;
}
}
return bridge;
}

@ -305,6 +305,11 @@ struct ast_bridge *bridge_stasis_new(uint32_t capabilities, unsigned int flags,
bridge = bridge_alloc(sizeof(struct ast_bridge), &bridge_stasis_v_table);
bridge = bridge_base_init(bridge, capabilities, flags, "Stasis", name, id);
if (!bridge) {
return NULL;
}
ast_bridge_set_talker_src_video_mode(bridge);
bridge = bridge_register(bridge);
return bridge;

Loading…
Cancel
Save