From 8cb11692a9628c59a7238d7ecbfbabb268959392 Mon Sep 17 00:00:00 2001 From: gnattu Date: Mon, 3 Feb 2025 16:56:01 -0500 Subject: Backport pull request #13209 from jellyfin/release-10.10.z Transcode to audio codec satisfied other conditions when copy check failed. Original-merge: 8aa41d59041c792571530c514dd6d21ba22a1881 Merged-by: crobibero Backported-by: Bond_009 --- MediaBrowser.Model/Dlna/TranscodingProfile.cs | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'MediaBrowser.Model/Dlna/TranscodingProfile.cs') diff --git a/MediaBrowser.Model/Dlna/TranscodingProfile.cs b/MediaBrowser.Model/Dlna/TranscodingProfile.cs index 5a9fa22ae..5797d4250 100644 --- a/MediaBrowser.Model/Dlna/TranscodingProfile.cs +++ b/MediaBrowser.Model/Dlna/TranscodingProfile.cs @@ -1,3 +1,4 @@ +using System; using System.ComponentModel; using System.Xml.Serialization; using Jellyfin.Data.Enums; @@ -6,6 +7,7 @@ namespace MediaBrowser.Model.Dlna; /// /// A class for transcoding profile information. +/// Note for client developers: Conditions defined in has higher priority and can override values defined here. /// public class TranscodingProfile { @@ -17,6 +19,33 @@ public class TranscodingProfile Conditions = []; } + /// + /// Initializes a new instance of the class copying the values from another instance. + /// + /// Another instance of to be copied. + public TranscodingProfile(TranscodingProfile other) + { + ArgumentNullException.ThrowIfNull(other); + + Container = other.Container; + Type = other.Type; + VideoCodec = other.VideoCodec; + AudioCodec = other.AudioCodec; + Protocol = other.Protocol; + EstimateContentLength = other.EstimateContentLength; + EnableMpegtsM2TsMode = other.EnableMpegtsM2TsMode; + TranscodeSeekInfo = other.TranscodeSeekInfo; + CopyTimestamps = other.CopyTimestamps; + Context = other.Context; + EnableSubtitlesInManifest = other.EnableSubtitlesInManifest; + MaxAudioChannels = other.MaxAudioChannels; + MinSegments = other.MinSegments; + SegmentLength = other.SegmentLength; + BreakOnNonKeyFrames = other.BreakOnNonKeyFrames; + Conditions = other.Conditions; + EnableAudioVbrEncoding = other.EnableAudioVbrEncoding; + } + /// /// Gets or sets the container. /// -- cgit v1.2.3