diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/bridge.h | 33 | ||||
-rw-r--r-- | include/asterisk/res_pjsip.h | 22 | ||||
-rw-r--r-- | include/asterisk/rtp_engine.h | 6 | ||||
-rw-r--r-- | include/asterisk/stasis_bridges.h | 4 | ||||
-rw-r--r-- | include/asterisk/utils.h | 13 |
5 files changed, 63 insertions, 15 deletions
diff --git a/include/asterisk/bridge.h b/include/asterisk/bridge.h index c96cefb60..3584085af 100644 --- a/include/asterisk/bridge.h +++ b/include/asterisk/bridge.h @@ -126,6 +126,24 @@ struct ast_bridge_video_talker_src_data { struct ast_channel *chan_old_vsrc; }; +/*! \brief REMB report behaviors */ +enum ast_bridge_video_sfu_remb_behavior { + /*! The average of all reports is sent to the sender */ + AST_BRIDGE_VIDEO_SFU_REMB_AVERAGE = 0, + /*! The lowest reported bitrate is forwarded to the sender */ + AST_BRIDGE_VIDEO_SFU_REMB_LOWEST, + /*! The highest reported bitrate is forwarded to the sender */ + AST_BRIDGE_VIDEO_SFU_REMB_HIGHEST, +}; + +/*! \brief This is used for selective forwarding unit configuration */ +struct ast_bridge_video_sfu_data { + /*! The interval at which a REMB report is generated and sent */ + unsigned int remb_send_interval; + /*! How the combined REMB report is generated */ + enum ast_bridge_video_sfu_remb_behavior remb_behavior; +}; + /*! \brief Data structure that defines a video source mode */ struct ast_bridge_video_mode { enum ast_bridge_video_mode_type mode; @@ -133,9 +151,10 @@ struct ast_bridge_video_mode { union { struct ast_bridge_video_single_src_data single_src_data; struct ast_bridge_video_talker_src_data talker_src_data; + struct ast_bridge_video_sfu_data sfu_data; } mode_data; + /*! The minimum interval between video updates */ unsigned int video_update_discard; - unsigned int remb_send_interval; }; /*! @@ -917,10 +936,22 @@ void ast_bridge_set_video_update_discard(struct ast_bridge *bridge, unsigned int * * \param bridge Bridge to set the REMB send interval on * \param remb_send_interval The REMB send interval + * + * \note This can only be called when the bridge has been set to the SFU video mode. */ void ast_bridge_set_remb_send_interval(struct ast_bridge *bridge, unsigned int remb_send_interval); /*! + * \brief Set the REMB report generation behavior on a bridge + * + * \param bridge Bridge to set the REMB behavior on + * \param behavior How REMB reports are generated + * + * \note This can only be called when the bridge has been set to the SFU video mode. + */ +void ast_brige_set_remb_behavior(struct ast_bridge *bridge, enum ast_bridge_video_sfu_remb_behavior behavior); + +/*! * \brief Update information about talker energy for talker src video mode. */ void ast_bridge_update_talker_src_video_mode(struct ast_bridge *bridge, struct ast_channel *chan, int talker_energy, int is_keyfame); diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h index 092bb8420..d2ae39baf 100644 --- a/include/asterisk/res_pjsip.h +++ b/include/asterisk/res_pjsip.h @@ -258,6 +258,14 @@ struct ast_sip_contact { AST_STRING_FIELD(user_agent); /*! The name of the aor this contact belongs to */ AST_STRING_FIELD(aor); + /*! Asterisk Server name */ + AST_STRING_FIELD(reg_server); + /*! IP-address of the Via header in REGISTER request */ + AST_STRING_FIELD(via_addr); + /*! Content of the Call-ID header in REGISTER request */ + AST_STRING_FIELD(call_id); + /*! The name of the endpoint that added the contact */ + AST_STRING_FIELD(endpoint_name); ); /*! Absolute time that this contact is no longer valid after */ struct timeval expiration_time; @@ -269,16 +277,8 @@ struct ast_sip_contact { double qualify_timeout; /*! Endpoint that added the contact, only available in observers */ struct ast_sip_endpoint *endpoint; - /*! Asterisk Server name */ - AST_STRING_FIELD_EXTENDED(reg_server); - /*! IP-address of the Via header in REGISTER request */ - AST_STRING_FIELD_EXTENDED(via_addr); - /* Port of the Via header in REGISTER request */ + /*! Port of the Via header in REGISTER request */ int via_port; - /*! Content of the Call-ID header in REGISTER request */ - AST_STRING_FIELD_EXTENDED(call_id); - /*! The name of the endpoint that added the contact */ - AST_STRING_FIELD_EXTENDED(endpoint_name); /*! If true delete the contact on Asterisk restart/boot */ int prune_on_boot; }; @@ -751,6 +751,8 @@ struct ast_sip_endpoint { AST_STRING_FIELD(message_context); /*! Accountcode to auto-set on channels */ AST_STRING_FIELD(accountcode); + /*! If set, we'll push incoming MWI NOTIFYs to stasis using this mailbox */ + AST_STRING_FIELD(incoming_mwi_mailbox); ); /*! Configuration for extensions */ struct ast_sip_endpoint_extensions extensions; @@ -812,8 +814,6 @@ struct ast_sip_endpoint { unsigned int refer_blind_progress; /*! Whether to notifies dialog-info 'early' on INUSE && RINGING state */ unsigned int notify_early_inuse_ringing; - /*! If set, we'll push incoming MWI NOTIFYs to stasis using this mailbox */ - AST_STRING_FIELD_EXTENDED(incoming_mwi_mailbox); }; /*! URI parameter for symmetric transport */ diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h index 8f044ce17..3426b2a1e 100644 --- a/include/asterisk/rtp_engine.h +++ b/include/asterisk/rtp_engine.h @@ -292,10 +292,14 @@ struct ast_rtp_payload_type { #define AST_RTP_RTCP_SR 200 /*! Receiver Report */ #define AST_RTP_RTCP_RR 201 +/*! Transport Layer Feed Back (From RFC4585 also RFC5104) */ +#define AST_RTP_RTCP_RTPFB 205 /*! Payload Specific Feed Back (From RFC4585 also RFC5104) */ -#define AST_RTP_RTCP_PSFB 206 +#define AST_RTP_RTCP_PSFB 206 /* Common RTCP feedback message types */ +/*! Generic NACK (From RFC4585 also RFC5104) */ +#define AST_RTP_RTCP_FMT_NACK 1 /*! Picture loss indication (From RFC4585) */ #define AST_RTP_RTCP_FMT_PLI 1 /*! Full INTRA-frame Request (From RFC5104) */ diff --git a/include/asterisk/stasis_bridges.h b/include/asterisk/stasis_bridges.h index 05d356cc2..a455a5b02 100644 --- a/include/asterisk/stasis_bridges.h +++ b/include/asterisk/stasis_bridges.h @@ -46,6 +46,8 @@ struct ast_bridge_snapshot { AST_STRING_FIELD(creator); /*! Name given to the bridge by its creator */ AST_STRING_FIELD(name); + /*! Unique ID of the channel providing video, if one exists */ + AST_STRING_FIELD(video_source_id); ); /*! AO2 container of bare channel uniqueid strings participating in the bridge. * Allocated from ast_str_container_alloc() */ @@ -60,8 +62,6 @@ struct ast_bridge_snapshot { unsigned int num_active; /*! The video mode of the bridge */ enum ast_bridge_video_mode_type video_mode; - /*! Unique ID of the channel providing video, if one exists */ - AST_STRING_FIELD_EXTENDED(video_source_id); }; /*! diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h index 4da7fa465..b892cda9e 100644 --- a/include/asterisk/utils.h +++ b/include/asterisk/utils.h @@ -578,6 +578,13 @@ void DO_CRASH_NORETURN __ast_assert_failed(int condition, const char *condition_ #ifdef AST_DEVMODE #define ast_assert(a) _ast_assert(a, # a, __FILE__, __LINE__, __PRETTY_FUNCTION__) +#define ast_assert_return(a, ...) \ +({ \ + if (__builtin_expect(!(a), 1)) { \ + _ast_assert(0, # a, __FILE__, __LINE__, __PRETTY_FUNCTION__); \ + return __VA_ARGS__; \ + }\ +}) static void force_inline _ast_assert(int condition, const char *condition_str, const char *file, int line, const char *function) { if (__builtin_expect(!condition, 1)) { @@ -586,6 +593,12 @@ static void force_inline _ast_assert(int condition, const char *condition_str, c } #else #define ast_assert(a) +#define ast_assert_return(a, ...) \ +({ \ + if (__builtin_expect(!(a), 1)) { \ + return __VA_ARGS__; \ + }\ +}) #endif /*! |