Exemplo n.º 1
0
        private MeetingSetting GetDefaultConfigParameters()
        {
            MeetingSetting defaultConfigParameter = new MeetingSetting();

            defaultConfigParameter.Audio.BitRateList.Add("64000");
            defaultConfigParameter.Audio.SampleRateList.Add("16000");

            defaultConfigParameter.UserCameraSetting.BitRateList.Add("500");
            defaultConfigParameter.UserCameraSetting.BitRateList.Add("600");
            defaultConfigParameter.UserCameraSetting.BitRateList.Add("800");
            defaultConfigParameter.UserCameraSetting.BitRateList.Add("1000");
            defaultConfigParameter.UserCameraSetting.BitRateList.Add("1200");
            defaultConfigParameter.UserCameraSetting.BitRateList.Add("1600");
            defaultConfigParameter.UserCameraSetting.BitRateList.Add("2000");
            defaultConfigParameter.UserCameraSetting.BitRateList.Add("3000");

            defaultConfigParameter.UserCameraSetting.ResolutionList.Add("640*360");
            defaultConfigParameter.UserCameraSetting.ResolutionList.Add("640*480");
            defaultConfigParameter.UserCameraSetting.ResolutionList.Add("1024*768");
            defaultConfigParameter.UserCameraSetting.ResolutionList.Add("1280*720");
            defaultConfigParameter.UserCameraSetting.ResolutionList.Add("1920*1080");


            defaultConfigParameter.DataCameraSetting.BitRateList.Add("500");
            defaultConfigParameter.DataCameraSetting.BitRateList.Add("600");
            defaultConfigParameter.DataCameraSetting.BitRateList.Add("800");
            defaultConfigParameter.DataCameraSetting.BitRateList.Add("1000");
            defaultConfigParameter.DataCameraSetting.BitRateList.Add("1200");
            defaultConfigParameter.DataCameraSetting.BitRateList.Add("1600");
            defaultConfigParameter.DataCameraSetting.BitRateList.Add("2000");
            defaultConfigParameter.DataCameraSetting.BitRateList.Add("3000");

            defaultConfigParameter.DataCameraSetting.ResolutionList.Add("640*360");
            defaultConfigParameter.DataCameraSetting.ResolutionList.Add("640*480");
            defaultConfigParameter.DataCameraSetting.ResolutionList.Add("1024*768");
            defaultConfigParameter.DataCameraSetting.ResolutionList.Add("1280*720");
            defaultConfigParameter.DataCameraSetting.ResolutionList.Add("1920*1080");

            defaultConfigParameter.Live.BitRateList.Add("500");
            defaultConfigParameter.Live.BitRateList.Add("600");
            defaultConfigParameter.Live.BitRateList.Add("700");
            defaultConfigParameter.Live.BitRateList.Add("900");
            defaultConfigParameter.Live.BitRateList.Add("1200");
            defaultConfigParameter.Live.BitRateList.Add("1500");
            defaultConfigParameter.Live.BitRateList.Add("1800");
            defaultConfigParameter.Live.BitRateList.Add("2000");
            defaultConfigParameter.Live.BitRateList.Add("2500");
            defaultConfigParameter.Live.BitRateList.Add("3000");

            defaultConfigParameter.Live.ResolutionList.Add("640*360");
            defaultConfigParameter.Live.ResolutionList.Add("640*480");
            defaultConfigParameter.Live.ResolutionList.Add("1024*768");
            defaultConfigParameter.Live.ResolutionList.Add("1280*720");
            defaultConfigParameter.Live.ResolutionList.Add("1920*1080");

            return(defaultConfigParameter);
        }
Exemplo n.º 2
0
        private async Task CloneParameters(MeetingSetting newParameters)
        {
            await _meetingConfigView.Dispatcher.BeginInvoke(new Action(() =>
            {
                MeetingConfigParameter.Audio.Clear();
                MeetingConfigParameter.UserCameraSetting.ResolutionList.Clear();
                MeetingConfigParameter.UserCameraSetting.BitRateList.Clear();
                MeetingConfigParameter.DataCameraSetting.ResolutionList.Clear();
                MeetingConfigParameter.DataCameraSetting.BitRateList.Clear();
                MeetingConfigParameter.Live.ResolutionList.Clear();
                MeetingConfigParameter.Live.BitRateList.Clear();

                newParameters.Audio.BitRateList.ToList().ForEach(bitrate =>
                {
                    MeetingConfigParameter.Audio.BitRateList.Add(bitrate);
                });

                newParameters.Audio.SampleRateList.ToList().ForEach(samplerate =>
                {
                    MeetingConfigParameter.Audio.SampleRateList.Add(samplerate);
                });

                newParameters.UserCameraSetting.BitRateList.ToList().ForEach(bitrate =>
                {
                    MeetingConfigParameter.UserCameraSetting.BitRateList.Add(bitrate);
                });

                newParameters.UserCameraSetting.ResolutionList.ToList().ForEach(resolution =>
                {
                    MeetingConfigParameter.UserCameraSetting.ResolutionList.Add(resolution);
                });

                newParameters.DataCameraSetting.BitRateList.ToList().ForEach(bitrate =>
                {
                    MeetingConfigParameter.DataCameraSetting.BitRateList.Add(bitrate);
                });

                newParameters.DataCameraSetting.ResolutionList.ToList().ForEach(resolution =>
                {
                    MeetingConfigParameter.DataCameraSetting.ResolutionList.Add(resolution);
                });

                newParameters.Live.BitRateList.ToList().ForEach(bitrate =>
                {
                    MeetingConfigParameter.Live.BitRateList.Add(bitrate);
                });

                newParameters.Live.ResolutionList.ToList().ForEach(resolution =>
                {
                    MeetingConfigParameter.Live.ResolutionList.Add(resolution);
                });
            }));
        }
Exemplo n.º 3
0
        //methods
        public void InitializeBindingDataSource()
        {
            CachedCameras     = new List <string>();
            CachedMicrophones = new List <string>();
            CachedSpeakers    = new List <string>();

            MainCameras      = new ObservableCollection <string>();
            SecondaryCameras = new ObservableCollection <string>();

            MainMicrophones        = new ObservableCollection <string>();
            SecondaryMicrophones   = new ObservableCollection <string>();
            Speakers               = new List <string>();
            MeetingConfigResult    = new AggregatedConfig();
            MeetingConfigParameter = new MeetingSetting();

            ConfigItemTag = new ConfigItemTag();
        }
Exemplo n.º 4
0
        private async Task GetParametersAsync()
        {
            await Task.Run(async() =>
            {
                string configParameterPath = Path.Combine(Environment.CurrentDirectory, Common.GlobalResources.SettingPath);

                if (!File.Exists(configParameterPath))
                {
                    MeetingConfigParameter = GetDefaultConfigParameters();
                    string json            = JsonConvert.SerializeObject(MeetingConfigParameter, Formatting.Indented);

                    File.WriteAllText(configParameterPath, json, Encoding.UTF8);
                }
                else
                {
                    string json = File.ReadAllText(configParameterPath, Encoding.UTF8);

                    MeetingSetting tempMeetingSetting = JsonConvert.DeserializeObject <MeetingSetting>(json);

                    await CloneParameters(tempMeetingSetting);
                }
            });
        }