using JianGongYun.TRTC.Models;
using JianGongYun.TRTC.Utils;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Text;
using System.Linq;
using System.Windows.Controls;
using JianGongYun.TRTC.Components;
using System.Windows;
using ManageLiteAV;

namespace JianGongYun.TRTC.ViewModels
{
    public class SettingWindowViewModel : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        /// <summary>
        /// 单例
        /// </summary>
        private static SettingWindowViewModel _Instance;

        public static SettingWindowViewModel GetInstance()
        {
            if (_Instance == null)
            {
                _Instance = new SettingWindowViewModel();
            }
            return _Instance;
        }

        /// <summary>
        /// 直播主窗口viewmodel
        /// </summary>
        private LiveWindowViewModel LiveWindowViewModel
        {
            get
            {
                return LiveClassroom.CurrentLiveWindow.DataContext == null ? null : LiveClassroom.CurrentLiveWindow.DataContext as LiveWindowViewModel;
            }
        }

        #region 音频属性
        /// <summary>
        /// 集合，实时获取
        /// </summary>
        public List<ComboBoxEntity> MicList
        {
            get
            {
                var mics = LiveClassroom.lTXDeviceManager.getDevicesList(ManageLiteAV.TRTCDeviceType.TXMediaDeviceTypeMic);
                List<ComboBoxEntity> micList = new List<ComboBoxEntity>();
                var count = mics.getCount();
                for (uint i = 0; i < count; i++)
                {
                    var temp = new ComboBoxEntity { Id = mics.getDevicePID(i), Text = mics.getDeviceName(i) };
                    micList.Add(temp);
                }
                return micList;
            }
        }

