/// <summary>
 /// Initializes a new instance of the <see cref="AudioBehaviours"/> class.
 /// </summary>
 /// <param name="behaviours">
 /// The behaviours.
 /// </param>
 public AudioBehaviours(AudioBehaviours behaviours)
 {
     this.SelectedBehaviour = behaviours.SelectedBehaviour;
     this.SelectedTrackDefaultBehaviour = behaviours.SelectedTrackDefaultBehaviour;
     this.SelectedLangauges = new BindingList<string>(behaviours.selectedLangauges.ToList());
     this.BehaviourTracks = behaviours.BehaviourTracks;
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AudioBehaviours"/> class.
 /// </summary>
 /// <param name="behaviours">
 /// The behaviours.
 /// </param>
 public AudioBehaviours(AudioBehaviours behaviours)
 {
     this.SelectedBehaviour             = behaviours.SelectedBehaviour;
     this.SelectedTrackDefaultBehaviour = behaviours.SelectedTrackDefaultBehaviour;
     this.SelectedLangauges             = new BindingList <string>(behaviours.selectedLangauges.ToList());
     this.BehaviourTracks = behaviours.BehaviourTracks;
 }
예제 #3
0
 public AudioBehaviours(AudioBehaviours behaviours)
 {
     this.SelectedBehaviour             = behaviours.SelectedBehaviour;
     this.SelectedTrackDefaultBehaviour = behaviours.SelectedTrackDefaultBehaviour;
     this.SelectedLanguages             = new BindingList <string>(behaviours.selectedLanguages.ToList());
     this.BehaviourTracks        = behaviours.BehaviourTracks;
     this.AllowedPassthruOptions = new AllowedPassthru(behaviours.AllowedPassthruOptions);
 }
예제 #4
0
        /// <summary>
        /// Clone this object
        /// </summary>
        /// <returns>
        /// The <see cref="object"/>.
        /// </returns>
        public AudioBehaviours Clone()
        {
            AudioBehaviours cloned = new AudioBehaviours
            {
                SelectedBehaviour = this.selectedBehaviour,
                SelectedLangauges = new BindingList <string>()
            };

            foreach (var item in this.SelectedLangauges)
            {
                cloned.SelectedLangauges.Add(item);
            }

            return(cloned);
        }
        /// <summary>
        /// Prepare the Preset window to create a Preset Object later.
        /// </summary>
        /// <param name="task">
        /// The Encode Task.
        /// </param>
        /// <param name="title">
        /// The title.
        /// </param>
        /// <param name="audioBehaviours">
        /// The audio Behaviours.
        /// </param>
        /// <param name="subtitleBehaviours">
        /// The subtitle Behaviours.
        /// </param>
        public void Setup(EncodeTask task, Title title, AudioBehaviours audioBehaviours, SubtitleBehaviours subtitleBehaviours)
        {
            this.Preset.Task = new EncodeTask(task);
            this.Preset.AudioTrackBehaviours = audioBehaviours.Clone();
            this.Preset.SubtitleTrackBehaviours = subtitleBehaviours.Clone();
            this.selectedTitle = title;

            switch (task.Anamorphic)
            {
                default:
                    this.SelectedPictureSettingMode = PresetPictureSettingsMode.Custom;
                    if (title != null && title.Resolution != null)
                    {
                        this.CustomWidth = title.Resolution.Width;
                        this.CustomHeight = title.Resolution.Height;
                    }
                    break;
                case Anamorphic.Strict:
                    this.SelectedPictureSettingMode = PresetPictureSettingsMode.SourceMaximum;
                    break;
            }
        }
예제 #6
0
        /// <summary>
        /// Update this preset.
        /// The given parameters should be copy-constructed.
        /// </summary>
        /// <param name="task">
        /// The task.
        /// </param>
        /// <param name="audioBehaviours">
        /// The audio behaviours.
        /// </param>
        /// <param name="subtitleBehaviours">
        /// The subtitle behaviours.
        /// </param>
        public void Update(EncodeTask task, AudioBehaviours audioBehaviours, SubtitleBehaviours subtitleBehaviours)
        {
            // Copy over Max Width / Height for the following picture settings modes.
            if (this.PictureSettingsMode == PresetPictureSettingsMode.Custom
                || this.PictureSettingsMode == PresetPictureSettingsMode.SourceMaximum)
            {
                task.MaxWidth = this.Task.MaxWidth;
                task.MaxHeight = this.Task.MaxHeight;
            }

            this.Task = task;
            this.AudioTrackBehaviours = new AudioBehaviours(audioBehaviours);
            this.SubtitleTrackBehaviours = new SubtitleBehaviours(subtitleBehaviours);
        }
예제 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AudioBehaviours"/> class.
 /// </summary>
 /// <param name="behaviours">
 /// The behaviours.
 /// </param>
 public AudioBehaviours(AudioBehaviours behaviours)
 {
     this.SelectedBehaviour = behaviours.SelectedBehaviour;
     this.SelectedLangauges = new BindingList <string>(behaviours.selectedLangauges);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AudioBehaviours"/> class.
 /// </summary>
 /// <param name="behaviours">
 /// The behaviours.
 /// </param>
 public AudioBehaviours(AudioBehaviours behaviours)
 {
     this.SelectedBehaviour = behaviours.SelectedBehaviour;
     this.SelectedLangauges = new BindingList<string>(behaviours.selectedLangauges.ToList());
 }
        /// <summary>
        /// Clone this object
        /// </summary>
        /// <returns>
        /// The <see cref="object"/>.
        /// </returns>
        public AudioBehaviours Clone()
        {
            AudioBehaviours cloned = new AudioBehaviours
                       {
                           SelectedBehaviour = this.selectedBehaviour,
                           SelectedLangauges = new BindingList<string>()
                       };

            foreach (var item in this.SelectedLangauges)
            {
                cloned.SelectedLangauges.Add(item);
            }

            return cloned;
        }