public VideoViewModel() { // Check if there are multiple Screens if (ScreenItem.Count > 1) { AvailableVideoSourceKinds.Add(new KeyValuePair <VideoSourceKind, string>(VideoSourceKind.Screen, "Screen")); } // Check if SharpAvi is available if (File.Exists("SharpAvi.dll")) { AvailableVideoWriterKinds.Add(VideoWriterKind.SharpAvi); SelectedVideoWriterKind = VideoWriterKind.SharpAvi; } // Check if FFMpeg is available if (File.Exists("ffmpeg.exe")) { AvailableVideoWriterKinds.Add(VideoWriterKind.FFMpeg); SelectedVideoWriterKind = VideoWriterKind.FFMpeg; } RefreshCodecs(); RefreshVideoSources(); }
public void Init() { RegionProvider = ServiceProvider.Get <IRegionProvider>(ServiceName.RegionProvider); // Check if there are multiple Screens if (ScreenItem.Count > 1) { AvailableVideoSourceKinds.Add(new ObjectLocalizer <VideoSourceKind>(VideoSourceKind.Screen, nameof(Resources.Screen))); } // Check if SharpAvi is available if (ServiceProvider.FileExists("SharpAvi.dll")) { AvailableVideoWriterKinds.Add(VideoWriterKind.SharpAvi); SelectedVideoWriterKind = VideoWriterKind.SharpAvi; } // Check if FFMpeg is available RefreshFFMpeg(); RefreshCodecs(); RefreshVideoSources(); ServiceProvider.FFMpegPathChanged += RefreshFFMpeg; RegionProvider.SelectorHidden += () => { if (SelectedVideoSourceKind == VideoSourceKind.Region) { SelectedVideoSourceKind = VideoSourceKind.Window; } }; }
public VideoViewModel() { if (ScreenVSLI.Count > 1) { AvailableVideoSourceKinds.Add(new KeyValuePair <VideoSourceKind, string>(VideoSourceKind.Screen, "Screen")); } RefreshCodecs(); RefreshVideoSources(); }