Example #1
0
        private OpenVideoResult InstanciateGenerator(string filePath)
        {
            OpenVideoResult res       = OpenVideoResult.NotSupported;
            string          extension = Path.GetExtension(filePath).ToLower();

            switch (extension)
            {
            case ".jpg":
            case ".jpeg":
            case ".png":
            case ".bmp":
            {
                generator = new FrameGeneratorImageFile();
                break;
            }

            default:
                throw new NotImplementedException();
            }

            if (generator != null)
            {
                res         = generator.Initialize(filePath);
                initialized = res == OpenVideoResult.Success;
            }
            return(res);
        }
        private OpenVideoResult InstanciateGenerator(SyntheticVideo video)
        {
            OpenVideoResult res = OpenVideoResult.NotSupported;

            generator   = new FrameGeneratorSyntheticVideo(video);
            res         = generator.Initialize(null);
            initialized = res == OpenVideoResult.Success;
            return(res);
        }
Example #3
0
        private OpenVideoResult InstanciateGenerator(string filePath)
        {
            OpenVideoResult res       = OpenVideoResult.NotSupported;
            string          extension = Path.GetExtension(filePath).ToLower();

            if (extension != ".svg")
            {
                throw new NotImplementedException();
            }

            generator   = new FrameGeneratorSVG();
            res         = generator.Initialize(filePath);
            initialized = res == OpenVideoResult.Success;
            return(res);
        }