blob: e578d9688ad5c6ec93379510b61fb196474ff72c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="EncoderOptionsViewModel.cs" company="HandBrake Project (http://handbrake.fr)">
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
// </copyright>
// <summary>
// The Simple Encoder options screen
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.ViewModels
{
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Parsing;
using HandBrake.Interop.Model.Encoding;
using HandBrakeWPF.ViewModels.Interfaces;
/// <summary>
/// The Simple Encoder options screen
/// </summary>
public class EncoderOptionsViewModel : ViewModelBase, IEncoderOptionsViewModel, ITabInterface
{
/// <summary>
/// Initializes a new instance of the <see cref="EncoderOptionsViewModel"/> class.
/// </summary>
public EncoderOptionsViewModel()
{
this.Task = new EncodeTask();
}
/// <summary>
/// Gets or sets the task.
/// </summary>
public EncodeTask Task { get; set; }
/// <summary>
/// Gets or sets the options string.
/// </summary>
public string AdvancedOptionsString
{
get
{
return this.Task.AdvancedEncoderOptions;
}
set
{
this.Task.AdvancedEncoderOptions = value;
this.NotifyOfPropertyChange(() => this.AdvancedOptionsString);
}
}
/// <summary>
/// The set source.
/// </summary>
/// <param name="selectedTitle">
/// The selected title.
/// </param>
/// <param name="currentPreset">
/// The current preset.
/// </param>
/// <param name="task">
/// The task.
/// </param>
public void SetSource(Title selectedTitle, Preset currentPreset, EncodeTask task)
{
this.Task = task;
this.NotifyOfPropertyChange(() => this.AdvancedOptionsString);
}
/// <summary>
/// The set preset.
/// </summary>
/// <param name="preset">
/// The preset.
/// </param>
/// <param name="task">
/// The task.
/// </param>
public void SetPreset(Preset preset, EncodeTask task)
{
this.Task = task;
this.AdvancedOptionsString = preset.Task.AdvancedEncoderOptions;
}
/// <summary>
/// The update task.
/// </summary>
/// <param name="task">
/// The task.
/// </param>
public void UpdateTask(EncodeTask task)
{
this.Task = task;
this.NotifyOfPropertyChange(() => this.AdvancedOptionsString);
}
/// <summary>
/// The set encoder.
/// </summary>
/// <param name="encoder">
/// The encoder.
/// </param>
public void SetEncoder(VideoEncoder encoder)
{
}
/// <summary>
/// The clear.
/// </summary>
public void Clear()
{
}
}
}
|