Esempio n. 1
0
        private void SaveLiveRecordSettings()
        {
            _configManager.LocalLiveStreamInfo.LiveStreamBitRate       = SelectedLiveRate;
            _configManager.LocalLiveStreamInfo.LiveStreamDisplayHeight = int.Parse(SelectedLiveDisplay.Split('*')[1]);
            _configManager.LocalLiveStreamInfo.LiveStreamDisplayWidth  = int.Parse(SelectedLiveDisplay.Split('*')[0]);
            _configManager.LocalLiveStreamInfo.PushLiveStreamUrl       = ManualPushLiveStreamUrl;

            _configManager.RemoteLiveStreamInfo.LiveStreamBitRate       = SelectedRemoteRate;
            _configManager.RemoteLiveStreamInfo.LiveStreamDisplayHeight =
                int.Parse(SelectedRemoteDisplay.Split('*')[1]);
            _configManager.RemoteLiveStreamInfo.LiveStreamDisplayWidth = int.Parse(SelectedRemoteDisplay.Split('*')[0]);


            _configManager.RecordInfo.RecordBitRate       = SelectedLocalBitrate;
            _configManager.RecordInfo.RecordDirectory     = SelectedLocalPath;
            _configManager.RecordInfo.RecordDisplayWidth  = int.Parse(SelectedLocalResolution.Split('*')[0]);
            _configManager.RecordInfo.RecordDisplayHeight = int.Parse(SelectedLocalResolution.Split('*')[1]);

            //Common.ConfigManager.WriteConfig();
        }
Esempio n. 2
0
        private void SaveSetting()
        {
            try
            {
                if (_configManager == null)
                {
                    _configManager = new ConfigManager
                    {
                        LocalLiveStreamInfo  = new LiveStreamInfo(),
                        RemoteLiveStreamInfo = new LiveStreamInfo(),
                        RecordInfo           = new RecordInfo()
                    };
                }

                _configManager.LocalLiveStreamInfo.LiveStreamBitRate       = SelectedLiveRate;
                _configManager.LocalLiveStreamInfo.LiveStreamDisplayHeight = int.Parse(SelectedLiveDisplay.Split('*')[1]);
                _configManager.LocalLiveStreamInfo.LiveStreamDisplayWidth  = int.Parse(SelectedLiveDisplay.Split('*')[0]);

                _configManager.RemoteLiveStreamInfo.LiveStreamBitRate       = SelectedRemoteRate;
                _configManager.RemoteLiveStreamInfo.LiveStreamDisplayHeight =
                    int.Parse(SelectedRemoteDisplay.Split('*')[1]);
                _configManager.RemoteLiveStreamInfo.LiveStreamDisplayWidth = int.Parse(SelectedRemoteDisplay.Split('*')[0]);


                _configManager.RecordInfo.RecordBitRate       = SelectedLocalBitrate;
                _configManager.RecordInfo.RecordDirectory     = SelectedLocalPath;
                _configManager.RecordInfo.RecordDisplayWidth  = int.Parse(SelectedLocalResolution.Split('*')[0]);
                _configManager.RecordInfo.RecordDisplayHeight = int.Parse(SelectedLocalResolution.Split('*')[1]);

                _localDataManager.SaveSettingConfigData(_configManager);
            }
            catch (Exception ex)
            {
                Log.Logger.Error($"直播设置SaveSetting() exception:{ex}");
                MessageQueueManager.Instance.AddError(MessageManager.SaveError);
            }
        }