Ejemplo n.º 1
0
        public VideoIndex(IOptions <VideoConfiguration> options)
        {
            this.options = options.Value;

            RootNodes = new List <VideoNode>();
            flatList  = new List <VideoNode>();

            PopulateVideoNodes();
        }
Ejemplo n.º 2
0
        public void ApplyConfiguration()
        {
            if (resolutionSelect.GetSelection().Equals("720p"))
            {
                VideoConfiguration.RESOLUTION_WIDTH  = 1280;
                VideoConfiguration.RESOLUTION_HEIGHT = 720;
            }
            else if (resolutionSelect.GetSelection().Equals("1080p"))
            {
                VideoConfiguration.RESOLUTION_WIDTH  = 1920;
                VideoConfiguration.RESOLUTION_HEIGHT = 1080;
            }
            else if (resolutionSelect.GetSelection().Equals("1440p"))
            {
                VideoConfiguration.RESOLUTION_WIDTH  = 2560;
                VideoConfiguration.RESOLUTION_HEIGHT = 1440;
            }
            else if (resolutionSelect.GetSelection().Equals("4K"))
            {
                VideoConfiguration.RESOLUTION_WIDTH  = 3840;
                VideoConfiguration.RESOLUTION_HEIGHT = 2160;
            }

            if (vsyncSelect.GetSelection().Equals("On"))
            {
                VideoConfiguration.VSYNC = true;
            }
            else
            {
                VideoConfiguration.VSYNC = false;
            }

            if (windowModeSelect.GetSelection().Equals("Fullscreen"))
            {
                VideoConfiguration.FULLSCREEN = true;
            }
            else
            {
                VideoConfiguration.FULLSCREEN = false;
            }

            if (frameLimitSelect.GetSelection().Equals("Unlimited"))
            {
                VideoConfiguration.FRAME_LIMIT = 0;
            }
            else
            {
                VideoConfiguration.FRAME_LIMIT = int.Parse(frameLimitSelect.GetSelection());
            }

            VideoConfiguration.Apply();

            Camera.ResolutionUpdated();

            SceneManager.OnResolutionChanged();
        }
        public void TestVideoConversion5Using264AndScaleByHalf()
        {
            var videoConfiguration = new VideoConfiguration
            {
                Scale = VideoConfiguration.VideoScale.half
            };

            var          arguments         = videoConfiguration.GetPartArguments();
            const string expectedArguments = "vcodec=h264,scale=0.5";

            Assert.AreEqual(expectedArguments, arguments);
        }
        public void TestVideoConversion4UsingG264AndScaleVideoByCustomHeight()
        {
            var videoConfiguration = new VideoConfiguration
            {
                YFrameSize = 100
            };

            var          arguments         = videoConfiguration.GetPartArguments();
            const string expectedArguments = "vcodec=h264,scale=Auto,height=100";

            Assert.AreEqual(expectedArguments, arguments);
        }
        public void TestVideoConversion3UsingG264AndScaleVideoByCustomWidth()
        {
            var videoConfiguration = new VideoConfiguration
            {
                XFrameSize = 320
            };

            var          arguments         = videoConfiguration.GetPartArguments();
            const string expectedArguments = "vcodec=h264,scale=Auto,width=320";

            Assert.AreEqual(expectedArguments, arguments);
        }
        public void TestVideoConversion2UsingMpg2AndMpgAudio()
        {
            var videoConfiguration = new VideoConfiguration
            {
                Format = VideoConfiguration.VlcVideoFormat.Mpeg2
            };

            var          arguments         = videoConfiguration.GetPartArguments();
            const string expectedArguments = "vcodec=mp2v,vb=800";

            Assert.AreEqual(expectedArguments, arguments);
        }
        public void TestVideoConversion1UsingH264AndMpgAudio()
        {
            var videoConfiguration = new VideoConfiguration
            {
                Format = VideoConfiguration.VlcVideoFormat.h264,
                Scale  = VideoConfiguration.VideoScale.Auto
            };

            var          arguments         = videoConfiguration.GetPartArguments();
            const string expectedArguments = "vcodec=h264,scale=Auto";

            Assert.AreEqual(expectedArguments, arguments);
        }
        public void TestVideoConversion6UsingMpg2AndSetCustomBitrate()
        {
            var videoConfiguration = new VideoConfiguration
            {
                Format = VideoConfiguration.VlcVideoFormat.Mpeg2,
                Mpg2Vb = 432
            };

            var          arguments         = videoConfiguration.GetPartArguments();
            const string expectedArguments = "vcodec=mp2v,vb=432";

            Assert.AreEqual(expectedArguments, arguments);
        }
