// --------------------------------------------------------------------------------------------------------------------
//
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
//
//
// The video tune.
//
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Services.Encode.Model.Models.Video
{
using VideoTuneFactory = HandBrakeWPF.Services.Encode.Factories.VideoTuneFactory;
///
/// The video tune.
///
public class VideoTune
{
///
/// Static object to represent "None"
///
public static VideoTune None = new VideoTune("None", "none");
///
/// Static object to represent "None"
///
public static VideoTune FastDecode = new VideoTune("Fast Decode", "fastdecode");
///
/// Initializes a new instance of the class.
///
public VideoTune()
{
}
///
/// Initializes a new instance of the class.
///
///
/// The display name.
///
///
/// The short name.
///
public VideoTune(string displayName, string shortName)
{
this.DisplayName = VideoTuneFactory.GetDisplayName(displayName);
this.ShortName = shortName;
}
///
/// Gets or sets the display name.
///
public string DisplayName { get; set; }
///
/// Gets or sets the short name.
///
public string ShortName { get; set; }
///
/// The clone.
///
///
/// The .
///
public VideoTune Clone()
{
return new VideoTune(this.DisplayName, this.ShortName);
}
///
/// The equals.
///
///
/// The other.
///
///
/// The .
///
protected bool Equals(HandBrakeWPF.Services.Encode.Model.Models.Video.VideoProfile other)
{
return string.Equals(this.DisplayName, other.DisplayName) && string.Equals(this.ShortName, other.ShortName);
}
///
/// The equals.
///
///
/// The other.
///
///
/// The .
///
protected bool Equals(VideoTune other)
{
return string.Equals(this.ShortName, other.ShortName);
}
///
/// The equals.
///
///
/// The obj.
///
///
/// The .
///
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj))
{
return false;
}
if (ReferenceEquals(this, obj))
{
return true;
}
if (obj.GetType() != this.GetType())
{
return false;
}
return this.Equals((VideoTune)obj);
}
///
/// The get hash code.
///
///
/// The .
///
public override int GetHashCode()
{
return (this.ShortName != null ? this.ShortName.GetHashCode() : 0);
}
}
}