< Summary - Jellyfin

Information
Class: MediaBrowser.Controller.MediaEncoding.EncodingJobInfo
Assembly: MediaBrowser.Controller
File(s): /srv/git/jellyfin/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 215
Coverable lines: 215
Total lines: 751
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 208
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%
get_TranscodeReasons()0%2040%
get_IgnoreInputDts()100%210%
get_IgnoreInputIndex()100%210%
get_GenPtsInput()100%210%
get_DiscardCorruptFramesInput()100%210%
get_EnableFastSeekInput()100%210%
get_GenPtsOutput()100%210%
get_StartTimeTicks()100%210%
get_CopyTimestamps()100%210%
get_IsSegmentedLiveStream()0%620%
get_TotalOutputBitrate()100%210%
get_OutputWidth()0%110100%
get_OutputHeight()0%110100%
get_OutputAudioSampleRate()0%7280%
get_OutputAudioBitDepth()0%4260%
get_TargetVideoLevel()0%7280%
get_TargetVideoBitDepth()0%4260%
get_TargetRefFrames()0%4260%
get_TargetFramerate()0%7280%
get_TargetTimestamp()0%2040%
get_TargetPacketLength()0%4260%
get_TargetVideoProfile()0%7280%
get_TargetVideoRangeType()0%110100%
get_TargetVideoCodecTag()0%4260%
get_IsTargetAnamorphic()0%4260%
get_ActualOutputVideoCodec()0%2040%
get_ActualOutputAudioCodec()0%2040%
get_IsTargetInterlaced()0%110100%
get_IsTargetAVC()0%4260%
get_TargetVideoStreamCount()0%620%
get_TargetAudioStreamCount()0%620%
get_EnableAudioVbrEncoding()100%210%
get_HlsListSize()100%210%
EnableBreakOnNonKeyFrames(...)0%4260%
GetMediaStreamCount(...)0%620%
GetMimeType(...)0%2040%
DeInterlace(...)0%110100%
GetRequestedProfiles(...)0%4260%
GetRequestedRangeTypes(...)0%4260%
GetRequestedCodecTags(...)0%4260%
GetRequestedLevel(...)0%2040%
GetRequestedMaxRefFrames(...)0%4260%
GetRequestedVideoBitDepth(...)0%4260%
GetRequestedAudioBitDepth(...)0%4260%
GetRequestedAudioChannels(...)0%110100%
ReportTranscodingProgress(...)100%210%

File(s)

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

