From 6a99d9bf65aa5878cb409945ed2bdbdcb916d047 Mon Sep 17 00:00:00 2001 From: chenqiyang <1406175257@qq.com> Date: 星期五, 02 九月 2022 14:56:40 +0800 Subject: [PATCH] 更新linphone sdk --- Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Library/ortp.framework/Headers/rtpsession.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Library/ortp.framework/Headers/rtpsession.h b/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Library/ortp.framework/Headers/rtpsession.h index 5618191..5f04840 100755 --- a/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Library/ortp.framework/Headers/rtpsession.h +++ b/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Library/ortp.framework/Headers/rtpsession.h @@ -307,6 +307,8 @@ struct sockaddr_storage rem_addr; socklen_t loc_addrlen; struct sockaddr_storage loc_addr; + socklen_t used_loc_addrlen; + struct sockaddr_storage used_loc_addr; /*Address used to redirect packets from this source*/ struct _RtpTransport *tr; OrtpBwEstimator recv_bw_estimator; struct timeval send_bw_start; /* used for bandwidth estimation */ @@ -393,6 +395,7 @@ **/ struct _RtpSession { + ortp_mutex_t main_mutex; /* To protect data that can be accessed simultaneously by a control thread and the real-time thread in charge of sending/receiving. */ RtpSession *next; /* next RtpSession, when the session are enqueued by the scheduler */ int mask_pos; /* the position in the scheduler mask of RtpSession : do not move this field: it is part of the ABI since the session_set macros use it*/ struct { @@ -459,6 +462,14 @@ bool_t is_spliced; bool_t congestion_detector_enabled; bool_t video_bandwidth_estimator_enabled; + bool_t is_primary; /* tells if this session is the primary of the rtp bundle */ + + bool_t warn_non_working_pkt_info; + + /* bundle mode */ + struct _RtpBundle *bundle; /* back pointer to the rtp bundle object */ + queue_t bundleq; + ortp_mutex_t bundleq_lock; }; /** @@ -750,6 +761,8 @@ ORTP_PUBLIC void rtp_session_set_reuseaddr(RtpSession *session, bool_t yes); +ORTP_PUBLIC int meta_rtp_transport_sendto(RtpTransport *t, mblk_t *msg , int flags, const struct sockaddr *to, socklen_t tolen); + ORTP_PUBLIC int meta_rtp_transport_modifier_inject_packet_to_send(RtpTransport *t, RtpTransportModifier *tpm, mblk_t *msg, int flags); ORTP_PUBLIC int meta_rtp_transport_modifier_inject_packet_to_send_to(RtpTransport *t, RtpTransportModifier *tpm, mblk_t *msg, int flags, const struct sockaddr *to, socklen_t tolen); ORTP_PUBLIC int meta_rtp_transport_modifier_inject_packet_to_recv(RtpTransport *t, RtpTransportModifier *tpm, mblk_t *msg, int flags); @@ -772,12 +785,37 @@ ORTP_PUBLIC void meta_rtp_transport_destroy(RtpTransport *tp); ORTP_PUBLIC void meta_rtp_transport_append_modifier(RtpTransport *tp,RtpTransportModifier *tpm); ORTP_PUBLIC void meta_rtp_transport_prepend_modifier(RtpTransport *tp,RtpTransportModifier *tpm); +ORTP_PUBLIC void meta_rtp_transport_remove_modifier(RtpTransport *tp, RtpTransportModifier *tpm); ORTP_PUBLIC int rtp_session_splice(RtpSession *session, RtpSession *to_session); ORTP_PUBLIC int rtp_session_unsplice(RtpSession *session, RtpSession *to_session); ORTP_PUBLIC bool_t ortp_stream_is_ipv6(OrtpStream *os); +/* RtpBundle api */ +typedef struct _RtpBundle RtpBundle; + +ORTP_PUBLIC RtpBundle* rtp_bundle_new(void); +ORTP_PUBLIC void rtp_bundle_delete(RtpBundle *bundle); + +ORTP_PUBLIC int rtp_bundle_get_mid_extension_id(RtpBundle *bundle); +ORTP_PUBLIC void rtp_bundle_set_mid_extension_id(RtpBundle *bundle, int id); + +ORTP_PUBLIC void rtp_bundle_add_session(RtpBundle *bundle, const char *mid, RtpSession *session); +ORTP_PUBLIC void rtp_bundle_remove_session_by_id(RtpBundle *bundle, const char *mid); +ORTP_PUBLIC void rtp_bundle_remove_session(RtpBundle *bundle, RtpSession *session); +ORTP_PUBLIC void rtp_bundle_clear(RtpBundle *bundle); + +ORTP_PUBLIC RtpSession* rtp_bundle_get_primary_session(RtpBundle *bundle); +ORTP_PUBLIC void rtp_bundle_set_primary_session(RtpBundle *bundle, const char * mid); + +ORTP_PUBLIC const char *rtp_bundle_get_session_mid(RtpBundle *bundle, RtpSession *session); + +ORTP_PUBLIC int rtp_bundle_send_through_primary(RtpBundle *bundle, bool_t is_rtp, mblk_t *m, int flags, const struct sockaddr *destaddr, socklen_t destlen); +/* Returns FALSE if the rtp packet or at least one of the RTCP packet (compound) was for the primary */ +ORTP_PUBLIC bool_t rtp_bundle_dispatch(RtpBundle *bundle, bool_t is_rtp, mblk_t *m, bool_t received_by_rtcp_mux); +ORTP_PUBLIC void rtp_session_use_local_addr(RtpSession * session, const char * rtp_local_addr, const char * rtcp_local_addr); + #ifdef __cplusplus } #endif -- Gitblit v1.8.0