< 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 10/25/2025 - 12:09:58 AM Line coverage: 0% (0/13) Branch coverage: 0% (0/4) Total lines: 2201/19/2026 - 12:13:54 AM Line coverage: 0% (0/13) Branch coverage: 0% (0/4) Total lines: 218 10/25/2025 - 12:09:58 AM Line coverage: 0% (0/13) Branch coverage: 0% (0/4) Total lines: 2201/19/2026 - 12:13:54 AM Line coverage: 0% (0/13) Branch coverage: 0% (0/4) Total lines: 218

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        /// <summary>
 47        /// Gets or sets the audio sample rate.
 48        /// </summary>
 49        /// <value>The audio sample rate.</value>
 50        public int? AudioSampleRate { get; set; }
 51
 52        public int? MaxAudioBitDepth { get; set; }
 53
 54        /// <summary>
 55        /// Gets or sets the audio bit rate.
 56        /// </summary>
 57        /// <value>The audio bit rate.</value>
 58        public int? AudioBitRate { get; set; }
 59
 60        /// <summary>
 61        /// Gets or sets the audio channels.
 62        /// </summary>
 63        /// <value>The audio channels.</value>
 64        public int? AudioChannels { get; set; }
 65
 66        public int? MaxAudioChannels { get; set; }
 67
 68        public bool Static { get; set; }
 69
 70        /// <summary>
 71        /// Gets or sets the profile.
 72        /// </summary>
 73        /// <value>The profile.</value>
 74        public string Profile { get; set; }
 75
 76        /// <summary>
 77        /// Gets or sets the video range type.
 78        /// </summary>
 79        /// <value>The video range type.</value>
 80        public string VideoRangeType { get; set; }
 81
 82        /// <summary>
 83        /// Gets or sets the level.
 84        /// </summary>
 85        /// <value>The level.</value>
 86        public string Level { get; set; }
 87
 88        /// <summary>
 89        /// Gets or sets the codec tag.
 90        /// </summary>
 91        /// <value>The codec tag.</value>
 92        public string CodecTag { get; set; }
 93
 94        /// <summary>
 95        /// Gets or sets the framerate.
 96        /// </summary>
 97        /// <value>The framerate.</value>
 98        public float? Framerate { get; set; }
 99
 100        public float? MaxFramerate { get; set; }
 101
 102        public bool CopyTimestamps { get; set; }
 103
 104        /// <summary>
 105        /// Gets or sets the start time ticks.
 106        /// </summary>
 107        /// <value>The start time ticks.</value>
 108        public long? StartTimeTicks { get; set; }
 109
 110        /// <summary>
 111        /// Gets or sets the width.
 112        /// </summary>
 113        /// <value>The width.</value>
 114        public int? Width { get; set; }
 115
 116        /// <summary>
 117        /// Gets or sets the height.
 118        /// </summary>
 119        /// <value>The height.</value>
 120        public int? Height { get; set; }
 121
 122        /// <summary>
 123        /// Gets or sets the width of the max.
 124        /// </summary>
 125        /// <value>The width of the max.</value>
 126        public int? MaxWidth { get; set; }
 127
 128        /// <summary>
 129        /// Gets or sets the height of the max.
 130        /// </summary>
 131        /// <value>The height of the max.</value>
 132        public int? MaxHeight { get; set; }
 133
 134        /// <summary>
 135        /// Gets or sets the video bit rate.
 136        /// </summary>
 137        /// <value>The video bit rate.</value>
 138        public int? VideoBitRate { get; set; }
 139
 140        /// <summary>
 141        /// Gets or sets the index of the subtitle stream.
 142        /// </summary>
 143        /// <value>The index of the subtitle stream.</value>
 144        public int? SubtitleStreamIndex { get; set; }
 145
 146        public SubtitleDeliveryMethod SubtitleMethod { get; set; }
 147
 148        public int? MaxRefFrames { get; set; }
 149
 150        public int? MaxVideoBitDepth { get; set; }
 151
 152        public bool RequireAvc { get; set; }
 153
 154        public bool DeInterlace { get; set; }
 155
 156        public bool RequireNonAnamorphic { get; set; }
 157
 158        public int? TranscodingMaxAudioChannels { get; set; }
 159
 160        public int? CpuCoreLimit { get; set; }
 161
 162        public string LiveStreamId { get; set; }
 163
 164        public bool EnableMpegtsM2TsMode { get; set; }
 165
 166        /// <summary>
 167        /// Gets or sets the video codec.
 168        /// </summary>
 169        /// <value>The video codec.</value>
 170        public string VideoCodec { get; set; }
 171
 172        public string SubtitleCodec { get; set; }
 173
 174        public string TranscodeReasons { get; set; }
 175
 176        /// <summary>
 177        /// Gets or sets the index of the audio stream.
 178        /// </summary>
 179        /// <value>The index of the audio stream.</value>
 180        public int? AudioStreamIndex { get; set; }
 181
 182        /// <summary>
 183        /// Gets or sets the index of the video stream.
 184        /// </summary>
 185        /// <value>The index of the video stream.</value>
 186        public int? VideoStreamIndex { get; set; }
 187
 188        public EncodingContext Context { get; set; }
 189
 190        public Dictionary<string, string> StreamOptions { get; set; }
 191
 192        public bool EnableAudioVbrEncoding { get; set; }
 193
 194        public bool AlwaysBurnInSubtitleWhenTranscoding { 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}