Exemple #1
0
        public void RefreshCodecs()
        {
            // Available Codecs
            AvailableVideoWriters.Clear();

            switch (SelectedVideoWriterKind)
            {
            case VideoWriterKind.SharpAvi:
                InitSharpAviCodecs();
                break;

            case VideoWriterKind.Gif:
                AvailableVideoWriters.Add(GifItem.Instance);

                SelectedVideoWriter = GifItem.Instance;
                break;

            case VideoWriterKind.FFMpeg:
                foreach (var item in FFMpegItem.Items)
                {
                    AvailableVideoWriters.Add(item);
                }

                SelectedVideoWriter = AvailableVideoWriters[0];
                break;

            case VideoWriterKind.Folder:
                var folderItem = new FolderItem();

                AvailableVideoWriters.Add(folderItem);
                SelectedVideoWriter = folderItem;

                break;
            }
        }
Exemple #2
0
        void InitSharpAviCodecs()
        {
            foreach (var codec in AviWriter.EnumerateEncoders())
            {
                var item = new SharpAviItem(codec);

                AvailableVideoWriters.Add(item);

                // Set MotionJpeg as default
                if (codec == AviCodec.MotionJpeg)
                {
                    SelectedVideoWriter = item;
                }
            }
        }