        /// <summary>
        /// 当前
        /// </summary>
        private string _CurrentMic;
        public string CurrentMic
        {
            get
            {
                var tempList = this.MicList;
                if (tempList.Count == 0)
                {
                    return null;
                }
                if (string.IsNullOrEmpty(_CurrentMic) || !tempList.Any(a => a.Id == _CurrentMic))//第一次取或者设备发生变动找不到上次的选择
                {
                    var localMic = storage.GetValue(INI_ROOT_KEY, INI_KEY_CHOOSE_MIC);//本地缓存
                    if (string.IsNullOrEmpty(localMic))//本地没有就取第一个
                    {
                        _CurrentMic = tempList.First().Id;
                        storage.SetValue(INI_ROOT_KEY, INI_KEY_CHOOSE_MIC, _CurrentMic);//生成初始数据
                    }
                    else
                    {
                        _CurrentMic = localMic;
                        var temp = tempList.Where(a => a.Id == localMic).FirstOrDefault();
                        if (temp == null)//找不到上次缓存的设备就取第一个
                        {
                            _CurrentMic = tempList.First().Id;
                            storage.SetValue(INI_ROOT_KEY, INI_KEY_CHOOSE_MIC, _CurrentMic);//生成初始数据
                        }
                    }
                }
                return _CurrentMic;
            }
            set
            {
                _CurrentMic = value;
                storage.SetValue(INI_ROOT_KEY, INI_KEY_CHOOSE_MIC, value);//生成保存本地
                LiveClassroom.lTXDeviceManager.setCurrentDevice(ManageLiteAV.TRTCDeviceType.TXMediaDeviceTypeMic, _CurrentMic);//设置麦克
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("CurrentMic"));//对CurrentMic进行监听
                }
            }
        }


        /// <summary>
        /// 麦克风采集音量
        /// </summary>
        private uint _MicVolume = 100;
        public uint MicVolume
        {
            get
            {
                var micVolume = storage.GetValue(INI_ROOT_KEY, INI_KEY_AUDIO_MIC_VOLUME);//本地缓存
                if (string.IsNullOrEmpty(micVolume))//本地没有就取第一个
                {
                    storage.SetValue(INI_ROOT_KEY, INI_KEY_AUDIO_MIC_VOLUME, _MicVolume.ToString());//生成初始数据
                }
                else
                {
                    _MicVolume = uint.Parse(micVolume);
                }
                return _MicVolume;
            }
            set
            {
                _MicVolume = value;
                storage.SetValue(INI_ROOT_KEY, INI_KEY_AUDIO_MIC_VOLUME, value.ToString());//生成保存本地
                var res = LiveClassroom.lTXDeviceManager.setCurrentDeviceVolume(ManageLiteAV.TRTCDeviceType.TXMediaDeviceTypeMic, _MicVolume);//设置麦克音量
                Console.WriteLine("设置麦克风采集音量" + res);
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("MicVolume"));
                }
            }
        }


        /// <summary>
        /// 音频来源
        /// </summary>
        private string _AudioSource = "1";
        public string AudioSource
        {
            get
            {
                var audioSource = storage.GetValue(INI_ROOT_KEY, INI_KEY_AUDIO_SOURCE);//本地缓存
                if (string.IsNullOrEmpty(audioSource))//本地没有就取第一个
                {
                    storage.SetValue(INI_ROOT_KEY, INI_KEY_AUDIO_SOURCE, _AudioSource);//生成初始数据
                }
                else
                {
                    _AudioSource = audioSource;
                }
                return _AudioSource;
            }
            set
            {
                _AudioSource = value;
                storage.SetValue(INI_ROOT_KEY, INI_KEY_AUDIO_SOURCE, value);//生成保存本地
                if (_AudioSource == "1")//只采集麦克风，关闭系统音采集
                {
                    ShowSytemGatherSlider = Visibility.Collapsed;
                    LiveClassroom.lTRTCCloud.stopSystemAudioLoopback();
                }
                else if (_AudioSource == "2")//麦和系统音，开启采集系统音
                {
                    ShowSytemGatherSlider = Visibility.Visible;
                    LiveClassroom.lTRTCCloud.startSystemAudioLoopback(null);
                }
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("AudioSource"));
                }
            }
        }

        /// <summary>
        /// 是否显示系统采集滑动条
        /// </summary>
        private Visibility _ShowSytemGatherSlider = Visibility.Collapsed;
        public Visibility ShowSytemGatherSlider
        {
            get
            {
                if (AudioSource == "2")
                {
                    _ShowSytemGatherSlider = Visibility.Visible;
                }
                else
                {
                    _ShowSytemGatherSlider = Visibility.Collapsed;
                }
                return _ShowSytemGatherSlider;
            }
            set
            {
                _ShowSytemGatherSlider = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("ShowSytemGatherSlider"));
                }
            }
        }

        /// <summary>
        /// 系统采集音量
        /// </summary>
        private uint _SytemGatherVolume = 100;
        public uint SytemGatherVolume
        {
            get
            {
                var sytemGatherVolume = storage.GetValue(INI_ROOT_KEY, INI_KEY_AUDIO_SYSTEM_GATHER_VOLUME);//本地缓存
                if (string.IsNullOrEmpty(sytemGatherVolume))//本地没有就取第一个
                {
                    storage.SetValue(INI_ROOT_KEY, INI_KEY_AUDIO_SYSTEM_GATHER_VOLUME, _SytemGatherVolume.ToString());//生成初始数据
                }
                else
                {
                    _SytemGatherVolume = uint.Parse(sytemGatherVolume);
                }
                return _SytemGatherVolume;
            }
            set
            {
                _SytemGatherVolume = value;
                storage.SetValue(INI_ROOT_KEY, INI_KEY_AUDIO_SYSTEM_GATHER_VOLUME, value.ToString());//生成保存本地
                LiveClassroom.lTRTCCloud.setSystemAudioLoopbackVolume(_SytemGatherVolume);//设置系统采集音量
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("SytemGatherVolume"));
                }
            }
        }


        #endregion

        #region 录屏属性

        /// <summary>
        /// 视频帧率(fps)
        /// </summary>
        private string _ScreenRecordingFps = "60";
        public string ScreenRecordingFps
        {
            get
            {
                var screenRecordingFps = storage.GetValue(INI_ROOT_KEY, INI_KEY_SCREEN_RECORDING_FPS);//本地缓存
                if (string.IsNullOrEmpty(screenRecordingFps))
                {
                    storage.SetValue(INI_ROOT_KEY, INI_KEY_SCREEN_RECORDING_FPS, _ScreenRecordingFps);//生成初始数据
                }
                else
                {
                    _ScreenRecordingFps = screenRecordingFps;
                }
                return _ScreenRecordingFps;
            }
            set
            {
                _ScreenRecordingFps = value;
                storage.SetValue(INI_ROOT_KEY, INI_KEY_SCREEN_RECORDING_FPS, value);//生成保存本地
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("ScreenRecordingFps"));
                }
            }
        }

        /// <summary>
        /// 音频码率
        /// </summary>
        private string _ScreenRecordingAudioBitrate = "320000";
        public string ScreenRecordingAudioBitrate
        {
            get
            {
                var screenRecordingAudioBitrate = storage.GetValue(INI_ROOT_KEY, INI_KEY_SCREEN_RECORDING_AUDIO_BITRATE);//本地缓存
                if (string.IsNullOrEmpty(screenRecordingAudioBitrate))
                {
                    storage.SetValue(INI_ROOT_KEY, INI_KEY_SCREEN_RECORDING_AUDIO_BITRATE, _ScreenRecordingAudioBitrate);//生成初始数据
                }
                else
                {
                    _ScreenRecordingAudioBitrate = screenRecordingAudioBitrate;
                }
                return _ScreenRecordingAudioBitrate;
            }
            set
            {
                _ScreenRecordingAudioBitrate = value;
                storage.SetValue(INI_ROOT_KEY, INI_KEY_SCREEN_RECORDING_AUDIO_BITRATE, value);//生成保存本地
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("ScreenRecordingAudioBitrate"));
                }
            }
        }

        /// <summary>
        /// 音频采样率
        /// </summary>
        private string _ScreenRecordingAudioFreq = "48000";
        public string ScreenRecordingAudioFreq
        {
            get
            {
                var screenRecordingAudioFreq = storage.GetValue(INI_ROOT_KEY, INI_KEY_SCREEN_RECORDING_AUDIO_FREQ);//本地缓存
                if (string.IsNullOrEmpty(screenRecordingAudioFreq))
                {
                    storage.SetValue(INI_ROOT_KEY, INI_KEY_SCREEN_RECORDING_AUDIO_FREQ, _ScreenRecordingAudioFreq);//生成初始数据
                }
                else
                {
                    _ScreenRecordingAudioFreq = screenRecordingAudioFreq;
                }
                return _ScreenRecordingAudioFreq;
            }
            set
            {
                _ScreenRecordingAudioFreq = value;
                storage.SetValue(INI_ROOT_KEY, INI_KEY_SCREEN_RECORDING_AUDIO_FREQ, value);//生成保存本地
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("ScreenRecordingAudioFreq"));
                }
            }
        }

        /// <summary>
        /// 编码级别
        /// </summary>
        private string _ScreenRecordingProfileLevel = "-profile:v high -level 5.1";
        public string ScreenRecordingProfileLevel
        {
            get
            {
                var screenRecordingProfileLevel = storage.GetValue(INI_ROOT_KEY, INI_KEY_SCREEN_RECORDING_PROFILE_LEVEL);//本地缓存
                if (string.IsNullOrEmpty(screenRecordingProfileLevel))
                {
                    storage.SetValue(INI_ROOT_KEY, INI_KEY_SCREEN_RECORDING_PROFILE_LEVEL, _ScreenRecordingProfileLevel);//生成初始数据
                }
                else
                {
                    _ScreenRecordingProfileLevel = screenRecordingProfileLevel;
                }
                return _ScreenRecordingProfileLevel;
            }
            set
            {
                _ScreenRecordingProfileLevel = value;
                storage.SetValue(INI_ROOT_KEY, INI_KEY_SCREEN_RECORDING_PROFILE_LEVEL, value);//生成保存本地
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("ScreenRecordingProfileLevel"));
                }
            }
        }

        /// <summary>
        /// 录制倒计时
        /// </summary>
        private int _ScreenRecordingCountdown = 3;
        public int ScreenRecordingCountdown
        {
            get
            {
                var screenRecordingCountdown = storage.GetValue(INI_ROOT_KEY, INI_KEY_SCREEN_RECORDING_COUNTDOWN);//本地缓存
                if (string.IsNullOrEmpty(screenRecordingCountdown))
                {
                    storage.SetValue(INI_ROOT_KEY, INI_KEY_SCREEN_RECORDING_COUNTDOWN, _ScreenRecordingCountdown.ToString());//生成初始数据
                }
                else
                {
                    _ScreenRecordingCountdown = int.Parse(screenRecordingCountdown);
                }
                return _ScreenRecordingCountdown;
            }
            set
            {
                _ScreenRecordingCountdown = value;
                storage.SetValue(INI_ROOT_KEY, INI_KEY_SCREEN_RECORDING_COUNTDOWN, value.ToString());//生成保存本地
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("ScreenRecordingCountdown"));
                }
            }
        }

        /// <summary>
        /// 视频保存路径
        /// </summary>
        private string _ScreenRecordingDir;
        public string ScreenRecordingDir
        {
            get
            {
                var screenRecordingDir = storage.GetValue(INI_ROOT_KEY, INI_KEY_SCREEN_RECORDING_DIR);//本地缓存
                if (string.IsNullOrEmpty(screenRecordingDir))
                {
                    storage.SetValue(INI_ROOT_KEY, INI_KEY_SCREEN_RECORDING_DIR, _ScreenRecordingDir);//生成初始数据
                }
                else
                {
                    _ScreenRecordingDir = screenRecordingDir;
                }
                return _ScreenRecordingDir;
            }
            set
            {
                _ScreenRecordingDir = value;
                storage.SetValue(INI_ROOT_KEY, INI_KEY_SCREEN_RECORDING_DIR, value.ToString());//生成保存本地
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("ScreenRecordingDir"));
                }
            }
        }

        #endregion

        #region 直播设置属性

        /// <summary>
        /// 音频质量
        /// </summary>
        private TRTCAudioQuality _LiveAudioLevel = TRTCAudioQuality.TRTCAudioQualityDefault;
        public TRTCAudioQuality LiveAudioLevel
        {
            get
            {
                var liveAudioLevel = storage.GetValue(INI_ROOT_KEY, INI_KEY_LIVE_AUDIO_LEVEL);//本地缓存
                if (string.IsNullOrEmpty(liveAudioLevel))
                {
                    storage.SetValue(INI_ROOT_KEY, INI_KEY_LIVE_AUDIO_LEVEL, _LiveAudioLevel.ToString());//生成初始数据
                }
                else
                {
                    _LiveAudioLevel = (TRTCAudioQuality)Enum.Parse(typeof(TRTCAudioQuality), liveAudioLevel);
                }
                return _LiveAudioLevel;
            }
            set
            {
                _LiveAudioLevel = value;
                storage.SetValue(INI_ROOT_KEY, INI_KEY_LIVE_AUDIO_LEVEL, value.ToString());//生成保存本地
                LiveClassroom.RestartAudio();//重启音频
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("LiveAudioLevel"));
                }
            }
        }
        /// <summary>
        /// 摄像画面帧率
        /// </summary>
        private uint _LiveMainFps = 24;
        public uint LiveMainFps
        {
            get
            {
                var liveMainFps = storage.GetValue(INI_ROOT_KEY, INI_KEY_LIVE_MAIN_FPS);//本地缓存
                if (string.IsNullOrEmpty(liveMainFps))
                {
                    storage.SetValue(INI_ROOT_KEY, INI_KEY_LIVE_MAIN_FPS, _LiveMainFps.ToString());//生成初始数据
                }
                else
                {
                    _LiveMainFps = uint.Parse(liveMainFps);
                }
                return _LiveMainFps;
            }
            set
            {
                _LiveMainFps = value;
                storage.SetValue(INI_ROOT_KEY, INI_KEY_LIVE_MAIN_FPS, value.ToString());//生成保存本地
                LiveClassroom.ResetVideoMain();//重设参数
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("LiveMainFps"));
                }
            }
        }
        /// <summary>
        /// 摄像画面码率
        /// </summary>
        private uint _LiveMainBitrate = 1600;
        public uint LiveMainBitrate
        {
            get
            {
                var liveMainBitrate = storage.GetValue(INI_ROOT_KEY, INI_KEY_LIVE_MAIN_BITTRATE);//本地缓存
                if (string.IsNullOrEmpty(liveMainBitrate))
                {
                    storage.SetValue(INI_ROOT_KEY, INI_KEY_LIVE_MAIN_BITTRATE, _LiveMainBitrate.ToString());//生成初始数据
                }
                else
                {
                    _LiveMainBitrate = uint.Parse(liveMainBitrate);
                }
                return _LiveMainBitrate;
            }
            set
            {
                _LiveMainBitrate = value;
                storage.SetValue(INI_ROOT_KEY, INI_KEY_LIVE_MAIN_BITTRATE, value.ToString());//生成保存本地
                LiveClassroom.ResetVideoMain();//重设参数
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("LiveMainBitrate"));
                }
            }
        }
        /// <summary>
        /// 摄像画面级别
        /// </summary>
        private TRTCVideoQosPreference _LiveMainLevel = TRTCVideoQosPreference.TRTCVideoQosPreferenceClear;
        public TRTCVideoQosPreference LiveMainLevel
        {
            get
            {
                var liveMainLevel = storage.GetValue(INI_ROOT_KEY, INI_KEY_LIVE_MAIN_LEVEL);//本地缓存
                if (string.IsNullOrEmpty(liveMainLevel))
                {
                    storage.SetValue(INI_ROOT_KEY, INI_KEY_LIVE_MAIN_LEVEL, _LiveMainLevel.ToString());//生成初始数据
                }
                else
                {
                    _LiveMainLevel = (TRTCVideoQosPreference)Enum.Parse(typeof(TRTCVideoQosPreference), liveMainLevel);
                }
                return _LiveMainLevel;
            }
            set
            {
                _LiveMainLevel = value;
                storage.SetValue(INI_ROOT_KEY, INI_KEY_LIVE_MAIN_LEVEL, value.ToString());//生成保存本地
                LiveClassroom.ResetVideoMainQos();//重设参数
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("LiveMainLevel"));
                }
            }
        }
        /// <summary>
        /// 屏幕分享帧率
        /// </summary>
        private uint _LiveSubFps = 24;
        public uint LiveSubFps
        {
            get
            {
                var liveSubFps = storage.GetValue(INI_ROOT_KEY, INI_KEY_LIVE_SUB_FPS);//本地缓存
                if (string.IsNullOrEmpty(liveSubFps))
                {
                    storage.SetValue(INI_ROOT_KEY, INI_KEY_LIVE_SUB_FPS, _LiveSubFps.ToString());//生成初始数据
                }
                else
                {
                    _LiveSubFps = uint.Parse(liveSubFps);
                }
                return _LiveSubFps;
            }
            set
            {
                _LiveSubFps = value;
                storage.SetValue(INI_ROOT_KEY, INI_KEY_LIVE_SUB_FPS, value.ToString());//生成保存本地
                LiveClassroom.ResetVideoSub();//重新设置副画面参数
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("LiveSubFps"));
                }
            }
        }
        /// <summary>
        /// 屏幕分享码率
        /// </summary>
        private uint _LiveSubBitrate = 2000;
        public uint LiveSubBitrate
        {
            get
            {
                var liveSubBitrate = storage.GetValue(INI_ROOT_KEY, INI_KEY_LIVE_SUB_BITTRATE);//本地缓存
                if (string.IsNullOrEmpty(liveSubBitrate))
                {
                    storage.SetValue(INI_ROOT_KEY, INI_KEY_LIVE_SUB_BITTRATE, _LiveSubBitrate.ToString());//生成初始数据
                }
                else
                {
                    _LiveSubBitrate = uint.Parse(liveSubBitrate);
                }
                return _LiveSubBitrate;
            }
            set
            {
                _LiveSubBitrate = value;
                storage.SetValue(INI_ROOT_KEY, INI_KEY_LIVE_SUB_BITTRATE, value.ToString());//生成保存本地
                LiveClassroom.ResetVideoSub();//重启音频
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("LiveSubBitrate"));
                }
            }
        }
        #endregion

        #region 参数
        public TRTCVideoEncParam EncParams
        {
            get
            {
                return new TRTCVideoEncParam { enableAdjustRes = false, resMode = TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape, videoBitrate = LiveMainBitrate, videoFps = LiveMainFps };
            }
        }
        public TRTCNetworkQosParam QosParams
        {
            get
            {
                return new TRTCNetworkQosParam { preference = LiveMainLevel };
            }
        }
        public TRTCRenderParams RenderParams
        {
            get
            {
                return new TRTCRenderParams { fillMode = TRTCVideoFillMode.TRTCVideoFillMode_Fill, mirrorType = TRTCVideoMirrorType.TRTCVideoMirrorType_Enable, rotation = TRTCVideoRotation.TRTCVideoRotation0 };
            }
        }
        #endregion

        /// <summary>
        /// ini文件操作
        /// </summary>
        private IniStorage storage;
        private SettingWindowViewModel()
        {
            storage = new IniStorage(sPath);
            _ScreenRecordingDir = Environment.GetFolderPath(Environment.SpecialFolder.CommonVideos);
        }

        #region 配置持久化

        //配置文件路径
        private string sPath = ".\\TRTCConfig.ini";
        //根节点
        private const string INI_ROOT_KEY = "TRTCLOCALCONFIG";
        //音频
        private const string INI_KEY_CHOOSE_MIC = "INI_KEY_CHOOSE_MIC";//当前麦克风
        private const string INI_KEY_AUDIO_MIC_VOLUME = "INI_KEY_AUDIO_MIC_VOLUME";//麦克风音量
        private const string INI_KEY_AUDIO_SPEAKER_VOLUME = "INI_KEY_AUDIO_SOURCE";//播放音量
        private const string INI_KEY_AUDIO_SOURCE = "INI_KEY_AUDIO_SOURCE";//音频来源
        private const string INI_KEY_AUDIO_SYSTEM_GATHER_VOLUME = "INI_KEY_AUDIO_SYSTEM_GATHER_VOLUME";//麦克风音量
        //录屏
        private const string INI_KEY_SCREEN_RECORDING_FPS = "INI_KEY_SCREEN_RECORDING_FPS";//视频帧率(fps)
        private const string INI_KEY_SCREEN_RECORDING_AUDIO_BITRATE = "INI_KEY_SCREEN_RECORDING_AUDIO_BITRATE";//音频码率
        private const string INI_KEY_SCREEN_RECORDING_AUDIO_FREQ = "INI_KEY_SCREEN_RECORDING_AUDIO_FREQ";//音频采样率
        private const string INI_KEY_SCREEN_RECORDING_PROFILE_LEVEL = "INI_KEY_SCREEN_RECORDING_PROFILE_LEVEL";//编码级别
        private const string INI_KEY_SCREEN_RECORDING_COUNTDOWN = "INI_KEY_SCREEN_RECORDING_COUNTDOWN";//录制倒计时
        private const string INI_KEY_SCREEN_RECORDING_DIR = "INI_KEY_SCREEN_RECORDING_DIR";//录制保存路径
        //直播
        private const string INI_KEY_LIVE_AUDIO_LEVEL = "INI_KEY_LIVE_AUDIO_LEVEL";//直播音频等级
        private const string INI_KEY_LIVE_MAIN_FPS = "INI_KEY_LIVE_MAIN_FPS";//直播主帧率
        private const string INI_KEY_LIVE_MAIN_BITTRATE = "INI_KEY_LIVE_MAIN_BITTRATE";//直播主码率
        private const string INI_KEY_LIVE_MAIN_LEVEL = "INI_KEY_LIVE_MAIN_LEVEL";//主画面级别
        private const string INI_KEY_LIVE_SUB_FPS = "INI_KEY_LIVE_SUB_FPS";//屏幕分享帧率
        private const string INI_KEY_LIVE_SUB_BITTRATE = "INI_KEY_LIVE_SUB_BITTRATE";//屏幕分享码率


        #endregion
    }
}
