< Summary - Jellyfin

Information
Class: MediaBrowser.Model.Dlna.TranscodingProfile
Assembly: MediaBrowser.Model
File(s): /srv/git/jellyfin/MediaBrowser.Model/Dlna/TranscodingProfile.cs
Line coverage
10%
Covered lines: 2
Uncovered lines: 18
Coverable lines: 20
Total lines: 159
Line coverage: 10%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 10/18/2025 - 12:10:13 AM Line coverage: 9.5% (2/21) Total lines: 1591/19/2026 - 12:13:54 AM Line coverage: 10% (2/20) Total lines: 159

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%11100%
.ctor(...)100%210%

File(s)

/srv/git/jellyfin/MediaBrowser.Model/Dlna/TranscodingProfile.cs

#LineLine coverage
 1using System;
 2using System.ComponentModel;
 3using System.Xml.Serialization;
 4using Jellyfin.Data.Enums;
 5
 6namespace MediaBrowser.Model.Dlna;
 7
 8/// <summary>
 9/// A class for transcoding profile information.
 10/// Note for client developers: Conditions defined in <see cref="CodecProfile"/> has higher priority and can override va
 11/// </summary>
 12public class TranscodingProfile
 13{
 14    /// <summary>
 15    /// Initializes a new instance of the <see cref="TranscodingProfile" /> class.
 16    /// </summary>
 17    public TranscodingProfile()
 18    {
 220119        Conditions = [];
 220120    }
 21
 22    /// <summary>
 23    /// Initializes a new instance of the <see cref="TranscodingProfile" /> class copying the values from another instan
 24    /// </summary>
 25    /// <param name="other">Another instance of <see cref="TranscodingProfile" /> to be copied.</param>
 26    public TranscodingProfile(TranscodingProfile other)
 27    {
 028        ArgumentNullException.ThrowIfNull(other);
 29
 030        Container = other.Container;
 031        Type = other.Type;
 032        VideoCodec = other.VideoCodec;
 033        AudioCodec = other.AudioCodec;
 034        Protocol = other.Protocol;
 035        EstimateContentLength = other.EstimateContentLength;
 036        EnableMpegtsM2TsMode = other.EnableMpegtsM2TsMode;
 037        TranscodeSeekInfo = other.TranscodeSeekInfo;
 038        CopyTimestamps = other.CopyTimestamps;
 039        Context = other.Context;
 040        EnableSubtitlesInManifest = other.EnableSubtitlesInManifest;
 041        MaxAudioChannels = other.MaxAudioChannels;
 042        MinSegments = other.MinSegments;
 043        SegmentLength = other.SegmentLength;
 044        Conditions = other.Conditions;
 045        EnableAudioVbrEncoding = other.EnableAudioVbrEncoding;
 046    }
 47
 48    /// <summary>
 49    /// Gets or sets the container.
 50    /// </summary>
 51    [XmlAttribute("container")]
 52    public string Container { get; set; } = string.Empty;
 53
 54    /// <summary>
 55    /// Gets or sets the DLNA profile type.
 56    /// </summary>
 57    [XmlAttribute("type")]
 58    public DlnaProfileType Type { get; set; }
 59
 60    /// <summary>
 61    /// Gets or sets the video codec.
 62    /// </summary>
 63    [XmlAttribute("videoCodec")]
 64    public string VideoCodec { get; set; } = string.Empty;
 65
 66    /// <summary>
 67    /// Gets or sets the audio codec.
 68    /// </summary>
 69    [XmlAttribute("audioCodec")]
 70    public string AudioCodec { get; set; } = string.Empty;
 71
 72    /// <summary>
 73    /// Gets or sets the protocol.
 74    /// </summary>
 75    [XmlAttribute("protocol")]
 76    public MediaStreamProtocol Protocol { get; set; } = MediaStreamProtocol.http;
 77
 78    /// <summary>
 79    /// Gets or sets a value indicating whether the content length should be estimated.
 80    /// </summary>
 81    [DefaultValue(false)]
 82    [XmlAttribute("estimateContentLength")]
 83    public bool EstimateContentLength { get; set; }
 84
 85    /// <summary>
 86    /// Gets or sets a value indicating whether M2TS mode is enabled.
 87    /// </summary>
 88    [DefaultValue(false)]
 89    [XmlAttribute("enableMpegtsM2TsMode")]
 90    public bool EnableMpegtsM2TsMode { get; set; }
 91
 92    /// <summary>
 93    /// Gets or sets the transcoding seek info mode.
 94    /// </summary>
 95    [DefaultValue(TranscodeSeekInfo.Auto)]
 96    [XmlAttribute("transcodeSeekInfo")]
 97    public TranscodeSeekInfo TranscodeSeekInfo { get; set; }
 98
 99    /// <summary>
 100    /// Gets or sets a value indicating whether timestamps should be copied.
 101    /// </summary>
 102    [DefaultValue(false)]
 103    [XmlAttribute("copyTimestamps")]
 104    public bool CopyTimestamps { get; set; }
 105
 106    /// <summary>
 107    /// Gets or sets the encoding context.
 108    /// </summary>
 109    [DefaultValue(EncodingContext.Streaming)]
 110    [XmlAttribute("context")]
 111    public EncodingContext Context { get; set; }
 112
 113    /// <summary>
 114    /// Gets or sets a value indicating whether subtitles are allowed in the manifest.
 115    /// </summary>
 116    [DefaultValue(false)]
 117    [XmlAttribute("enableSubtitlesInManifest")]
 118    public bool EnableSubtitlesInManifest { get; set; }
 119
 120    /// <summary>
 121    /// Gets or sets the maximum audio channels.
 122    /// </summary>
 123    [XmlAttribute("maxAudioChannels")]
 124    public string? MaxAudioChannels { get; set; }
 125
 126    /// <summary>
 127    /// Gets or sets the minimum amount of segments.
 128    /// </summary>
 129    [DefaultValue(0)]
 130    [XmlAttribute("minSegments")]
 131    public int MinSegments { get; set; }
 132
 133    /// <summary>
 134    /// Gets or sets the segment length.
 135    /// </summary>
 136    [DefaultValue(0)]
 137    [XmlAttribute("segmentLength")]
 138    public int SegmentLength { get; set; }
 139
 140    /// <summary>
 141    /// Gets or sets a value indicating whether breaking the video stream on non-keyframes is supported.
 142    /// </summary>
 143    [DefaultValue(false)]
 144    [XmlAttribute("breakOnNonKeyFrames")]
 145    [Obsolete("This is always false")]
 146    public bool? BreakOnNonKeyFrames { get; set; }
 147
 148    /// <summary>
 149    /// Gets or sets the profile conditions.
 150    /// </summary>
 151    public ProfileCondition[] Conditions { get; set; }
 152
 153    /// <summary>
 154    /// Gets or sets a value indicating whether variable bitrate encoding is supported.
 155    /// </summary>
 156    [DefaultValue(true)]
 157    [XmlAttribute("enableAudioVbrEncoding")]
 158    public bool EnableAudioVbrEncoding { get; set; } = true;
 159}