public static void RefreshVideoSources() { AvailableVideoSources.Clear(); switch (SelectedVideoSourceKind) { case VideoSourceKind.Window: AvailableVideoSources.Add(WindowVSLI.Desktop); AvailableVideoSources.Add(WindowVSLI.TaskBar); foreach (var win in WindowHandler.EnumerateVisible()) { AvailableVideoSources.Add(new WindowVSLI(win.Handle)); } break; case VideoSourceKind.Screen: foreach (var Screen in ScreenVSLI.Enumerate()) { AvailableVideoSources.Add(Screen); } break; } if (Instance != null && SelectedVideoSourceKind != VideoSourceKind.NoVideo) { Instance.VideoSourceBox.SelectedIndex = 0; } }
public void RefreshVideoSources() { AvailableVideoSources.Clear(); switch (SelectedVideoSourceKind) { case VideoSourceKind.Window: AvailableVideoSources.Add(WindowVSLI.Desktop); AvailableVideoSources.Add(WindowVSLI.TaskBar); foreach (var win in Window.EnumerateVisible()) { AvailableVideoSources.Add(new WindowVSLI(win)); } SelectedVideoSource = WindowVSLI.Desktop; break; case VideoSourceKind.Screen: foreach (var screen in ScreenVSLI.Enumerate()) { AvailableVideoSources.Add(screen); } SelectedVideoSource = AvailableVideoSources[0]; break; } }
public void RefreshVideoSources() { AvailableVideoSources.Clear(); // RegionSelector should only be shown on Region Capture. ServiceProvider.RegionProvider.SelectorVisible = SelectedVideoSourceKind == VideoSourceKind.Region; switch (SelectedVideoSourceKind) { case VideoSourceKind.Window: AvailableVideoSources.Add(WindowItem.TaskBar); foreach (var win in Window.EnumerateVisible()) { AvailableVideoSources.Add(new WindowItem(win)); } break; case VideoSourceKind.DesktopDuplication: foreach (var screen in ScreenItem.Enumerate(true)) { AvailableVideoSources.Add(screen); } break; case VideoSourceKind.Screen: AvailableVideoSources.Add(FullScreenItem.Instance); foreach (var screen in ScreenItem.Enumerate(false)) { AvailableVideoSources.Add(screen); } break; case VideoSourceKind.Region: AvailableVideoSources.Add(ServiceProvider.RegionProvider.VideoSource); break; case VideoSourceKind.NoVideo: AvailableVideoSources.Add(WaveItem.Instance); foreach (var item in FFMpegAudioItem.Items) { AvailableVideoSources.Add(item); } break; } // Set first source as default if (AvailableVideoSources.Count > 0) { SelectedVideoSource = AvailableVideoSources[0]; } }
public void RefreshVideoSources() { AvailableVideoSources.Clear(); switch (SelectedVideoSourceKind) { case VideoSourceKind.Window: // Desktop would be default AvailableVideoSources.Add(WindowItem.Desktop); AvailableVideoSources.Add(WindowItem.TaskBar); foreach (var win in Window.EnumerateVisible()) { AvailableVideoSources.Add(new WindowItem(win)); } break; case VideoSourceKind.Screen: foreach (var screen in ScreenItem.Enumerate()) { AvailableVideoSources.Add(screen); } break; case VideoSourceKind.Region: AvailableVideoSources.Add(RegionItem.Instance); break; } // Set first source as default if (AvailableVideoSources.Count > 0) { SelectedVideoSource = AvailableVideoSources[0]; } // RegionSelector should only be shown on Region Capture. if (SelectedVideoSourceKind == VideoSourceKind.Region) { RegionSelector.Instance.Show(); } else { RegionSelector.Instance.Hide(); } }
public void RefreshVideoSources() { AvailableVideoSources.Clear(); switch (SelectedVideoSourceKind) { case VideoSourceKind.Window: // Desktop would be default AvailableVideoSources.Add(WindowItem.Desktop); AvailableVideoSources.Add(WindowItem.TaskBar); // Prevent RegionSelector from showing here RegionProvider.SelectorVisible = false; foreach (var win in Window.EnumerateVisible()) { AvailableVideoSources.Add(new WindowItem(win)); } break; case VideoSourceKind.Screen: foreach (var screen in ScreenItem.Enumerate()) { AvailableVideoSources.Add(screen); } break; case VideoSourceKind.Region: AvailableVideoSources.Add(RegionProvider.VideoSource); break; } // Set first source as default if (AvailableVideoSources.Count > 0) { SelectedVideoSource = AvailableVideoSources[0]; } // RegionSelector should only be shown on Region Capture. RegionProvider.SelectorVisible = SelectedVideoSourceKind == VideoSourceKind.Region; }