Example #1
0
        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();
        }
Example #2
0
        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;
                }
            };
        }
Example #3
0
        public VideoViewModel()
        {
            if (ScreenVSLI.Count > 1)
            {
                AvailableVideoSourceKinds.Add(new KeyValuePair <VideoSourceKind, string>(VideoSourceKind.Screen, "Screen"));
            }

            RefreshCodecs();

            RefreshVideoSources();
        }