Example #1
0
        public GlobalState()
        {
            SettingsPath     = Application.LocalUserAppDataPath;
            SettingsFilePath = Path.Combine(SettingsPath, SettingsFileName);

            SourceList = new VideoInputDeviceList();
            AudioList  = new AudioInputDeviceList();

            Settings = new CaptureSettings();

            /*{
             *  //SourceName = "3",
             *  //SourceName = "CY",
             *  //SourceName = "Unknown (3)",
             *
             *  SourceSettings = new Dictionary<string, SourceSettings>
             *  {
             *      {  "CY3014 USB, Analog 01 Capture", new SourceSettings
             *          {
             *              SourceAspectFit = SourceAspectFit.LetterBox,
             *              FixedResolution = true,
             *
             *              ResolutionWidth = 1024,
             *              ResolutionHeight = 768,
             *
             *              MultiplyerHeight = 1,
             *              MultiplyerWidth = 1,
             *          }
             *      },
             *  },
             *
             *  //AudioName = "Line In",
             * };*/
        }
Example #2
0
        public void TryShowSource(VideoInputDeviceList sourceList,
                                  AudioInputDeviceList audioList)
        {
            foreach (var entry in sourceList.List)
            {
                try
                {
                    if (entry != null && entry.Filter != null)
                    {
                        Play(entry.Filter, AudioSource);
                    }
                    break;
                }
                catch (Exception ex)
                {
                    System.Diagnostics.Debug.WriteLine(ex.Message);
                    System.Diagnostics.Debug.WriteLine(ex.StackTrace);
                }
            }

            foreach (var entry in audioList.List)
            {
                try
                {
                    if (entry != null && entry.Filter != null)
                    {
                        Play(Source, entry.Filter);
                    }
                    break;
                }
                catch (Exception ex)
                {
                    System.Diagnostics.Debug.WriteLine(ex.Message);
                    System.Diagnostics.Debug.WriteLine(ex.StackTrace);
                }
            }
        }