Asterisk - The Open Source Telephony Project  18.5.0
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)
 

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

Function Documentation

◆ bridge_stasis_init()

void bridge_stasis_init ( void  )

Definition at line 327 of file stasis_bridge.c.

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().

328 {
329  /* Setup the Stasis bridge subclass v_table. */
331  bridge_stasis_v_table.name = "stasis";
335 }
const char * name
Definition: bridge.h:267
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)
struct ast_bridge_methods ast_bridge_base_v_table
Bridge base class virtual method table.
Definition: bridge.c:949
static int bridge_stasis_push(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *swap)
ast_bridge_push_channel_fn push_peek
Definition: bridge.h:281
static void bridge_stasis_pull(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel)
ast_bridge_pull_channel_fn pull
Definition: bridge.h:275
ast_bridge_push_channel_fn push
Definition: bridge.h:273

◆ 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 
)

Definition at line 300 of file stasis_bridge.c.

References 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, defer_bridge_add_obj::bridge, bridge_alloc(), bridge_base_init(), bridge_register(), bridge_stasis_v_table, and NULL.

Referenced by bridge_create_common().

301 {
302  void *bridge;
303 
304  bridge = bridge_alloc(sizeof(struct ast_bridge), &bridge_stasis_v_table);
305  bridge = bridge_base_init(bridge, capabilities, flags, "Stasis", name, id);
306  if (!bridge) {
307  return NULL;
308  }
309 
310  if (video_mode == AST_BRIDGE_VIDEO_MODE_SFU) {
312  /* We require a minimum 5 seconds between video updates to stop floods from clients,
313  * this should rarely be changed but should become configurable in the future.
314  */
316  } else if (video_mode == AST_BRIDGE_VIDEO_MODE_SINGLE_SRC) {
318  } else {
320  }
321 
322  bridge = bridge_register(bridge);
323 
324  return bridge;
325 }
void ast_bridge_set_sfu_video_mode(struct ast_bridge *bridge)
Set the bridge to be a selective forwarding unit.
Definition: bridge.c:3841
struct ast_bridge * bridge_register(struct ast_bridge *bridge)
Register the new bridge with the system.
Definition: bridge.c:709
struct ast_bridge * bridge
Definition: stasis_bridge.c:79
#define NULL
Definition: resample.c:96
static struct ast_bridge_methods bridge_stasis_v_table
Definition: stasis_bridge.c:47
struct ast_bridge * bridge_alloc(size_t size, const struct ast_bridge_methods *v_table)
Definition: bridge.c:724
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:3849
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:760
Structure that contains information about a bridge.
Definition: bridge.h:357
static const char name[]
Definition: cdr_mysql.c:74
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:3833
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:3816