[feat] add SRTP switch in settings

This commit is contained in:
dijunkun
2025-09-24 20:27:56 +08:00
parent aea9505c4c
commit 88c75f94e4
8 changed files with 56 additions and 5 deletions

View File

@@ -30,6 +30,11 @@ int ConfigCenter::SetTurn(bool enable_turn) {
return 0;
}
int ConfigCenter::SetSrtp(bool enable_srtp) {
enable_srtp_ = enable_srtp;
return 0;
}
ConfigCenter::LANGUAGE ConfigCenter::GetLanguage() { return language_; }
ConfigCenter::VIDEO_QUALITY ConfigCenter::GetVideoQuality() {
@@ -42,4 +47,6 @@ ConfigCenter::VIDEO_ENCODE_FORMAT ConfigCenter::GetVideoEncodeFormat() {
bool ConfigCenter::IsHardwareVideoCodec() { return hardware_video_codec_; }
bool ConfigCenter::IsEnableTurn() { return enable_turn_; }
bool ConfigCenter::IsEnableTurn() { return enable_turn_; }
bool ConfigCenter::IsEnableSrtp() { return enable_srtp_; }

View File

@@ -23,6 +23,7 @@ class ConfigCenter {
int SetVideoEncodeFormat(VIDEO_ENCODE_FORMAT video_encode_format);
int SetHardwareVideoCodec(bool hardware_video_codec);
int SetTurn(bool enable_turn);
int SetSrtp(bool enable_srtp);
public:
LANGUAGE GetLanguage();
@@ -30,6 +31,7 @@ class ConfigCenter {
VIDEO_ENCODE_FORMAT GetVideoEncodeFormat();
bool IsHardwareVideoCodec();
bool IsEnableTurn();
bool IsEnableSrtp();
private:
// Default value should be same with parameters in localization.h
@@ -38,6 +40,7 @@ class ConfigCenter {
VIDEO_ENCODE_FORMAT video_encode_format_ = VIDEO_ENCODE_FORMAT::AV1;
bool hardware_video_codec_ = false;
bool enable_turn_ = false;
bool enable_srtp_ = true;
};
#endif