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/mediastreamer2.framework/Headers/flowcontrol.h | 25 ++++++++++++++++++++++++- 1 files changed, 24 insertions(+), 1 deletions(-) diff --git a/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Library/mediastreamer2.framework/Headers/flowcontrol.h b/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Library/mediastreamer2.framework/Headers/flowcontrol.h index 34efa49..d550cd0 100755 --- a/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Library/mediastreamer2.framework/Headers/flowcontrol.h +++ b/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Library/mediastreamer2.framework/Headers/flowcontrol.h @@ -20,9 +20,18 @@ #ifndef flowcontrol_h #define flowcontrol_h +typedef enum _MSAudioFlowControlStrategy{ + MSAudioFlowControlBasic, /**< Immediately drop requested number of samples */ + MSAudioFlowControlSoft /**< Elimate silent frames first, use zero-crossing sample deletion */ +}MSAudioFlowControlStrategy; +typedef struct _MSAudioFlowControlConfig{ + MSAudioFlowControlStrategy strategy; + float silent_threshold; /**< threshold under which a frame is considered as silent (linear), used by "soft" strategy */ +}MSAudioFlowControlConfig; typedef struct _MSAudioFlowController { + MSAudioFlowControlConfig config; uint32_t target_samples; uint32_t total_samples; uint32_t current_pos; @@ -35,6 +44,8 @@ #endif MS2_PUBLIC void ms_audio_flow_controller_init(MSAudioFlowController *ctl); + +MS2_PUBLIC void ms_audio_flow_controller_set_config(MSAudioFlowController *ctl, const MSAudioFlowControlConfig *config); MS2_PUBLIC void ms_audio_flow_controller_set_target(MSAudioFlowController *ctl, uint32_t samples_to_drop, uint32_t total_samples); @@ -50,10 +61,22 @@ } MSAudioFlowControlDropEvent; /** - * Event sent by the filter each time some samples need to be dropped. + * Event than can be emitted by any filter each time some samples need to be dropped. + * @FIXME It is badly named. It should belong to MSFilter base class or to a specific audio interface. **/ #define MS_AUDIO_FLOW_CONTROL_DROP_EVENT MS_FILTER_EVENT(MS_AUDIO_FLOW_CONTROL_ID, 0, MSAudioFlowControlDropEvent) +/** + * Set configuration of the flow controller. It can be changed at run-time. + */ +#define MS_AUDIO_FLOW_CONTROL_SET_CONFIG MS_FILTER_METHOD(MS_AUDIO_FLOW_CONTROL_ID, 0, MSAudioFlowControlConfig) + +/** + * Request to drop samples. + */ +#define MS_AUDIO_FLOW_CONTROL_DROP MS_FILTER_METHOD(MS_AUDIO_FLOW_CONTROL_ID, 1, MSAudioFlowControlDropEvent) + + #ifdef __cplusplus } -- Gitblit v1.8.0