< Summary - Jellyfin

Information
Class: MediaBrowser.Controller.MediaEncoding.BaseEncodingJobOptions
Assembly: MediaBrowser.Controller
File(s): /srv/git/jellyfin/MediaBrowser.Controller/MediaEncoding/BaseEncodingJobOptions.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 13
Coverable lines: 13
Total lines: 218
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 4
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%210%
GetOption(...)0%620%
GetOption(...)0%620%

File(s)

/srv/git/jellyfin/MediaBrowser.Controller/MediaEncoding/BaseEncodingJobOptions.cs

#LineLine coverage
 1#nullable disable
 2
 3#pragma warning disable CS1591
 4
 5using System;
 6using System.Collections.Generic;
 7using MediaBrowser.Model.Dlna;
 8
 9namespace MediaBrowser.Controller.MediaEncoding
 10{
 11    public class BaseEncodingJobOptions
 12    {
 13        public BaseEncodingJobOptions()
 14        {
 015            EnableAutoStreamCopy = true;
 016            AllowVideoStreamCopy = true;
 017            AllowAudioStreamCopy = true;
 018            Context = EncodingContext.Streaming;
 019            StreamOptions = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
 020        }
 21
 22        /// <summary>
 23        /// Gets or sets the id.
 24        /// </summary>
 25        /// <value>The id.</value>
 26        public Guid Id { get; set; }
 27
 28        public string MediaSourceId { get; set; }
 29
 30        public string DeviceId { get; set; }
 31
 32        public string Container { get; set; }
 33
 34        /// <summary>
 35        /// Gets or sets the audio codec.
 36        /// </summary>
 37        /// <value>The audio codec.</value>
 38        public string AudioCodec { get; set; }
 39
 40        public bool EnableAutoStreamCopy { get; set; }
 41
 42        public bool AllowVideoStreamCopy { get; set; }
 43
 44        public bool AllowAudioStreamCopy { get; set; }
 45
 46        public bool BreakOnNonKeyFrames { get; set; }
 47
 48        /// <summary>
 49        /// Gets or sets the audio sample rate.
 50        /// </summary>
 51        /// <value>The audio sample rate.</value>
 52        public int? AudioSampleRate { get; set; }
 53
 54        public int? MaxAudioBitDepth { get; set; }
 55
 56        /// <summary>
 57        /// Gets or sets the audio bit rate.
 58        /// </summary>
 59        /// <value>The audio bit rate.</value>
 60        public int? AudioBitRate { get; set; }
 61
 62        /// <summary>
 63        /// Gets or sets the audio channels.
 64        /// </summary>
 65        /// <value>The audio channels.</value>
 66        public int? AudioChannels { get; set; }
 67
 68        public int? MaxAudioChannels { get; set; }
 69
 70        public bool Static { get; set; }
 71
 72        /// <summary>
 73        /// Gets or sets the profile.
 74        /// </summary>
 75        /// <value>The profile.</value>
 76        public string Profile { get; set; }
 77
 78        /// <summary>
 79        /// Gets or sets the video range type.
 80        /// </summary>
 81        /// <value>The video range type.</value>
 82        public string VideoRangeType { get; set; }
 83
 84        /// <summary>
 85        /// Gets or sets the level.
 86        /// </summary>
 87        /// <value>The level.</value>
 88        public string Level { get; set; }
 89
 90        /// <summary>
 91        /// Gets or sets the codec tag.
 92        /// </summary>
 93        /// <value>The codec tag.</value>
 94        public string CodecTag { get; set; }
 95
 96        /// <summary>
 97        /// Gets or sets the framerate.
 98        /// </summary>
 99        /// <value>The framerate.</value>
 100        public float? Framerate { get; set; }
 101
 102        public float? MaxFramerate { get; set; }
 103
 104        public bool CopyTimestamps { get; set; }
 105
 106        /// <summary>
 107        /// Gets or sets the start time ticks.
 108        /// </summary>
 109        /// <value>The start time ticks.</value>
 110        public long? StartTimeTicks { get; set; }
 111
 112        /// <summary>
 113        /// Gets or sets the width.
 114        /// </summary>
 115        /// <value>The width.</value>
 116        public int? Width { get; set; }
 117
 118        /// <summary>
 119        /// Gets or sets the height.
 120        /// </summary>
 121        /// <value>The height.</value>
 122        public int? Height { get; set; }
 123
 124        /// <summary>
 125        /// Gets or sets the width of the max.
 126        /// </summary>
 127        /// <value>The width of the max.</value>
 128        public int? MaxWidth { get; set; }
 129
 130        /// <summary>
 131        /// Gets or sets the height of the max.
 132        /// </summary>
 133        /// <value>The height of the max.</value>
 134        public int? MaxHeight { get; set; }
 135
 136        /// <summary>
 137        /// Gets or sets the video bit rate.
 138        /// </summary>
 139        /// <value>The video bit rate.</value>
 140        public int? VideoBitRate { get; set; }
 141
 142        /// <summary>
 143        /// Gets or sets the index of the subtitle stream.
 144        /// </summary>
 145        /// <value>The index of the subtitle stream.</value>
 146        public int? SubtitleStreamIndex { get; set; }
 147
 148        public SubtitleDeliveryMethod SubtitleMethod { get; set; }
 149
 150        public int? MaxRefFrames { get; set; }
 151
 152        public int? MaxVideoBitDepth { get; set; }
 153
 154        public bool RequireAvc { get; set; }
 155
 156        public bool DeInterlace { get; set; }
 157
 158        public bool RequireNonAnamorphic { get; set; }
 159
 160        public int? TranscodingMaxAudioChannels { get; set; }
 161
 162        public int? CpuCoreLimit { get; set; }
 163
 164        public string LiveStreamId { get; set; }
 165
 166        public bool EnableMpegtsM2TsMode { get; set; }
 167
 168        /// <summary>
 169        /// Gets or sets the video codec.
 170        /// </summary>
 171        /// <value>The video codec.</value>
 172        public string VideoCodec { get; set; }
 173
 174        public string SubtitleCodec { get; set; }
 175
 176        public string TranscodeReasons { get; set; }
 177
 178        /// <summary>
 179        /// Gets or sets the index of the audio stream.
 180        /// </summary>
 181        /// <value>The index of the audio stream.</value>
 182        public int? AudioStreamIndex { get; set; }
 183
 184        /// <summary>
 185        /// Gets or sets the index of the video stream.
 186        /// </summary>
 187        /// <value>The index of the video stream.</value>
 188        public int? VideoStreamIndex { get; set; }
 189
 190        public EncodingContext Context { get; set; }
 191
 192        public Dictionary<string, string> StreamOptions { get; set; }
 193
 194        public bool EnableAudioVbrEncoding { get; set; }
 195
 196        public string GetOption(string qualifier, string name)
 197        {
 0198            var value = GetOption(qualifier + "-" + name);
 199
 0200            if (string.IsNullOrEmpty(value))
 201            {
 0202                value = GetOption(name);
 203            }
 204
 0205            return value;
 206        }
 207
 208        public string GetOption(string name)
 209        {
 0210            if (StreamOptions.TryGetValue(name, out var value))
 211            {
 0212                return value;
 213            }
 214
 0215            return null;
 216        }
 217    }
 218}