Asterisk - The Open Source Telephony Project GIT-master-8f1982c
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Modules Pages
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:98
@ AST_BRIDGE_CAPABILITY_NATIVE
Definition: bridge.h:94
@ AST_BRIDGE_CAPABILITY_1TO1MIX
Definition: bridge.h:96

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 338 of file stasis_bridge.c.

339{
340 /* Setup the Stasis bridge subclass v_table. */
342 bridge_stasis_v_table.name = "stasis";
346}
struct ast_bridge_methods ast_bridge_base_v_table
Bridge base class virtual method table.
Definition: bridge.c:988
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:269
const char * name
Definition: bridge.h:263
ast_bridge_pull_channel_fn pull
Definition: bridge.h:271
ast_bridge_push_channel_fn push_peek
Definition: bridge.h:277

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 struct ast_bridge *bridge;
301
302 ast_debug(1, "Creating Stasis bridge '%s' with id '%s'\n",
303 S_OR(name, "<unknown>"), S_OR(id, "<unknown>"));
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 if (send_sdp_label) {
324 }
325
326 bridge = bridge_register(bridge);
327 if (!bridge) {
328 ast_log(LOG_ERROR, "Failed to register Stasis bridge %s(%s)\n",
329 S_OR(id, "<unknown>"), S_OR(name, "<unknown>"));
330 return NULL;
331 }
332 ast_debug(1, "Created Stasis bridge " BRIDGE_PRINTF_SPEC "\n",
333 BRIDGE_PRINTF_VARS(bridge));
334
335 return bridge;
336}
#define ast_log
Definition: astobj2.c:42
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:3835
void ast_bridge_set_sfu_video_mode(struct ast_bridge *bridge)
Set the bridge to be a selective forwarding unit.
Definition: bridge.c:3843
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:3851
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:3818
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:4035
@ AST_BRIDGE_VIDEO_MODE_SINGLE_SRC
Definition: bridge.h:106
@ AST_BRIDGE_VIDEO_MODE_SFU
Definition: bridge.h:113
#define BRIDGE_PRINTF_VARS(bridge)
Definition: bridge.h:80
#define BRIDGE_PRINTF_SPEC
Definition: bridge.h:79
struct ast_bridge * bridge_register(struct ast_bridge *bridge)
Register the new bridge with the system.
Definition: bridge.c:713
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:783
struct ast_bridge * bridge_alloc(size_t size, const struct ast_bridge_methods *v_table)
Definition: bridge.c:747
static const char name[]
Definition: format_mp3.c:68
#define ast_debug(level,...)
Log a DEBUG message.
#define LOG_ERROR
#define NULL
Definition: resample.c:96
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one.
Definition: strings.h:80
Structure that contains information about a bridge.
Definition: bridge.h:353

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, ast_debug, ast_log, bridge_alloc(), bridge_base_init(), BRIDGE_PRINTF_SPEC, BRIDGE_PRINTF_VARS, bridge_register(), bridge_stasis_v_table, LOG_ERROR, name, NULL, and S_OR.

Referenced by bridge_create_common().