Asterisk - The Open Source Telephony Project GIT-master-a358458
Macros | Functions
stasis_bridge.h File Reference

Internal API for the Stasis bridge subclass. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define STASIS_BRIDGE_MIXING_CAPABILITIES
 

Functions

void bridge_stasis_init (void)
 
struct ast_bridgebridge_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)
 

Detailed Description

Internal API for the Stasis bridge subclass.

Author
Richard Mudgett rmudg.nosp@m.ett@.nosp@m.digiu.nosp@m.m.co.nosp@m.m

See Also:

Definition in file stasis_bridge.h.

Macro Definition Documentation

◆ STASIS_BRIDGE_MIXING_CAPABILITIES

#define STASIS_BRIDGE_MIXING_CAPABILITIES
Value:
@ AST_BRIDGE_CAPABILITY_MULTIMIX
Definition: bridge.h:94
@ AST_BRIDGE_CAPABILITY_NATIVE
Definition: bridge.h:90
@ AST_BRIDGE_CAPABILITY_1TO1MIX
Definition: bridge.h:92

Normal capabilities of mixing bridges

Definition at line 39 of file stasis_bridge.h.

Function Documentation

◆ bridge_stasis_init()

void bridge_stasis_init ( void  )

Definition at line 329 of file stasis_bridge.c.

330{
331 /* Setup the Stasis bridge subclass v_table. */
333 bridge_stasis_v_table.name = "stasis";
337}
struct ast_bridge_methods ast_bridge_base_v_table
Bridge base class virtual method table.
Definition: bridge.c:923
static void bridge_stasis_pull(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel)
static int bridge_stasis_push(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *swap)
static struct ast_bridge_methods bridge_stasis_v_table
Definition: stasis_bridge.c:47
static int bridge_stasis_push_peek(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *swap)
ast_bridge_push_channel_fn push
Definition: bridge.h:265
const char * name
Definition: bridge.h:259
ast_bridge_pull_channel_fn pull
Definition: bridge.h:267
ast_bridge_push_channel_fn push_peek
Definition: bridge.h:273

References ast_bridge_base_v_table, bridge_stasis_pull(), bridge_stasis_push(), bridge_stasis_push_peek(), bridge_stasis_v_table, ast_bridge_methods::name, ast_bridge_methods::pull, ast_bridge_methods::push, and ast_bridge_methods::push_peek.

Referenced by load_module().

◆ bridge_stasis_new()

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 
)

Definition at line 298 of file stasis_bridge.c.

299{
300 void *bridge;
301
302 bridge = bridge_alloc(sizeof(struct ast_bridge), &bridge_stasis_v_table);
303 bridge = bridge_base_init(bridge, capabilities, flags, "Stasis", name, id);
304 if (!bridge) {
305 return NULL;
306 }
307
308 if (video_mode == AST_BRIDGE_VIDEO_MODE_SFU) {
310 /* We require a minimum 5 seconds between video updates to stop floods from clients,
311 * this should rarely be changed but should become configurable in the future.
312 */
314 } else if (video_mode == AST_BRIDGE_VIDEO_MODE_SINGLE_SRC) {
316 } else {
318 }
319
320 if (send_sdp_label) {
322 }
323
324 bridge = bridge_register(bridge);
325
326 return bridge;
327}
void ast_bridge_set_talker_src_video_mode(struct ast_bridge *bridge)
Set the bridge to pick the strongest talker supporting video as the single source video feed.
Definition: bridge.c:3766
void ast_bridge_set_sfu_video_mode(struct ast_bridge *bridge)
Set the bridge to be a selective forwarding unit.
Definition: bridge.c:3774
void ast_bridge_set_video_update_discard(struct ast_bridge *bridge, unsigned int video_update_discard)
Set the amount of time to discard subsequent video updates after a video update has been sent.
Definition: bridge.c:3782
void ast_bridge_set_single_src_video_mode(struct ast_bridge *bridge, struct ast_channel *video_src_chan)
Set a bridge to feed a single video source to all participants.
Definition: bridge.c:3749
void ast_bridge_set_send_sdp_label(struct ast_bridge *bridge, unsigned int send_sdp_label)
Controls whether to send a "label" attribute in each stream in an SDP.
Definition: bridge.c:3966
@ AST_BRIDGE_VIDEO_MODE_SINGLE_SRC
Definition: bridge.h:102
@ AST_BRIDGE_VIDEO_MODE_SFU
Definition: bridge.h:109
struct ast_bridge * bridge_register(struct ast_bridge *bridge)
Register the new bridge with the system.
Definition: bridge.c:691
struct ast_bridge * bridge_base_init(struct ast_bridge *self, uint32_t capabilities, unsigned int flags, const char *creator, const char *name, const char *id)
Initialize the base class of the bridge.
Definition: bridge.c:742
struct ast_bridge * bridge_alloc(size_t size, const struct ast_bridge_methods *v_table)
Definition: bridge.c:706
static const char name[]
Definition: format_mp3.c:68
#define NULL
Definition: resample.c:96
Structure that contains information about a bridge.
Definition: bridge.h:349

References ast_bridge_set_send_sdp_label(), ast_bridge_set_sfu_video_mode(), ast_bridge_set_single_src_video_mode(), ast_bridge_set_talker_src_video_mode(), ast_bridge_set_video_update_discard(), AST_BRIDGE_VIDEO_MODE_SFU, AST_BRIDGE_VIDEO_MODE_SINGLE_SRC, bridge_alloc(), bridge_base_init(), bridge_register(), bridge_stasis_v_table, name, and NULL.

Referenced by bridge_create_common().