Ejemplo n.º 9
0
        public static int GetHwaResolutions(VideoConfiguration config)
        {
            if (config.HwaResolution > -1)
            {
                return(config.HwaResolution);
            }

            if (VideoConfiguration.GpuModel.IndexOf("Intel") > -1)
            {
                return(7); // SD + HD + UHD
            }
            else
            {
                return(3); // SD + HD;
            }
        }
Ejemplo n.º 10
0
 public static void Seed(AppDbContext context, IConfiguration configuration)
 {
     TenantConfiguration.Seed(context, configuration);
     CardConfiguration.Seed(context);
     CardLayoutConfiguration.Seed(context);
     UserConfiguration.Seed(context, configuration);
     TaxConfiguration.Seed(context);
     DriverConfiguration.Seed(context, configuration);
     ProductConfiguration.Seed(context);
     WarehouseConfiguration.Seed(context);
     InventoryItemConfiguration.Seed(context);
     HtmlContentConfiguration.Seed(context);
     DigitalAssetConfiguration.Seed(context);
     EmailTemplateConfiguration.Seed(context);
     VideoConfiguration.Seed(context);
     ProfessionalServiceProviderConfiguration.Seed(context);
     //DashboardConfiguration.Seed(context);
 }
Ejemplo n.º 11
0
        //public static string GpuModel
        //{
        //    get
        //    {
        //        if (String.IsNullOrWhiteSpace(_gpuModel))
        //        {
        //            //this may not work for multi-GPU systems
        //            using (ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_DisplayConfiguration"))
        //            {
        //                foreach (ManagementObject mo in searcher.Get())
        //                {
        //                    foreach (PropertyData property in mo.Properties)
        //                    {
        //                        if (property.Name == "Description")
        //                        {
        //                            _gpuModel = property.Value.ToString();
        //                            break;
        //                        }
        //                    }
        //                    mo.Dispose();
        //                }
        //            }
        //        }
        //        return _gpuModel;
        //    }
        //}

        public static LAVHWAccel GetHwaMode(VideoConfiguration config, bool preferDXVA2)
        {
            if (config.HwaMode > -1)
            {
                return((LAVHWAccel)config.HwaMode);
            }
            else if (preferDXVA2)
            {
                return(LAVHWAccel.DXVA2Native);
            }
            else
            {
                //if (VideoConfiguration.GpuModel.IndexOf("Intel") > -1)
                //    return LAVHWAccel.QuickSync;
                //else
                return(LAVHWAccel.DXVA2CopyBack);
            }
        }
Ejemplo n.º 12
0
 public FileHandlerFactory(IOptions <VideoConfiguration> videoConfig, IOptions <FileConfiguration> fileConfig)
 {
     this.videoConfig = videoConfig.Value;
     this.fileConfig  = fileConfig.Value;
 }
Ejemplo n.º 13
0
 public VideoHandler(VideoConfiguration config)
 {
     this.config = config;
 }
Ejemplo n.º 14
0
 public VideoConfigurationViewModel(VideoConfiguration config)
     : base(config)
 {
 }
Ejemplo n.º 15
0
 public HomeController(VideoIndex videoIndex, IOptions <VideoConfiguration> options)
 {
     this.videoIndex = videoIndex;
     this.options    = options.Value;
 }