Transcode to audio codec satisfied other conditions when copy check failed. (#13209)

This commit is contained in:
gnattu
2025-01-01 00:15:05 +08:00
committed by GitHub
parent cea0c95942
commit 8aa41d5904
2 changed files with 70 additions and 5 deletions

View File

@@ -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;
/// <summary>
/// A class for transcoding profile information.
/// Note for client developers: Conditions defined in <see cref="CodecProfile"/> has higher priority and can override values defined here.
/// </summary>
public class TranscodingProfile
{
@@ -17,6 +19,33 @@ public class TranscodingProfile
Conditions = [];
}
/// <summary>
/// Initializes a new instance of the <see cref="TranscodingProfile" /> class copying the values from another instance.
/// </summary>
/// <param name="other">Another instance of <see cref="TranscodingProfile" /> to be copied.</param>
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;
}
/// <summary>
/// Gets or sets the container.
/// </summary>