#LineLine coverage
 1#nullable disable
 2
 3#pragma warning disable CS1591, SA1401
 4
 5using System;
 6using System.Collections.Generic;
 7using System.ComponentModel;
 8using System.Globalization;
 9using System.Linq;
 10using Jellyfin.Data.Enums;
 11using Jellyfin.Database.Implementations.Entities;
 12using MediaBrowser.Model.Dlna;
 13using MediaBrowser.Model.Drawing;
 14using MediaBrowser.Model.Dto;
 15using MediaBrowser.Model.Entities;
 16using MediaBrowser.Model.MediaInfo;
 17using MediaBrowser.Model.Net;
 18using MediaBrowser.Model.Session;
 19
 20namespace MediaBrowser.Controller.MediaEncoding
 21{
 22    // For now, a common base class until the API and MediaEncoding classes are unified
 23    public class EncodingJobInfo
 24    {
 25        public int? OutputAudioBitrate;
 26        public int? OutputAudioChannels;
 27
 28        private TranscodeReason? _transcodeReasons = null;
 29
 30        public EncodingJobInfo(TranscodingJobType jobType)
 31        {
 032            TranscodingType = jobType;
 033            RemoteHttpHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
 034            SupportedAudioCodecs = Array.Empty<string>();
 035            SupportedVideoCodecs = Array.Empty<string>();
 036            SupportedSubtitleCodecs = Array.Empty<string>();
 037        }
 38
 39        public TranscodeReason TranscodeReasons
 40        {
 41            get
 42            {
 043                if (!_transcodeReasons.HasValue)
 44                {
 045                    if (BaseRequest.TranscodeReasons is null)
 46                    {
 047                        _transcodeReasons = 0;
 048                        return 0;
 49                    }
 50
 051                    _ = Enum.TryParse<TranscodeReason>(BaseRequest.TranscodeReasons, out var reason);
 052                    _transcodeReasons = reason;
 53                }
 54
 055                return _transcodeReasons.Value;
 56            }
 57        }
 58
 59        public IProgress<double> Progress { get; set; }
 60
 61        public MediaStream VideoStream { get; set; }
 62
 63        public VideoType VideoType { get; set; }
 64
 65        public Dictionary<string, string> RemoteHttpHeaders { get; set; }
 66
 67        public string OutputVideoCodec { get; set; }
 68
 69        public MediaProtocol InputProtocol { get; set; }
 70
 71        public string MediaPath { get; set; }
 72
 73        public bool IsInputVideo { get; set; }
 74
 75        public string OutputAudioCodec { get; set; }
 76
 77        public int? OutputVideoBitrate { get; set; }
 78
 79        public MediaStream SubtitleStream { get; set; }
 80
 81        public SubtitleDeliveryMethod SubtitleDeliveryMethod { get; set; }
 82
 83        public string[] SupportedSubtitleCodecs { get; set; }
 84
 85        public int InternalSubtitleStreamOffset { get; set; }
 86
 87        public MediaSourceInfo MediaSource { get; set; }
 88
 89        public User User { get; set; }
 90
 91        public long? RunTimeTicks { get; set; }
 92
 93        public bool ReadInputAtNativeFramerate { get; set; }
 94
 95        public string OutputFilePath { get; set; }
 96
 97        public string MimeType { get; set; }
 98
 099        public bool IgnoreInputDts => MediaSource.IgnoreDts;
 100
 0101        public bool IgnoreInputIndex => MediaSource.IgnoreIndex;
 102
 0103        public bool GenPtsInput => MediaSource.GenPtsInput;
 104
 0105        public bool DiscardCorruptFramesInput => false;
 106
 0107        public bool EnableFastSeekInput => false;
 108
 0109        public bool GenPtsOutput => false;
 110
 111        public string OutputContainer { get; set; }
 112
 113        public string OutputVideoSync { get; set; }
 114
 115        public string AlbumCoverPath { get; set; }
 116
 117        public string InputAudioSync { get; set; }
 118
 119        public string InputVideoSync { get; set; }
 120
 121        public TransportStreamTimestamp InputTimestamp { get; set; }
 122
 123        public MediaStream AudioStream { get; set; }
 124
 125        public string[] SupportedAudioCodecs { get; set; }
 126
 127        public string[] SupportedVideoCodecs { get; set; }
 128
 129        public string InputContainer { get; set; }
 130
 131        public IsoType? IsoType { get; set; }
 132
 133        public BaseEncodingJobOptions BaseRequest { get; set; }
 134
 135        public bool IsVideoRequest { get; set; }
 136
 137        public TranscodingJobType TranscodingType { get; set; }
 138
 0139        public long? StartTimeTicks => BaseRequest.StartTimeTicks;
 140
 0141        public bool CopyTimestamps => BaseRequest.CopyTimestamps;
 142
 143        public bool IsSegmentedLiveStream
 0144            => TranscodingType != TranscodingJobType.Progressive && !RunTimeTicks.HasValue;
 145
 0146        public int? TotalOutputBitrate => (OutputAudioBitrate ?? 0) + (OutputVideoBitrate ?? 0);
 147
 148        public int? OutputWidth
 149        {
 150            get
 151            {
 0152                if (VideoStream is not null && VideoStream.Width.HasValue && VideoStream.Height.HasValue)
 153                {
 0154                    var size = new ImageDimensions(VideoStream.Width.Value, VideoStream.Height.Value);
 155
 0156                    var newSize = DrawingUtils.Resize(
 0157                        size,
 0158                        BaseRequest.Width ?? 0,
 0159                        BaseRequest.Height ?? 0,
 0160                        BaseRequest.MaxWidth ?? 0,
 0161                        BaseRequest.MaxHeight ?? 0);
 162
 0163                    return newSize.Width;
 164                }
 165
 0166                if (!IsVideoRequest)
 167                {
 0168                    return null;
 169                }
 170
 0171                return BaseRequest.MaxWidth ?? BaseRequest.Width;
 172            }
 173        }
 174
 175        public int? OutputHeight
 176        {
 177            get
 178            {
 0179                if (VideoStream is not null && VideoStream.Width.HasValue && VideoStream.Height.HasValue)
 180                {
 0181                    var size = new ImageDimensions(VideoStream.Width.Value, VideoStream.Height.Value);
 182
 0183                    var newSize = DrawingUtils.Resize(
 0184                        size,
 0185                        BaseRequest.Width ?? 0,
 0186                        BaseRequest.Height ?? 0,
 0187                        BaseRequest.MaxWidth ?? 0,
 0188                        BaseRequest.MaxHeight ?? 0);
 189
 0190                    return newSize.Height;
 191                }
 192
 0193                if (!IsVideoRequest)
 194                {
 0195                    return null;
 196                }
 197
 0198                return BaseRequest.MaxHeight ?? BaseRequest.Height;
 199            }
 200        }
 201
 202        public int? OutputAudioSampleRate
 203        {
 204            get
 205            {
 0206                if (BaseRequest.Static
 0207                    || EncodingHelper.IsCopyCodec(OutputAudioCodec))
 208                {
 0209                    if (AudioStream is not null)
 210                    {
 0211                        return AudioStream.SampleRate;
 212                    }
 213                }
 0214                else if (BaseRequest.AudioSampleRate.HasValue)
 215                {
 216                    // Don't exceed what the encoder supports
 217                    // Seeing issues of attempting to encode to 88200
 0218                    return BaseRequest.AudioSampleRate.Value;
 219                }
 220
 0221                return null;
 222            }
 223        }
 224
 225        public int? OutputAudioBitDepth
 226        {
 227            get
 228            {
 0229                if (BaseRequest.Static
 0230                    || EncodingHelper.IsCopyCodec(OutputAudioCodec))
 231                {
 0232                    if (AudioStream is not null)
 233                    {
 0234                        return AudioStream.BitDepth;
 235                    }
 236                }
 237
 0238                return null;
 239            }
 240        }
 241
 242        /// <summary>
 243        /// Gets the target video level.
 244        /// </summary>
 245        public double? TargetVideoLevel
 246        {
 247            get
 248            {
 0249                if (BaseRequest.Static || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 250                {
 0251                    return VideoStream?.Level;
 252                }
 253
 0254                var level = GetRequestedLevel(ActualOutputVideoCodec);
 0255                if (double.TryParse(level, CultureInfo.InvariantCulture, out var result))
 256                {
 0257                    return result;
 258                }
 259
 0260                return null;
 261            }
 262        }
 263
 264        /// <summary>
 265        /// Gets the target video bit depth.
 266        /// </summary>
 267        public int? TargetVideoBitDepth
 268        {
 269            get
 270            {
 0271                if (BaseRequest.Static
 0272                    || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 273                {
 0274                    return VideoStream?.BitDepth;
 275                }
 276
 0277                return null;
 278            }
 279        }
 280
 281        /// <summary>
 282        /// Gets the target reference frames.
 283        /// </summary>
 284        /// <value>The target reference frames.</value>
 285        public int? TargetRefFrames
 286        {
 287            get
 288            {
 0289                if (BaseRequest.Static
 0290                    || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 291                {
 0292                    return VideoStream?.RefFrames;
 293                }
 294
 0295                return null;
 296            }
 297        }
 298
 299        /// <summary>
 300        /// Gets the target framerate.
 301        /// </summary>
 302        public float? TargetFramerate
 303        {
 304            get
 305            {
 0306                if (BaseRequest.Static
 0307                    || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 308                {
 0309                    return VideoStream?.ReferenceFrameRate;
 310                }
 311
 0312                return BaseRequest.MaxFramerate ?? BaseRequest.Framerate;
 313            }
 314        }
 315
 316        public TransportStreamTimestamp TargetTimestamp
 317        {
 318            get
 319            {
 0320                if (BaseRequest.Static)
 321                {
 0322                    return InputTimestamp;
 323                }
 324
 0325                return string.Equals(OutputContainer, "m2ts", StringComparison.OrdinalIgnoreCase) ?
 0326                    TransportStreamTimestamp.Valid :
 0327                    TransportStreamTimestamp.None;
 328            }
 329        }
 330
 331        /// <summary>
 332        /// Gets the target packet length.
 333        /// </summary>
 334        public int? TargetPacketLength
 335        {
 336            get
 337            {
 0338                if (BaseRequest.Static || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 339                {
 0340                    return VideoStream?.PacketLength;
 341                }
 342
 0343                return null;
 344            }
 345        }
 346
 347        /// <summary>
 348        /// Gets the target video profile.
 349        /// </summary>
 350        public string TargetVideoProfile
 351        {
 352            get
 353            {
 0354                if (BaseRequest.Static || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 355                {
 0356                    return VideoStream?.Profile;
 357                }
 358
 0359                var requestedProfile = GetRequestedProfiles(ActualOutputVideoCodec).FirstOrDefault();
 0360                if (!string.IsNullOrEmpty(requestedProfile))
 361                {
 0362                    return requestedProfile;
 363                }
 364
 0365                return null;
 366            }
 367        }
 368
 369        /// <summary>
 370        /// Gets the target video range type.
 371        /// </summary>
 372        public VideoRangeType TargetVideoRangeType
 373        {
 374            get
 375            {
 0376                if (BaseRequest.Static || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 377                {
 0378                    return VideoStream?.VideoRangeType ?? VideoRangeType.Unknown;
 379                }
 380
 0381                if (Enum.TryParse(GetRequestedRangeTypes(ActualOutputVideoCodec).FirstOrDefault() ?? "Unknown", true, ou
 382                {
 0383                    return requestedRangeType;
 384                }
 385
 0386                return VideoRangeType.Unknown;
 387            }
 388        }
 389
 390        public string TargetVideoCodecTag
 391        {
 392            get
 393            {
 0394                if (BaseRequest.Static
 0395                    || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 396                {
 0397                    return VideoStream?.CodecTag;
 398                }
 399
 0400                return null;
 401            }
 402        }
 403
 404        public bool? IsTargetAnamorphic
 405        {
 406            get
 407            {
 0408                if (BaseRequest.Static
 0409                    || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 410                {
 0411                    return VideoStream?.IsAnamorphic;
 412                }
 413
 0414                return false;
 415            }
 416        }
 417
 418        public string ActualOutputVideoCodec
 419        {
 420            get
 421            {
 0422                if (VideoStream is null)
 423                {
 0424                    return null;
 425                }
 426
 0427                if (EncodingHelper.IsCopyCodec(OutputVideoCodec))
 428                {
 0429                    return VideoStream.Codec;
 430                }
 431
 0432                return OutputVideoCodec;
 433            }
 434        }
 435
 436        public string ActualOutputAudioCodec
 437        {
 438            get
 439            {
 0440                if (AudioStream is null)
 441                {
 0442                    return null;
 443                }
 444
 0445                if (EncodingHelper.IsCopyCodec(OutputAudioCodec))
 446                {
 0447                    return AudioStream.Codec;
 448                }
 449
 0450                return OutputAudioCodec;
 451            }
 452        }
 453
 454        public bool? IsTargetInterlaced
 455        {
 456            get
 457            {
 0458                if (BaseRequest.Static
 0459                    || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 460                {
 0461                    return VideoStream?.IsInterlaced;
 462                }
 463
 0464                if (DeInterlace(ActualOutputVideoCodec, true))
 465                {
 0466                    return false;
 467                }
 468
 0469                return VideoStream?.IsInterlaced;
 470            }
 471        }
 472
 473        public bool? IsTargetAVC
 474        {
 475            get
 476            {
 0477                if (BaseRequest.Static || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 478                {
 0479                    return VideoStream?.IsAVC;
 480                }
 481
 0482                return false;
 483            }
 484        }
 485
 486        public int? TargetVideoStreamCount
 487        {
 488            get
 489            {
 0490                if (BaseRequest.Static)
 491                {
 0492                    return GetMediaStreamCount(MediaStreamType.Video, int.MaxValue);
 493                }
 494
 0495                return GetMediaStreamCount(MediaStreamType.Video, 1);
 496            }
 497        }
 498
 499        public int? TargetAudioStreamCount
 500        {
 501            get
 502            {
 0503                if (BaseRequest.Static)
 504                {
 0505                    return GetMediaStreamCount(MediaStreamType.Audio, int.MaxValue);
 506                }
 507
 0508                return GetMediaStreamCount(MediaStreamType.Audio, 1);
 509            }
 510        }
 511
 0512        public bool EnableAudioVbrEncoding => BaseRequest.EnableAudioVbrEncoding;
 513
 0514        public int HlsListSize => 0;
 515
 516        public bool EnableBreakOnNonKeyFrames(string videoCodec)
 517        {
 0518            if (TranscodingType != TranscodingJobType.Progressive)
 519            {
 0520                if (IsSegmentedLiveStream)
 521                {
 0522                    return false;
 523                }
 524
 0525                return BaseRequest.BreakOnNonKeyFrames && EncodingHelper.IsCopyCodec(videoCodec);
 526            }
 527
 0528            return false;
 529        }
 530
 531        private int? GetMediaStreamCount(MediaStreamType type, int limit)
 532        {
 0533            var count = MediaSource.GetStreamCount(type);
 534
 0535            if (count.HasValue)
 536            {
 0537                count = Math.Min(count.Value, limit);
 538            }
 539
 0540            return count;
 541        }
 542
 543        public string GetMimeType(string outputPath, bool enableStreamDefault = true)
 544        {
 0545            if (!string.IsNullOrEmpty(MimeType))
 546            {
 0547                return MimeType;
 548            }
 549
 0550            if (enableStreamDefault)
 551            {
 0552                return MimeTypes.GetMimeType(outputPath);
 553            }
 554
 0555            return MimeTypes.GetMimeType(outputPath, null);
 556        }
 557
 558        public bool DeInterlace(string videoCodec, bool forceDeinterlaceIfSourceIsInterlaced)
 559        {
 0560            var videoStream = VideoStream;
 0561            var isInputInterlaced = videoStream is not null && videoStream.IsInterlaced;
 562
 0563            if (!isInputInterlaced)
 564            {
 0565                return false;
 566            }
 567
 568            // Support general param
 0569            if (BaseRequest.DeInterlace)
 570            {
 0571                return true;
 572            }
 573
 0574            if (!string.IsNullOrEmpty(videoCodec))
 575            {
 0576                if (string.Equals(BaseRequest.GetOption(videoCodec, "deinterlace"), "true", StringComparison.OrdinalIgno
 577                {
 0578                    return true;
 579                }
 580            }
 581
 0582            return forceDeinterlaceIfSourceIsInterlaced;
 583        }
 584
 585        public string[] GetRequestedProfiles(string codec)
 586        {
 0587            if (!string.IsNullOrEmpty(BaseRequest.Profile))
 588            {
 0589                return BaseRequest.Profile.Split(new[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries);
 590            }
 591
 0592            if (!string.IsNullOrEmpty(codec))
 593            {
 0594                var profile = BaseRequest.GetOption(codec, "profile");
 595
 0596                if (!string.IsNullOrEmpty(profile))
 597                {
 0598                    return profile.Split(new[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries);
 599                }
 600            }
 601
 0602            return Array.Empty<string>();
 603        }
 604
 605        public string[] GetRequestedRangeTypes(string codec)
 606        {
 0607            if (!string.IsNullOrEmpty(BaseRequest.VideoRangeType))
 608            {
 0609                return BaseRequest.VideoRangeType.Split(new[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries);
 610            }
 611
 0612            if (!string.IsNullOrEmpty(codec))
 613            {
 0614                var rangetype = BaseRequest.GetOption(codec, "rangetype");
 615
 0616                if (!string.IsNullOrEmpty(rangetype))
 617                {
 0618                    return rangetype.Split(new[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries);
 619                }
 620            }
 621
 0622            return Array.Empty<string>();
 623        }
 624
 625        public string[] GetRequestedCodecTags(string codec)
 626        {
 0627            if (!string.IsNullOrEmpty(BaseRequest.CodecTag))
 628            {
 0629                return BaseRequest.CodecTag.Split(new[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries);
 630            }
 631
 0632            if (!string.IsNullOrEmpty(codec))
 633            {
 0634                var codectag = BaseRequest.GetOption(codec, "codectag");
 635
 0636                if (!string.IsNullOrEmpty(codectag))
 637                {
 0638                    return codectag.Split(new[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries);
 639                }
 640            }
 641
 0642            return Array.Empty<string>();
 643        }
 644
 645        public string GetRequestedLevel(string codec)
 646        {
 0647            if (!string.IsNullOrEmpty(BaseRequest.Level))
 648            {
 0649                return BaseRequest.Level;
 650            }
 651
 0652            if (!string.IsNullOrEmpty(codec))
 653            {
 0654                return BaseRequest.GetOption(codec, "level");
 655            }
 656
 0657            return null;
 658        }
 659
 660        public int? GetRequestedMaxRefFrames(string codec)
 661        {
 0662            if (BaseRequest.MaxRefFrames.HasValue)
 663            {
 0664                return BaseRequest.MaxRefFrames;
 665            }
 666
 0667            if (!string.IsNullOrEmpty(codec))
 668            {
 0669                var value = BaseRequest.GetOption(codec, "maxrefframes");
 0670                if (int.TryParse(value, CultureInfo.InvariantCulture, out var result))
 671                {
 0672                    return result;
 673                }
 674            }
 675
 0676            return null;
 677        }
 678
 679        public int? GetRequestedVideoBitDepth(string codec)
 680        {
 0681            if (BaseRequest.MaxVideoBitDepth.HasValue)
 682            {
 0683                return BaseRequest.MaxVideoBitDepth;
 684            }
 685
 0686            if (!string.IsNullOrEmpty(codec))
 687            {
 0688                var value = BaseRequest.GetOption(codec, "videobitdepth");
 0689                if (int.TryParse(value, CultureInfo.InvariantCulture, out var result))
 690                {
 0691                    return result;
 692                }
 693            }
 694
 0695            return null;
 696        }
 697
 698        public int? GetRequestedAudioBitDepth(string codec)
 699        {
 0700            if (BaseRequest.MaxAudioBitDepth.HasValue)
 701            {
 0702                return BaseRequest.MaxAudioBitDepth;
 703            }
 704
 0705            if (!string.IsNullOrEmpty(codec))
 706            {
 0707                var value = BaseRequest.GetOption(codec, "audiobitdepth");
 0708                if (int.TryParse(value, CultureInfo.InvariantCulture, out var result))
 709                {
 0710                    return result;
 711                }
 712            }
 713
 0714            return null;
 715        }
 716
 717        public int? GetRequestedAudioChannels(string codec)
 718        {
 0719            if (!string.IsNullOrEmpty(codec))
 720            {
 0721                var value = BaseRequest.GetOption(codec, "audiochannels");
 0722                if (int.TryParse(value, CultureInfo.InvariantCulture, out var result))
 723                {
 0724                    return result;
 725                }
 726            }
 727
 0728            if (BaseRequest.MaxAudioChannels.HasValue)
 729            {
 0730                return BaseRequest.MaxAudioChannels;
 731            }
 732
 0733            if (BaseRequest.AudioChannels.HasValue)
 734            {
 0735                return BaseRequest.AudioChannels;
 736            }
 737
 0738            if (BaseRequest.TranscodingMaxAudioChannels.HasValue)
 739            {
 0740                return BaseRequest.TranscodingMaxAudioChannels;
 741            }
 742
 0743            return null;
 744        }
 745
 746        public virtual void ReportTranscodingProgress(TimeSpan? transcodingPosition, float? framerate, double? percentCo
 747        {
 0748            Progress.Report(percentComplete.Value);
 0749        }
 750    }
 751}

Methods/Properties

.ctor(MediaBrowser.Controller.MediaEncoding.TranscodingJobType)
get_TranscodeReasons()
get_IgnoreInputDts()
get_IgnoreInputIndex()
get_GenPtsInput()
get_DiscardCorruptFramesInput()
get_EnableFastSeekInput()
get_GenPtsOutput()
get_StartTimeTicks()
get_CopyTimestamps()
get_IsSegmentedLiveStream()
get_TotalOutputBitrate()
get_OutputWidth()
get_OutputHeight()
get_OutputAudioSampleRate()
get_OutputAudioBitDepth()
get_TargetVideoLevel()
get_TargetVideoBitDepth()
get_TargetRefFrames()
get_TargetFramerate()
get_TargetTimestamp()
get_TargetPacketLength()
get_TargetVideoProfile()
get_TargetVideoRangeType()
get_TargetVideoCodecTag()
get_IsTargetAnamorphic()
get_ActualOutputVideoCodec()
get_ActualOutputAudioCodec()
get_IsTargetInterlaced()
get_IsTargetAVC()
get_TargetVideoStreamCount()
get_TargetAudioStreamCount()
get_EnableAudioVbrEncoding()
get_HlsListSize()
EnableBreakOnNonKeyFrames(System.String)
GetMediaStreamCount(MediaBrowser.Model.Entities.MediaStreamType,System.Int32)
GetMimeType(System.String,System.Boolean)
DeInterlace(System.String,System.Boolean)
GetRequestedProfiles(System.String)
GetRequestedRangeTypes(System.String)
GetRequestedCodecTags(System.String)
GetRequestedLevel(System.String)
GetRequestedMaxRefFrames(System.String)
GetRequestedVideoBitDepth(System.String)
GetRequestedAudioBitDepth(System.String)
GetRequestedAudioChannels(System.String)
ReportTranscodingProgress(System.Nullable`1<System.TimeSpan>,System.Nullable`1<System.Single>,System.Nullable`1<System.Double>,System.Nullable`1<System.Int64>,System.Nullable`1<System.Int32>)