< 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: 216
Coverable lines: 216
Total lines: 753
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
.cctor()100%210%
.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.Globalization;
 8using System.Linq;
 9using Jellyfin.Data.Enums;
 10using Jellyfin.Database.Implementations.Entities;
 11using MediaBrowser.Model.Dlna;
 12using MediaBrowser.Model.Drawing;
 13using MediaBrowser.Model.Dto;
 14using MediaBrowser.Model.Entities;
 15using MediaBrowser.Model.MediaInfo;
 16using MediaBrowser.Model.Net;
 17using MediaBrowser.Model.Session;
 18
 19namespace MediaBrowser.Controller.MediaEncoding
 20{
 21    // For now, a common base class until the API and MediaEncoding classes are unified
 22    public class EncodingJobInfo
 23    {
 024        private static readonly char[] _separators = ['|', ','];
 25
 26        private TranscodeReason? _transcodeReasons = null;
 27
 28        public EncodingJobInfo(TranscodingJobType jobType)
 29        {
 030            TranscodingType = jobType;
 031            RemoteHttpHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
 032            SupportedAudioCodecs = Array.Empty<string>();
 033            SupportedVideoCodecs = Array.Empty<string>();
 034            SupportedSubtitleCodecs = Array.Empty<string>();
 035        }
 36
 37        public int? OutputAudioBitrate { get; set; }
 38
 39        public int? OutputAudioChannels { get; set; }
 40
 41        public TranscodeReason TranscodeReasons
 42        {
 43            get
 44            {
 045                if (!_transcodeReasons.HasValue)
 46                {
 047                    if (BaseRequest.TranscodeReasons is null)
 48                    {
 049                        _transcodeReasons = 0;
 050                        return 0;
 51                    }
 52
 053                    _ = Enum.TryParse<TranscodeReason>(BaseRequest.TranscodeReasons, out var reason);
 054                    _transcodeReasons = reason;
 55                }
 56
 057                return _transcodeReasons.Value;
 58            }
 59        }
 60
 61        public IProgress<double> Progress { get; set; }
 62
 63        public MediaStream VideoStream { get; set; }
 64
 65        public VideoType VideoType { get; set; }
 66
 67        public Dictionary<string, string> RemoteHttpHeaders { get; set; }
 68
 69        public string OutputVideoCodec { get; set; }
 70
 71        public MediaProtocol InputProtocol { get; set; }
 72
 73        public string MediaPath { get; set; }
 74
 75        public bool IsInputVideo { get; set; }
 76
 77        public string OutputAudioCodec { get; set; }
 78
 79        public int? OutputVideoBitrate { get; set; }
 80
 81        public MediaStream SubtitleStream { get; set; }
 82
 83        public SubtitleDeliveryMethod SubtitleDeliveryMethod { get; set; }
 84
 85        public string[] SupportedSubtitleCodecs { get; set; }
 86
 87        public int InternalSubtitleStreamOffset { get; set; }
 88
 89        public MediaSourceInfo MediaSource { get; set; }
 90
 91        public User User { get; set; }
 92
 93        public long? RunTimeTicks { get; set; }
 94
 95        public bool ReadInputAtNativeFramerate { get; set; }
 96
 97        public string OutputFilePath { get; set; }
 98
 99        public string MimeType { get; set; }
 100
 0101        public bool IgnoreInputDts => MediaSource.IgnoreDts;
 102
 0103        public bool IgnoreInputIndex => MediaSource.IgnoreIndex;
 104
 0105        public bool GenPtsInput => MediaSource.GenPtsInput;
 106
 0107        public bool DiscardCorruptFramesInput => false;
 108
 0109        public bool EnableFastSeekInput => false;
 110
 0111        public bool GenPtsOutput => false;
 112
 113        public string OutputContainer { get; set; }
 114
 115        public string OutputVideoSync { get; set; }
 116
 117        public string AlbumCoverPath { get; set; }
 118
 119        public string InputAudioSync { get; set; }
 120
 121        public string InputVideoSync { get; set; }
 122
 123        public TransportStreamTimestamp InputTimestamp { get; set; }
 124
 125        public MediaStream AudioStream { get; set; }
 126
 127        public string[] SupportedAudioCodecs { get; set; }
 128
 129        public string[] SupportedVideoCodecs { get; set; }
 130
 131        public string InputContainer { get; set; }
 132
 133        public IsoType? IsoType { get; set; }
 134
 135        public BaseEncodingJobOptions BaseRequest { get; set; }
 136
 137        public bool IsVideoRequest { get; set; }
 138
 139        public TranscodingJobType TranscodingType { get; set; }
 140
 0141        public long? StartTimeTicks => BaseRequest.StartTimeTicks;
 142
 0143        public bool CopyTimestamps => BaseRequest.CopyTimestamps;
 144
 145        public bool IsSegmentedLiveStream
 0146            => TranscodingType != TranscodingJobType.Progressive && !RunTimeTicks.HasValue;
 147
 0148        public int? TotalOutputBitrate => (OutputAudioBitrate ?? 0) + (OutputVideoBitrate ?? 0);
 149
 150        public int? OutputWidth
 151        {
 152            get
 153            {
 0154                if (VideoStream is not null && VideoStream.Width.HasValue && VideoStream.Height.HasValue)
 155                {
 0156                    var size = new ImageDimensions(VideoStream.Width.Value, VideoStream.Height.Value);
 157
 0158                    var newSize = DrawingUtils.Resize(
 0159                        size,
 0160                        BaseRequest.Width ?? 0,
 0161                        BaseRequest.Height ?? 0,
 0162                        BaseRequest.MaxWidth ?? 0,
 0163                        BaseRequest.MaxHeight ?? 0);
 164
 0165                    return newSize.Width;
 166                }
 167
 0168                if (!IsVideoRequest)
 169                {
 0170                    return null;
 171                }
 172
 0173                return BaseRequest.MaxWidth ?? BaseRequest.Width;
 174            }
 175        }
 176
 177        public int? OutputHeight
 178        {
 179            get
 180            {
 0181                if (VideoStream is not null && VideoStream.Width.HasValue && VideoStream.Height.HasValue)
 182                {
 0183                    var size = new ImageDimensions(VideoStream.Width.Value, VideoStream.Height.Value);
 184
 0185                    var newSize = DrawingUtils.Resize(
 0186                        size,
 0187                        BaseRequest.Width ?? 0,
 0188                        BaseRequest.Height ?? 0,
 0189                        BaseRequest.MaxWidth ?? 0,
 0190                        BaseRequest.MaxHeight ?? 0);
 191
 0192                    return newSize.Height;
 193                }
 194
 0195                if (!IsVideoRequest)
 196                {
 0197                    return null;
 198                }
 199
 0200                return BaseRequest.MaxHeight ?? BaseRequest.Height;
 201            }
 202        }
 203
 204        public int? OutputAudioSampleRate
 205        {
 206            get
 207            {
 0208                if (BaseRequest.Static
 0209                    || EncodingHelper.IsCopyCodec(OutputAudioCodec))
 210                {
 0211                    if (AudioStream is not null)
 212                    {
 0213                        return AudioStream.SampleRate;
 214                    }
 215                }
 0216                else if (BaseRequest.AudioSampleRate.HasValue)
 217                {
 218                    // Don't exceed what the encoder supports
 219                    // Seeing issues of attempting to encode to 88200
 0220                    return BaseRequest.AudioSampleRate.Value;
 221                }
 222
 0223                return null;
 224            }
 225        }
 226
 227        public int? OutputAudioBitDepth
 228        {
 229            get
 230            {
 0231                if (BaseRequest.Static
 0232                    || EncodingHelper.IsCopyCodec(OutputAudioCodec))
 233                {
 0234                    if (AudioStream is not null)
 235                    {
 0236                        return AudioStream.BitDepth;
 237                    }
 238                }
 239
 0240                return null;
 241            }
 242        }
 243
 244        /// <summary>
 245        /// Gets the target video level.
 246        /// </summary>
 247        public double? TargetVideoLevel
 248        {
 249            get
 250            {
 0251                if (BaseRequest.Static || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 252                {
 0253                    return VideoStream?.Level;
 254                }
 255
 0256                var level = GetRequestedLevel(ActualOutputVideoCodec);
 0257                if (double.TryParse(level, CultureInfo.InvariantCulture, out var result))
 258                {
 0259                    return result;
 260                }
 261
 0262                return null;
 263            }
 264        }
 265
 266        /// <summary>
 267        /// Gets the target video bit depth.
 268        /// </summary>
 269        public int? TargetVideoBitDepth
 270        {
 271            get
 272            {
 0273                if (BaseRequest.Static
 0274                    || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 275                {
 0276                    return VideoStream?.BitDepth;
 277                }
 278
 0279                return null;
 280            }
 281        }
 282
 283        /// <summary>
 284        /// Gets the target reference frames.
 285        /// </summary>
 286        /// <value>The target reference frames.</value>
 287        public int? TargetRefFrames
 288        {
 289            get
 290            {
 0291                if (BaseRequest.Static
 0292                    || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 293                {
 0294                    return VideoStream?.RefFrames;
 295                }
 296
 0297                return null;
 298            }
 299        }
 300
 301        /// <summary>
 302        /// Gets the target framerate.
 303        /// </summary>
 304        public float? TargetFramerate
 305        {
 306            get
 307            {
 0308                if (BaseRequest.Static
 0309                    || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 310                {
 0311                    return VideoStream?.ReferenceFrameRate;
 312                }
 313
 0314                return BaseRequest.MaxFramerate ?? BaseRequest.Framerate;
 315            }
 316        }
 317
 318        public TransportStreamTimestamp TargetTimestamp
 319        {
 320            get
 321            {
 0322                if (BaseRequest.Static)
 323                {
 0324                    return InputTimestamp;
 325                }
 326
 0327                return string.Equals(OutputContainer, "m2ts", StringComparison.OrdinalIgnoreCase) ?
 0328                    TransportStreamTimestamp.Valid :
 0329                    TransportStreamTimestamp.None;
 330            }
 331        }
 332
 333        /// <summary>
 334        /// Gets the target packet length.
 335        /// </summary>
 336        public int? TargetPacketLength
 337        {
 338            get
 339            {
 0340                if (BaseRequest.Static || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 341                {
 0342                    return VideoStream?.PacketLength;
 343                }
 344
 0345                return null;
 346            }
 347        }
 348
 349        /// <summary>
 350        /// Gets the target video profile.
 351        /// </summary>
 352        public string TargetVideoProfile
 353        {
 354            get
 355            {
 0356                if (BaseRequest.Static || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 357                {
 0358                    return VideoStream?.Profile;
 359                }
 360
 0361                var requestedProfile = GetRequestedProfiles(ActualOutputVideoCodec).FirstOrDefault();
 0362                if (!string.IsNullOrEmpty(requestedProfile))
 363                {
 0364                    return requestedProfile;
 365                }
 366
 0367                return null;
 368            }
 369        }
 370
 371        /// <summary>
 372        /// Gets the target video range type.
 373        /// </summary>
 374        public VideoRangeType TargetVideoRangeType
 375        {
 376            get
 377            {
 0378                if (BaseRequest.Static || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 379                {
 0380                    return VideoStream?.VideoRangeType ?? VideoRangeType.Unknown;
 381                }
 382
 0383                if (Enum.TryParse(GetRequestedRangeTypes(ActualOutputVideoCodec).FirstOrDefault() ?? "Unknown", true, ou
 384                {
 0385                    return requestedRangeType;
 386                }
 387
 0388                return VideoRangeType.Unknown;
 389            }
 390        }
 391
 392        public string TargetVideoCodecTag
 393        {
 394            get
 395            {
 0396                if (BaseRequest.Static
 0397                    || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 398                {
 0399                    return VideoStream?.CodecTag;
 400                }
 401
 0402                return null;
 403            }
 404        }
 405
 406        public bool? IsTargetAnamorphic
 407        {
 408            get
 409            {
 0410                if (BaseRequest.Static
 0411                    || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 412                {
 0413                    return VideoStream?.IsAnamorphic;
 414                }
 415
 0416                return false;
 417            }
 418        }
 419
 420        public string ActualOutputVideoCodec
 421        {
 422            get
 423            {
 0424                if (VideoStream is null)
 425                {
 0426                    return null;
 427                }
 428
 0429                if (EncodingHelper.IsCopyCodec(OutputVideoCodec))
 430                {
 0431                    return VideoStream.Codec;
 432                }
 433
 0434                return OutputVideoCodec;
 435            }
 436        }
 437
 438        public string ActualOutputAudioCodec
 439        {
 440            get
 441            {
 0442                if (AudioStream is null)
 443                {
 0444                    return null;
 445                }
 446
 0447                if (EncodingHelper.IsCopyCodec(OutputAudioCodec))
 448                {
 0449                    return AudioStream.Codec;
 450                }
 451
 0452                return OutputAudioCodec;
 453            }
 454        }
 455
 456        public bool? IsTargetInterlaced
 457        {
 458            get
 459            {
 0460                if (BaseRequest.Static
 0461                    || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 462                {
 0463                    return VideoStream?.IsInterlaced;
 464                }
 465
 0466                if (DeInterlace(ActualOutputVideoCodec, true))
 467                {
 0468                    return false;
 469                }
 470
 0471                return VideoStream?.IsInterlaced;
 472            }
 473        }
 474
 475        public bool? IsTargetAVC
 476        {
 477            get
 478            {
 0479                if (BaseRequest.Static || EncodingHelper.IsCopyCodec(OutputVideoCodec))
 480                {
 0481                    return VideoStream?.IsAVC;
 482                }
 483
 0484                return false;
 485            }
 486        }
 487
 488        public int? TargetVideoStreamCount
 489        {
 490            get
 491            {
 0492                if (BaseRequest.Static)
 493                {
 0494                    return GetMediaStreamCount(MediaStreamType.Video, int.MaxValue);
 495                }
 496
 0497                return GetMediaStreamCount(MediaStreamType.Video, 1);
 498            }
 499        }
 500
 501        public int? TargetAudioStreamCount
 502        {
 503            get
 504            {
 0505                if (BaseRequest.Static)
 506                {
 0507                    return GetMediaStreamCount(MediaStreamType.Audio, int.MaxValue);
 508                }
 509
 0510                return GetMediaStreamCount(MediaStreamType.Audio, 1);
 511            }
 512        }
 513
 0514        public bool EnableAudioVbrEncoding => BaseRequest.EnableAudioVbrEncoding;
 515
 0516        public int HlsListSize => 0;
 517
 518        public bool EnableBreakOnNonKeyFrames(string videoCodec)
 519        {
 0520            if (TranscodingType != TranscodingJobType.Progressive)
 521            {
 0522                if (IsSegmentedLiveStream)
 523                {
 0524                    return false;
 525                }
 526
 0527                return BaseRequest.BreakOnNonKeyFrames && EncodingHelper.IsCopyCodec(videoCodec);
 528            }
 529
 0530            return false;
 531        }
 532
 533        private int? GetMediaStreamCount(MediaStreamType type, int limit)
 534        {
 0535            var count = MediaSource.GetStreamCount(type);
 536
 0537            if (count.HasValue)
 538            {
 0539                count = Math.Min(count.Value, limit);
 540            }
 541
 0542            return count;
 543        }
 544
 545        public string GetMimeType(string outputPath, bool enableStreamDefault = true)
 546        {
 0547            if (!string.IsNullOrEmpty(MimeType))
 548            {
 0549                return MimeType;
 550            }
 551
 0552            if (enableStreamDefault)
 553            {
 0554                return MimeTypes.GetMimeType(outputPath);
 555            }
 556
 0557            return MimeTypes.GetMimeType(outputPath, null);
 558        }
 559
 560        public bool DeInterlace(string videoCodec, bool forceDeinterlaceIfSourceIsInterlaced)
 561        {
 0562            var videoStream = VideoStream;
 0563            var isInputInterlaced = videoStream is not null && videoStream.IsInterlaced;
 564
 0565            if (!isInputInterlaced)
 566            {
 0567                return false;
 568            }
 569
 570            // Support general param
 0571            if (BaseRequest.DeInterlace)
 572            {
 0573                return true;
 574            }
 575
 0576            if (!string.IsNullOrEmpty(videoCodec))
 577            {
 0578                if (string.Equals(BaseRequest.GetOption(videoCodec, "deinterlace"), "true", StringComparison.OrdinalIgno
 579                {
 0580                    return true;
 581                }
 582            }
 583
 0584            return forceDeinterlaceIfSourceIsInterlaced;
 585        }
 586
 587        public string[] GetRequestedProfiles(string codec)
 588        {
 0589            if (!string.IsNullOrEmpty(BaseRequest.Profile))
 590            {
 0591                return BaseRequest.Profile.Split(_separators, StringSplitOptions.RemoveEmptyEntries);
 592            }
 593
 0594            if (!string.IsNullOrEmpty(codec))
 595            {
 0596                var profile = BaseRequest.GetOption(codec, "profile");
 597
 0598                if (!string.IsNullOrEmpty(profile))
 599                {
 0600                    return profile.Split(_separators, StringSplitOptions.RemoveEmptyEntries);
 601                }
 602            }
 603
 0604            return Array.Empty<string>();
 605        }
 606
 607        public string[] GetRequestedRangeTypes(string codec)
 608        {
 0609            if (!string.IsNullOrEmpty(BaseRequest.VideoRangeType))
 610            {
 0611                return BaseRequest.VideoRangeType.Split(_separators, StringSplitOptions.RemoveEmptyEntries);
 612            }
 613
 0614            if (!string.IsNullOrEmpty(codec))
 615            {
 0616                var rangetype = BaseRequest.GetOption(codec, "rangetype");
 617
 0618                if (!string.IsNullOrEmpty(rangetype))
 619                {
 0620                    return rangetype.Split(_separators, StringSplitOptions.RemoveEmptyEntries);
 621                }
 622            }
 623
 0624            return Array.Empty<string>();
 625        }
 626
 627        public string[] GetRequestedCodecTags(string codec)
 628        {
 0629            if (!string.IsNullOrEmpty(BaseRequest.CodecTag))
 630            {
 0631                return BaseRequest.CodecTag.Split(_separators, StringSplitOptions.RemoveEmptyEntries);
 632            }
 633
 0634            if (!string.IsNullOrEmpty(codec))
 635            {
 0636                var codectag = BaseRequest.GetOption(codec, "codectag");
 637
 0638                if (!string.IsNullOrEmpty(codectag))
 639                {
 0640                    return codectag.Split(_separators, StringSplitOptions.RemoveEmptyEntries);
 641                }
 642            }
 643
 0644            return Array.Empty<string>();
 645        }
 646
 647        public string GetRequestedLevel(string codec)
 648        {
 0649            if (!string.IsNullOrEmpty(BaseRequest.Level))
 650            {
 0651                return BaseRequest.Level;
 652            }
 653
 0654            if (!string.IsNullOrEmpty(codec))
 655            {
 0656                return BaseRequest.GetOption(codec, "level");
 657            }
 658
 0659            return null;
 660        }
 661
 662        public int? GetRequestedMaxRefFrames(string codec)
 663        {
 0664            if (BaseRequest.MaxRefFrames.HasValue)
 665            {
 0666                return BaseRequest.MaxRefFrames;
 667            }
 668
 0669            if (!string.IsNullOrEmpty(codec))
 670            {
 0671                var value = BaseRequest.GetOption(codec, "maxrefframes");
 0672                if (int.TryParse(value, CultureInfo.InvariantCulture, out var result))
 673                {
 0674                    return result;
 675                }
 676            }
 677
 0678            return null;
 679        }
 680
 681        public int? GetRequestedVideoBitDepth(string codec)
 682        {
 0683            if (BaseRequest.MaxVideoBitDepth.HasValue)
 684            {
 0685                return BaseRequest.MaxVideoBitDepth;
 686            }
 687
 0688            if (!string.IsNullOrEmpty(codec))
 689            {
 0690                var value = BaseRequest.GetOption(codec, "videobitdepth");
 0691                if (int.TryParse(value, CultureInfo.InvariantCulture, out var result))
 692                {
 0693                    return result;
 694                }
 695            }
 696
 0697            return null;
 698        }
 699
 700        public int? GetRequestedAudioBitDepth(string codec)
 701        {
 0702            if (BaseRequest.MaxAudioBitDepth.HasValue)
 703            {
 0704                return BaseRequest.MaxAudioBitDepth;
 705            }
 706
 0707            if (!string.IsNullOrEmpty(codec))
 708            {
 0709                var value = BaseRequest.GetOption(codec, "audiobitdepth");
 0710                if (int.TryParse(value, CultureInfo.InvariantCulture, out var result))
 711                {
 0712                    return result;
 713                }
 714            }
 715
 0716            return null;
 717        }
 718
 719        public int? GetRequestedAudioChannels(string codec)
 720        {
 0721            if (!string.IsNullOrEmpty(codec))
 722            {
 0723                var value = BaseRequest.GetOption(codec, "audiochannels");
 0724                if (int.TryParse(value, CultureInfo.InvariantCulture, out var result))
 725                {
 0726                    return result;
 727                }
 728            }
 729
 0730            if (BaseRequest.MaxAudioChannels.HasValue)
 731            {
 0732                return BaseRequest.MaxAudioChannels;
 733            }
 734
 0735            if (BaseRequest.AudioChannels.HasValue)
 736            {
 0737                return BaseRequest.AudioChannels;
 738            }
 739
 0740            if (BaseRequest.TranscodingMaxAudioChannels.HasValue)
 741            {
 0742                return BaseRequest.TranscodingMaxAudioChannels;
 743            }
 744
 0745            return null;
 746        }
 747
 748        public virtual void ReportTranscodingProgress(TimeSpan? transcodingPosition, float? framerate, double? percentCo
 749        {
 0750            Progress.Report(percentComplete.Value);
 0751        }
 752    }
 753}

Methods/Properties

.cctor()
.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>)