mirror of https://github.com/ErsatzTV/ErsatzTV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.1 KiB
32 lines
1.1 KiB
using ErsatzTV.Application.Resolutions; |
|
using ErsatzTV.Core.Domain; |
|
|
|
namespace ErsatzTV.Application.FFmpegProfiles |
|
{ |
|
internal static class Mapper |
|
{ |
|
internal static FFmpegProfileViewModel ProjectToViewModel(FFmpegProfile profile) => |
|
new( |
|
profile.Id, |
|
profile.Name, |
|
profile.ThreadCount, |
|
profile.Transcode, |
|
Project(profile.Resolution), |
|
profile.NormalizeResolution, |
|
profile.VideoCodec, |
|
profile.NormalizeVideoCodec, |
|
profile.VideoBitrate, |
|
profile.VideoBufferSize, |
|
profile.AudioCodec, |
|
profile.NormalizeAudioCodec, |
|
profile.AudioBitrate, |
|
profile.AudioBufferSize, |
|
profile.AudioVolume, |
|
profile.AudioChannels, |
|
profile.AudioSampleRate, |
|
profile.NormalizeAudio); |
|
|
|
private static ResolutionViewModel Project(Resolution resolution) => |
|
new(resolution.Id, resolution.Name, resolution.Width, resolution.Height); |
|
} |
|
}
|
|
|