/// <summary>
        /// Initializes a new instance of the <see cref="EncoderSettingsPresentationModel"/> class.
        /// </summary>
        public EncoderSettingsPresentationModel(IEncoderSettingsView view, IProjectService projectService, IOutputServiceFacade outputServiceFacade, IConfigurationService configurationService)
        {
            this.View                 = view;
            this.projectService       = projectService;
            this.outputServiceFacade  = outputServiceFacade;
            this.configurationService = configurationService;
            this.outputServiceFacade.GenerateOuputCompleted += this.OnGenerateOutputCompleted;
            this.outputServiceFacade.GenerateCompositestreamManifestCompleted += this.OnGenerateCompositestreamManifestCompleted;

            this.Metadata = new OutputMetadata
            {
                Settings = new OutputSettings(),
                WindowsMediaHeaderProperties = new WindowsMediaHeaderProperties()
            };

            this.GenerateOutputCommand = new DelegateCommand <object>(this.GenerateOutput);

            this.ResizeModeOptions = new List <string> {
                "Stretch", "Letterbox"
            };

            this.AspectRatioOptions = new List <string> {
                "Custom", "16:9", "4:3"
            };

            this.FrameRateOptions = new List <double> {
                23.976, 24, 25, 29.97, 30
            };

            this.PbpDataStreamName = "PBP";
            this.AdsDataStreamName = "AD";

            this.View.Model = this;
        }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="EncoderSettingsPresentationModel"/> class.
        /// </summary>
        public EncoderSettingsPresentationModel(IEncoderSettingsView view, IProjectService projectService, IOutputGeneratorService outputService)
        {
            this.View           = view;
            this.projectService = projectService;
            this.outputService  = outputService;
            this.outputService.GenerateOuputCompleted += this.OnGenerateOutputCompleted;

            this.Metadata = new ExpressionEncoderMetadata
            {
                Settings = new ExpressionEncoderSettings(),
                WindowsMediaHeaderProperties = new WindowsMediaHeaderProperties()
            };

            this.GenerateOutputCommand = new DelegateCommand <object>(this.GenerateOutput);

            this.ResizeModeOptions = new List <string> {
                "Stretch", "Letterbox"
            };

            this.AspectRatioOptions = new List <string> {
                "Custom", "16:9", "4:3"
            };

            this.FrameRateOptions = new List <double> {
                23.976, 24, 25, 29.97, 30
            };

            this.View.Model = this;
        }