< Summary - Jellyfin

Information
Class: MediaBrowser.Model.Dlna.StreamInfo
Assembly: MediaBrowser.Model
File(s): /srv/git/jellyfin/MediaBrowser.Model/Dlna/StreamInfo.cs
Line coverage
46%
Covered lines: 172
Uncovered lines: 198
Coverable lines: 370
Total lines: 1390
Line coverage: 46.4%
Branch coverage
38%
Covered branches: 139
Total branches: 364
Branch coverage: 38.1%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

File(s)

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

#LineLine coverage
 1#pragma warning disable CA1819 // Properties should not return arrays
 2
 3using System;
 4using System.Collections.Generic;
 5using System.ComponentModel;
 6using System.Globalization;
 7using System.Linq;
 8using System.Text;
 9using Jellyfin.Data.Enums;
 10using Jellyfin.Extensions;
 11using MediaBrowser.Model.Drawing;
 12using MediaBrowser.Model.Dto;
 13using MediaBrowser.Model.Entities;
 14using MediaBrowser.Model.MediaInfo;
 15using MediaBrowser.Model.Session;
 16
 17namespace MediaBrowser.Model.Dlna;
 18
 19/// <summary>
 20/// Class holding information on a stream.
 21/// </summary>
 22public class StreamInfo
 23{
 24    /// <summary>
 25    /// Initializes a new instance of the <see cref="StreamInfo"/> class.
 26    /// </summary>
 27    public StreamInfo()
 28    {
 29        AudioCodecs = [];
 30        VideoCodecs = [];
 31        SubtitleCodecs = [];
 32        StreamOptions = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
 33    }
 34
 35    /// <summary>
 36    /// Gets or sets the item id.
 37    /// </summary>
 38    /// <value>The item id.</value>
 39    public Guid ItemId { get; set; }
 40
 41    /// <summary>
 42    /// Gets or sets the play method.
 43    /// </summary>
 44    /// <value>The play method.</value>
 45    public PlayMethod PlayMethod { get; set; }
 46
 47    /// <summary>
 48    /// Gets or sets the encoding context.
 49    /// </summary>
 50    /// <value>The encoding context.</value>
 51    public EncodingContext Context { get; set; }
 52
 53    /// <summary>
 54    /// Gets or sets the media type.
 55    /// </summary>
 56    /// <value>The media type.</value>
 57    public DlnaProfileType MediaType { get; set; }
 58
 59    /// <summary>
 60    /// Gets or sets the container.
 61    /// </summary>
 62    /// <value>The container.</value>
 63    public string? Container { get; set; }
 64
 65    /// <summary>
 66    /// Gets or sets the sub protocol.
 67    /// </summary>
 68    /// <value>The sub protocol.</value>
 69    public MediaStreamProtocol SubProtocol { get; set; }
 70
 71    /// <summary>
 72    /// Gets or sets the start position ticks.
 73    /// </summary>
 74    /// <value>The start position ticks.</value>
 75    public long StartPositionTicks { get; set; }
 76
 77    /// <summary>
 78    /// Gets or sets the segment length.
 79    /// </summary>
 80    /// <value>The segment length.</value>
 81    public int? SegmentLength { get; set; }
 82
 83    /// <summary>
 84    /// Gets or sets the minimum segments count.
 85    /// </summary>
 86    /// <value>The minimum segments count.</value>
 87    public int? MinSegments { get; set; }
 88
 89    /// <summary>
 90    /// Gets or sets a value indicating whether the stream can be broken on non-keyframes.
 91    /// </summary>
 92    public bool BreakOnNonKeyFrames { get; set; }
 93
 94    /// <summary>
 95    /// Gets or sets a value indicating whether the stream requires AVC.
 96    /// </summary>
 97    public bool RequireAvc { get; set; }
 98
 99    /// <summary>
 100    /// Gets or sets a value indicating whether the stream requires AVC.
 101    /// </summary>
 102    public bool RequireNonAnamorphic { get; set; }
 103
 104    /// <summary>
 105    /// Gets or sets a value indicating whether timestamps should be copied.
 106    /// </summary>
 107    public bool CopyTimestamps { get; set; }
 108
 109    /// <summary>
 110    /// Gets or sets a value indicating whether timestamps should be copied.
 111    /// </summary>
 112    public bool EnableMpegtsM2TsMode { get; set; }
 113
 114    /// <summary>
 115    /// Gets or sets a value indicating whether the subtitle manifest is enabled.
 116    /// </summary>
 117    public bool EnableSubtitlesInManifest { get; set; }
 118
 119    /// <summary>
 120    /// Gets or sets the audio codecs.
 121    /// </summary>
 122    /// <value>The audio codecs.</value>
 123    public IReadOnlyList<string> AudioCodecs { get; set; }
 124
 125    /// <summary>
 126    /// Gets or sets the video codecs.
 127    /// </summary>
 128    /// <value>The video codecs.</value>
 129    public IReadOnlyList<string> VideoCodecs { get; set; }
 130
 131    /// <summary>
 132    /// Gets or sets the audio stream index.
 133    /// </summary>
 134    /// <value>The audio stream index.</value>
 135    public int? AudioStreamIndex { get; set; }
 136
 137    /// <summary>
 138    /// Gets or sets the video stream index.
 139    /// </summary>
 140    /// <value>The subtitle stream index.</value>
 141    public int? SubtitleStreamIndex { get; set; }
 142
 143    /// <summary>
 144    /// Gets or sets the maximum transcoding audio channels.
 145    /// </summary>
 146    /// <value>The maximum transcoding audio channels.</value>
 147    public int? TranscodingMaxAudioChannels { get; set; }
 148
 149    /// <summary>
 150    /// Gets or sets the global maximum audio channels.
 151    /// </summary>
 152    /// <value>The global maximum audio channels.</value>
 153    public int? GlobalMaxAudioChannels { get; set; }
 154
 155    /// <summary>
 156    /// Gets or sets the audio bitrate.
 157    /// </summary>
 158    /// <value>The audio bitrate.</value>
 159    public int? AudioBitrate { get; set; }
 160
 161    /// <summary>
 162    /// Gets or sets the audio sample rate.
 163    /// </summary>
 164    /// <value>The audio sample rate.</value>
 165    public int? AudioSampleRate { get; set; }
 166
 167    /// <summary>
 168    /// Gets or sets the video bitrate.
 169    /// </summary>
 170    /// <value>The video bitrate.</value>
 171    public int? VideoBitrate { get; set; }
 172
 173    /// <summary>
 174    /// Gets or sets the maximum output width.
 175    /// </summary>
 176    /// <value>The output width.</value>
 177    public int? MaxWidth { get; set; }
 178
 179    /// <summary>
 180    /// Gets or sets the maximum output height.
 181    /// </summary>
 182    /// <value>The maximum output height.</value>
 183    public int? MaxHeight { get; set; }
 184
 185    /// <summary>
 186    /// Gets or sets the maximum framerate.
 187    /// </summary>
 188    /// <value>The maximum framerate.</value>
 189    public float? MaxFramerate { get; set; }
 190
 191    /// <summary>
 192    /// Gets or sets the device profile.
 193    /// </summary>
 194    /// <value>The device profile.</value>
 195    public required DeviceProfile DeviceProfile { get; set; }
 196
 197    /// <summary>
 198    /// Gets or sets the device profile id.
 199    /// </summary>
 200    /// <value>The device profile id.</value>
 201    public string? DeviceProfileId { get; set; }
 202
 203    /// <summary>
 204    /// Gets or sets the device id.
 205    /// </summary>
 206    /// <value>The device id.</value>
 207    public string? DeviceId { get; set; }
 208
 209    /// <summary>
 210    /// Gets or sets the runtime ticks.
 211    /// </summary>
 212    /// <value>The runtime ticks.</value>
 213    public long? RunTimeTicks { get; set; }
 214
 215    /// <summary>
 216    /// Gets or sets the transcode seek info.
 217    /// </summary>
 218    /// <value>The transcode seek info.</value>
 219    public TranscodeSeekInfo TranscodeSeekInfo { get; set; }
 220
 221    /// <summary>
 222    /// Gets or sets a value indicating whether content length should be estimated.
 223    /// </summary>
 224    public bool EstimateContentLength { get; set; }
 225
 226    /// <summary>
 227    /// Gets or sets the media source info.
 228    /// </summary>
 229    /// <value>The media source info.</value>
 230    public MediaSourceInfo? MediaSource { get; set; }
 231
 232    /// <summary>
 233    /// Gets or sets the subtitle codecs.
 234    /// </summary>
 235    /// <value>The subtitle codecs.</value>
 236    public IReadOnlyList<string> SubtitleCodecs { get; set; }
 237
 238    /// <summary>
 239    /// Gets or sets the subtitle delivery method.
 240    /// </summary>
 241    /// <value>The subtitle delivery method.</value>
 242    public SubtitleDeliveryMethod SubtitleDeliveryMethod { get; set; }
 243
 244    /// <summary>
 245    /// Gets or sets the subtitle format.
 246    /// </summary>
 247    /// <value>The subtitle format.</value>
 248    public string? SubtitleFormat { get; set; }
 249
 250    /// <summary>
 251    /// Gets or sets the play session id.
 252    /// </summary>
 253    /// <value>The play session id.</value>
 254    public string? PlaySessionId { get; set; }
 255
 256    /// <summary>
 257    /// Gets or sets the transcode reasons.
 258    /// </summary>
 259    /// <value>The transcode reasons.</value>
 260    public TranscodeReason TranscodeReasons { get; set; }
 261
 262    /// <summary>
 263    /// Gets the stream options.
 264    /// </summary>
 265    /// <value>The stream options.</value>
 266    public Dictionary<string, string> StreamOptions { get; private set; }
 267
 268    /// <summary>
 269    /// Gets the media source id.
 270    /// </summary>
 271    /// <value>The media source id.</value>
 201396272    public string? MediaSourceId => MediaSource?.Id;
 273
 274    /// <summary>
 275    /// Gets or sets a value indicating whether audio VBR encoding is enabled.
 276    /// </summary>
 277    public bool EnableAudioVbrEncoding { get; set; }
 278
 279    /// <summary>
 280    /// Gets or sets a value indicating whether always burn in subtitles when transcoding.
 281    /// </summary>
 282    public bool AlwaysBurnInSubtitleWhenTranscoding { get; set; }
 283
 284    /// <summary>
 285    /// Gets a value indicating whether the stream is direct.
 286    /// </summary>
 603096287    public bool IsDirectStream => MediaSource?.VideoType is not (VideoType.Dvd or VideoType.BluRay)
 603096288        && PlayMethod is PlayMethod.DirectStream or PlayMethod.DirectPlay;
 289
 290    /// <summary>
 291    /// Gets the audio stream that will be used in the output stream.
 292    /// </summary>
 293    /// <value>The audio stream.</value>
 692294    public MediaStream? TargetAudioStream => MediaSource?.GetDefaultAudioStream(AudioStreamIndex);
 295
 296    /// <summary>
 297    /// Gets the video stream that will be used in the output stream.
 298    /// </summary>
 299    /// <value>The video stream.</value>
 1006300    public MediaStream? TargetVideoStream => MediaSource?.VideoStream;
 301
 302    /// <summary>
 303    /// Gets the audio sample rate that will be in the output stream.
 304    /// </summary>
 305    /// <value>The target audio sample rate.</value>
 306    public int? TargetAudioSampleRate
 307    {
 308        get
 309        {
 0310            var stream = TargetAudioStream;
 0311            return AudioSampleRate.HasValue && !IsDirectStream
 0312                ? AudioSampleRate
 0313                : stream?.SampleRate;
 314        }
 315    }
 316
 317    /// <summary>
 318    /// Gets the audio bit depth that will be in the output stream.
 319    /// </summary>
 320    /// <value>The target bit depth.</value>
 321    public int? TargetAudioBitDepth
 322    {
 323        get
 324        {
 0325            if (IsDirectStream)
 326            {
 0327                return TargetAudioStream?.BitDepth;
 328            }
 329
 0330            var targetAudioCodecs = TargetAudioCodec;
 0331            var audioCodec = targetAudioCodecs.Count == 0 ? null : targetAudioCodecs[0];
 0332            if (!string.IsNullOrEmpty(audioCodec))
 333            {
 0334                return GetTargetAudioBitDepth(audioCodec);
 335            }
 336
 0337            return TargetAudioStream?.BitDepth;
 338        }
 339    }
 340
 341    /// <summary>
 342    /// Gets the video bit depth that will be in the output stream.
 343    /// </summary>
 344    /// <value>The target video bit depth.</value>
 345    public int? TargetVideoBitDepth
 346    {
 347        get
 348        {
 96349            if (IsDirectStream)
 350            {
 0351                return TargetVideoStream?.BitDepth;
 352            }
 353
 96354            var targetVideoCodecs = TargetVideoCodec;
 96355            var videoCodec = targetVideoCodecs.Count == 0 ? null : targetVideoCodecs[0];
 96356            if (!string.IsNullOrEmpty(videoCodec))
 357            {
 96358                return GetTargetVideoBitDepth(videoCodec);
 359            }
 360
 0361            return TargetVideoStream?.BitDepth;
 362        }
 363    }
 364
 365    /// <summary>
 366    /// Gets the target reference frames that will be in the output stream.
 367    /// </summary>
 368    /// <value>The target reference frames.</value>
 369    public int? TargetRefFrames
 370    {
 371        get
 372        {
 0373            if (IsDirectStream)
 374            {
 0375                return TargetVideoStream?.RefFrames;
 376            }
 377
 0378            var targetVideoCodecs = TargetVideoCodec;
 0379            var videoCodec = targetVideoCodecs.Count == 0 ? null : targetVideoCodecs[0];
 0380            if (!string.IsNullOrEmpty(videoCodec))
 381            {
 0382                return GetTargetRefFrames(videoCodec);
 383            }
 384
 0385            return TargetVideoStream?.RefFrames;
 386        }
 387    }
 388
 389    /// <summary>
 390    /// Gets the target framerate that will be in the output stream.
 391    /// </summary>
 392    /// <value>The target framerate.</value>
 393    public float? TargetFramerate
 394    {
 395        get
 396        {
 0397            var stream = TargetVideoStream;
 0398            return MaxFramerate.HasValue && !IsDirectStream
 0399                ? MaxFramerate
 0400                : stream?.ReferenceFrameRate;
 401        }
 402    }
 403
 404    /// <summary>
 405    /// Gets the target video level that will be in the output stream.
 406    /// </summary>
 407    /// <value>The target video level.</value>
 408    public double? TargetVideoLevel
 409    {
 410        get
 411        {
 96412            if (IsDirectStream)
 413            {
 0414                return TargetVideoStream?.Level;
 415            }
 416
 96417            var targetVideoCodecs = TargetVideoCodec;
 96418            var videoCodec = targetVideoCodecs.Count == 0 ? null : targetVideoCodecs[0];
 96419            if (!string.IsNullOrEmpty(videoCodec))
 420            {
 96421                return GetTargetVideoLevel(videoCodec);
 422            }
 423
 0424            return TargetVideoStream?.Level;
 425        }
 426    }
 427
 428    /// <summary>
 429    /// Gets the target packet length that will be in the output stream.
 430    /// </summary>
 431    /// <value>The target packet length.</value>
 432    public int? TargetPacketLength
 433    {
 434        get
 435        {
 0436            var stream = TargetVideoStream;
 0437            return !IsDirectStream
 0438                ? null
 0439                : stream?.PacketLength;
 440        }
 441    }
 442
 443    /// <summary>
 444    /// Gets the target video profile that will be in the output stream.
 445    /// </summary>
 446    /// <value>The target video profile.</value>
 447    public string? TargetVideoProfile
 448    {
 449        get
 450        {
 96451            if (IsDirectStream)
 452            {
 0453                return TargetVideoStream?.Profile;
 454            }
 455
 96456            var targetVideoCodecs = TargetVideoCodec;
 96457            var videoCodec = targetVideoCodecs.Count == 0 ? null : targetVideoCodecs[0];
 96458            if (!string.IsNullOrEmpty(videoCodec))
 459            {
 96460                return GetOption(videoCodec, "profile");
 461            }
 462
 0463            return TargetVideoStream?.Profile;
 464        }
 465    }
 466
 467    /// <summary>
 468    /// Gets the target video range type that will be in the output stream.
 469    /// </summary>
 470    /// <value>The video range type.</value>
 471    public VideoRangeType TargetVideoRangeType
 472    {
 473        get
 474        {
 0475            if (IsDirectStream)
 476            {
 0477                return TargetVideoStream?.VideoRangeType ?? VideoRangeType.Unknown;
 478            }
 479
 0480            var targetVideoCodecs = TargetVideoCodec;
 0481            var videoCodec = targetVideoCodecs.Count == 0 ? null : targetVideoCodecs[0];
 0482            if (!string.IsNullOrEmpty(videoCodec)
 0483                && Enum.TryParse(GetOption(videoCodec, "rangetype"), true, out VideoRangeType videoRangeType))
 484            {
 0485                return videoRangeType;
 486            }
 487
 0488            return TargetVideoStream?.VideoRangeType ?? VideoRangeType.Unknown;
 489        }
 490    }
 491
 492    /// <summary>
 493    /// Gets the target video codec tag.
 494    /// </summary>
 495    /// <value>The video codec tag.</value>
 496    public string? TargetVideoCodecTag
 497    {
 498        get
 499        {
 0500            var stream = TargetVideoStream;
 0501            return !IsDirectStream
 0502                ? null
 0503                : stream?.CodecTag;
 504        }
 505    }
 506
 507    /// <summary>
 508    /// Gets the audio bitrate that will be in the output stream.
 509    /// </summary>
 510    /// <value>The audio bitrate.</value>
 511    public int? TargetAudioBitrate
 512    {
 513        get
 514        {
 0515            var stream = TargetAudioStream;
 0516            return AudioBitrate.HasValue && !IsDirectStream
 0517                ? AudioBitrate
 0518                : stream?.BitRate;
 519        }
 520    }
 521
 522    /// <summary>
 523    /// Gets the amount of audio channels that will be in the output stream.
 524    /// </summary>
 525    /// <value>The target audio channels.</value>
 526    public int? TargetAudioChannels
 527    {
 528        get
 529        {
 0530            if (IsDirectStream)
 531            {
 0532                return TargetAudioStream?.Channels;
 533            }
 534
 0535            var targetAudioCodecs = TargetAudioCodec;
 0536            var codec = targetAudioCodecs.Count == 0 ? null : targetAudioCodecs[0];
 0537            if (!string.IsNullOrEmpty(codec))
 538            {
 0539                return GetTargetRefFrames(codec);
 540            }
 541
 0542            return TargetAudioStream?.Channels;
 543        }
 544    }
 545
 546    /// <summary>
 547    /// Gets the audio codec that will be in the output stream.
 548    /// </summary>
 549    /// <value>The audio codec.</value>
 550    public IReadOnlyList<string> TargetAudioCodec
 551    {
 552        get
 553        {
 394554            var stream = TargetAudioStream;
 555
 394556            string? inputCodec = stream?.Codec;
 557
 394558            if (IsDirectStream)
 559            {
 248560                return string.IsNullOrEmpty(inputCodec) ? [] : [inputCodec];
 561            }
 562
 784563            foreach (string codec in AudioCodecs)
 564            {
 286565                if (string.Equals(codec, inputCodec, StringComparison.OrdinalIgnoreCase))
 566                {
 80567                    return string.IsNullOrEmpty(codec) ? [] : [codec];
 568                }
 569            }
 570
 66571            return AudioCodecs;
 80572        }
 573    }
 574
 575    /// <summary>
 576    /// Gets the video codec that will be in the output stream.
 577    /// </summary>
 578    /// <value>The target video codec.</value>
 579    public IReadOnlyList<string> TargetVideoCodec
 580    {
 581        get
 582        {
 728583            var stream = TargetVideoStream;
 584
 728585            string? inputCodec = stream?.Codec;
 586
 728587            if (IsDirectStream)
 588            {
 248589                return string.IsNullOrEmpty(inputCodec) ? [] : [inputCodec];
 590            }
 591
 2280592            foreach (string codec in VideoCodecs)
 593            {
 900594                if (string.Equals(codec, inputCodec, StringComparison.OrdinalIgnoreCase))
 595                {
 480596                    return string.IsNullOrEmpty(codec) ? [] : [codec];
 597                }
 598            }
 599
 0600            return VideoCodecs;
 480601        }
 602    }
 603
 604    /// <summary>
 605    /// Gets the target size of the output stream.
 606    /// </summary>
 607    /// <value>The target size.</value>
 608    public long? TargetSize
 609    {
 610        get
 611        {
 0612            if (IsDirectStream)
 613            {
 0614                return MediaSource?.Size;
 615            }
 616
 0617            if (RunTimeTicks.HasValue)
 618            {
 0619                int? totalBitrate = TargetTotalBitrate;
 620
 0621                double totalSeconds = RunTimeTicks.Value;
 622                // Convert to ms
 0623                totalSeconds /= 10000;
 624                // Convert to seconds
 0625                totalSeconds /= 1000;
 626
 0627                return totalBitrate.HasValue ?
 0628                    Convert.ToInt64(totalBitrate.Value * totalSeconds) :
 0629                    null;
 630            }
 631
 0632            return null;
 633        }
 634    }
 635
 636    /// <summary>
 637    /// Gets the target video bitrate of the output stream.
 638    /// </summary>
 639    /// <value>The video bitrate.</value>
 640    public int? TargetVideoBitrate
 641    {
 642        get
 643        {
 0644            var stream = TargetVideoStream;
 645
 0646            return VideoBitrate.HasValue && !IsDirectStream
 0647                ? VideoBitrate
 0648                : stream?.BitRate;
 649        }
 650    }
 651
 652    /// <summary>
 653    /// Gets the target timestamp of the output stream.
 654    /// </summary>
 655    /// <value>The target timestamp.</value>
 656    public TransportStreamTimestamp TargetTimestamp
 657    {
 658        get
 659        {
 0660            var defaultValue = string.Equals(Container, "m2ts", StringComparison.OrdinalIgnoreCase)
 0661                ? TransportStreamTimestamp.Valid
 0662                : TransportStreamTimestamp.None;
 663
 0664            return !IsDirectStream
 0665                ? defaultValue
 0666                : MediaSource is null ? defaultValue : MediaSource.Timestamp ?? TransportStreamTimestamp.None;
 667        }
 668    }
 669
 670    /// <summary>
 671    /// Gets the target total bitrate of the output stream.
 672    /// </summary>
 673    /// <value>The target total bitrate.</value>
 0674    public int? TargetTotalBitrate => (TargetAudioBitrate ?? 0) + (TargetVideoBitrate ?? 0);
 675
 676    /// <summary>
 677    /// Gets a value indicating whether the output stream is anamorphic.
 678    /// </summary>
 679    public bool? IsTargetAnamorphic
 680    {
 681        get
 682        {
 0683            if (IsDirectStream)
 684            {
 0685                return TargetVideoStream?.IsAnamorphic;
 686            }
 687
 0688            return false;
 689        }
 690    }
 691
 692    /// <summary>
 693    /// Gets a value indicating whether the output stream is interlaced.
 694    /// </summary>
 695    public bool? IsTargetInterlaced
 696    {
 697        get
 698        {
 0699            if (IsDirectStream)
 700            {
 0701                return TargetVideoStream?.IsInterlaced;
 702            }
 703
 0704            var targetVideoCodecs = TargetVideoCodec;
 0705            var videoCodec = targetVideoCodecs.Count == 0 ? null : targetVideoCodecs[0];
 0706            if (!string.IsNullOrEmpty(videoCodec))
 707            {
 0708                if (string.Equals(GetOption(videoCodec, "deinterlace"), "true", StringComparison.OrdinalIgnoreCase))
 709                {
 0710                    return false;
 711                }
 712            }
 713
 0714            return TargetVideoStream?.IsInterlaced;
 715        }
 716    }
 717
 718    /// <summary>
 719    /// Gets a value indicating whether the output stream is AVC.
 720    /// </summary>
 721    public bool? IsTargetAVC
 722    {
 723        get
 724        {
 0725            if (IsDirectStream)
 726            {
 0727                return TargetVideoStream?.IsAVC;
 728            }
 729
 0730            return true;
 731        }
 732    }
 733
 734    /// <summary>
 735    /// Gets the target width of the output stream.
 736    /// </summary>
 737    /// <value>The target width.</value>
 738    public int? TargetWidth
 739    {
 740        get
 741        {
 0742            var videoStream = TargetVideoStream;
 743
 0744            if (videoStream is not null && videoStream.Width.HasValue && videoStream.Height.HasValue)
 745            {
 0746                ImageDimensions size = new ImageDimensions(videoStream.Width.Value, videoStream.Height.Value);
 747
 0748                size = DrawingUtils.Resize(size, 0, 0, MaxWidth ?? 0, MaxHeight ?? 0);
 749
 0750                return size.Width;
 751            }
 752
 0753            return MaxWidth;
 754        }
 755    }
 756
 757    /// <summary>
 758    /// Gets the target height of the output stream.
 759    /// </summary>
 760    /// <value>The target height.</value>
 761    public int? TargetHeight
 762    {
 763        get
 764        {
 0765            var videoStream = TargetVideoStream;
 766
 0767            if (videoStream is not null && videoStream.Width.HasValue && videoStream.Height.HasValue)
 768            {
 0769                ImageDimensions size = new ImageDimensions(videoStream.Width.Value, videoStream.Height.Value);
 770
 0771                size = DrawingUtils.Resize(size, 0, 0, MaxWidth ?? 0, MaxHeight ?? 0);
 772
 0773                return size.Height;
 774            }
 775
 0776            return MaxHeight;
 777        }
 778    }
 779
 780    /// <summary>
 781    /// Gets the target video stream count of the output stream.
 782    /// </summary>
 783    /// <value>The target video stream count.</value>
 784    public int? TargetVideoStreamCount
 785    {
 786        get
 787        {
 0788            if (IsDirectStream)
 789            {
 0790                return GetMediaStreamCount(MediaStreamType.Video, int.MaxValue);
 791            }
 792
 0793            return GetMediaStreamCount(MediaStreamType.Video, 1);
 794        }
 795    }
 796
 797    /// <summary>
 798    /// Gets the target audio stream count of the output stream.
 799    /// </summary>
 800    /// <value>The target audio stream count.</value>
 801    public int? TargetAudioStreamCount
 802    {
 803        get
 804        {
 0805            if (IsDirectStream)
 806            {
 0807                return GetMediaStreamCount(MediaStreamType.Audio, int.MaxValue);
 808            }
 809
 0810            return GetMediaStreamCount(MediaStreamType.Audio, 1);
 811        }
 812    }
 813
 814    /// <summary>
 815    /// Sets a stream option.
 816    /// </summary>
 817    /// <param name="qualifier">The qualifier.</param>
 818    /// <param name="name">The name.</param>
 819    /// <param name="value">The value.</param>
 820    public void SetOption(string? qualifier, string name, string value)
 821    {
 1388822        if (string.IsNullOrEmpty(qualifier))
 823        {
 0824            SetOption(name, value);
 825        }
 826        else
 827        {
 1388828            SetOption(qualifier + "-" + name, value);
 829        }
 1388830    }
 831
 832    /// <summary>
 833    /// Sets a stream option.
 834    /// </summary>
 835    /// <param name="name">The name.</param>
 836    /// <param name="value">The value.</param>
 837    public void SetOption(string name, string value)
 838    {
 1388839        StreamOptions[name] = value;
 1388840    }
 841
 842    /// <summary>
 843    /// Gets a stream option.
 844    /// </summary>
 845    /// <param name="qualifier">The qualifier.</param>
 846    /// <param name="name">The name.</param>
 847    /// <returns>The value.</returns>
 848    public string? GetOption(string? qualifier, string name)
 849    {
 1170850        var value = GetOption(qualifier + "-" + name);
 851
 1170852        if (string.IsNullOrEmpty(value))
 853        {
 722854            value = GetOption(name);
 855        }
 856
 1170857        return value;
 858    }
 859
 860    /// <summary>
 861    /// Gets a stream option.
 862    /// </summary>
 863    /// <param name="name">The name.</param>
 864    /// <returns>The value.</returns>
 865    public string? GetOption(string name)
 866    {
 1892867        if (StreamOptions.TryGetValue(name, out var value))
 868        {
 448869            return value;
 870        }
 871
 1444872        return null;
 873    }
 874
 875    /// <summary>
 876    /// Returns this output stream URL for this class.
 877    /// </summary>
 878    /// <param name="baseUrl">The base Url.</param>
 879    /// <param name="accessToken">The access Token.</param>
 880    /// <param name="query">Optional extra query.</param>
 881    /// <returns>A querystring representation of this object.</returns>
 882    public string ToUrl(string? baseUrl, string? accessToken, string? query)
 883    {
 100559884        var sb = new StringBuilder();
 100559885        if (!string.IsNullOrEmpty(baseUrl))
 886        {
 100559887            sb.Append(baseUrl.TrimEnd('/'));
 888        }
 889
 100559890        if (MediaType == DlnaProfileType.Audio)
 891        {
 100001892            sb.Append("/audio/");
 893        }
 894        else
 895        {
 558896            sb.Append("/videos/");
 897        }
 898
 100559899        sb.Append(ItemId);
 900
 100559901        if (SubProtocol == MediaStreamProtocol.hls)
 902        {
 264903            sb.Append("/master.m3u8?");
 904        }
 905        else
 906        {
 100295907            sb.Append("/stream");
 908
 100295909            if (!string.IsNullOrEmpty(Container))
 910            {
 100276911                sb.Append('.');
 100276912                sb.Append(Container);
 913            }
 914
 100295915            sb.Append('?');
 916        }
 917
 100559918        if (!string.IsNullOrEmpty(DeviceProfileId))
 919        {
 100000920            sb.Append("&DeviceProfileId=");
 100000921            sb.Append(DeviceProfileId);
 922        }
 923
 100559924        if (!string.IsNullOrEmpty(DeviceId))
 925        {
 100278926            sb.Append("&DeviceId=");
 100278927            sb.Append(DeviceId);
 928        }
 929
 100559930        if (!string.IsNullOrEmpty(MediaSourceId))
 931        {
 556932            sb.Append("&MediaSourceId=");
 556933            sb.Append(MediaSourceId);
 934        }
 935
 936        // default true so don't store.
 100559937        if (IsDirectStream)
 938        {
 100248939            sb.Append("&Static=true");
 940        }
 941
 100559942        if (VideoCodecs.Count != 0)
 943        {
 540944            sb.Append("&VideoCodec=");
 540945            sb.AppendJoin(',', VideoCodecs);
 946        }
 947
 100559948        if (AudioCodecs.Count != 0)
 949        {
 540950            sb.Append("&AudioCodec=");
 540951            sb.AppendJoin(',', AudioCodecs);
 952        }
 953
 100559954        if (AudioStreamIndex.HasValue)
 955        {
 554956            sb.Append("&AudioStreamIndex=");
 554957            sb.Append(AudioStreamIndex.Value.ToString(CultureInfo.InvariantCulture));
 958        }
 959
 100559960        if (SubtitleStreamIndex.HasValue && (AlwaysBurnInSubtitleWhenTranscoding || SubtitleDeliveryMethod != SubtitleDe
 961        {
 16962            sb.Append("&SubtitleStreamIndex=");
 16963            sb.Append(SubtitleStreamIndex.Value.ToString(CultureInfo.InvariantCulture));
 964        }
 965
 100559966        if (VideoBitrate.HasValue)
 967        {
 292968            sb.Append("&VideoBitrate=");
 292969            sb.Append(VideoBitrate.Value.ToString(CultureInfo.InvariantCulture));
 970        }
 971
 100559972        if (AudioBitrate.HasValue)
 973        {
 292974            sb.Append("&AudioBitrate=");
 292975            sb.Append(AudioBitrate.Value.ToString(CultureInfo.InvariantCulture));
 976        }
 977
 100559978        if (AudioSampleRate.HasValue)
 979        {
 110980            sb.Append("&AudioSampleRate=");
 110981            sb.Append(AudioSampleRate.Value.ToString(CultureInfo.InvariantCulture));
 982        }
 983
 100559984        if (MaxFramerate.HasValue)
 985        {
 290986            sb.Append("&MaxFramerate=");
 290987            sb.Append(MaxFramerate.Value.ToString(CultureInfo.InvariantCulture));
 988        }
 989
 100559990        if (MaxWidth.HasValue)
 991        {
 8992            sb.Append("&MaxWidth=");
 8993            sb.Append(MaxWidth.Value.ToString(CultureInfo.InvariantCulture));
 994        }
 995
 100559996        if (MaxHeight.HasValue)
 997        {
 0998            sb.Append("&MaxHeight=");
 0999            sb.Append(MaxHeight.Value.ToString(CultureInfo.InvariantCulture));
 1000        }
 1001
 1005591002        if (SubProtocol == MediaStreamProtocol.hls)
 1003        {
 2641004            if (!string.IsNullOrEmpty(Container))
 1005            {
 2641006                sb.Append("&SegmentContainer=");
 2641007                sb.Append(Container);
 1008            }
 1009
 2641010            if (SegmentLength.HasValue)
 1011            {
 01012                sb.Append("&SegmentLength=");
 01013                sb.Append(SegmentLength.Value.ToString(CultureInfo.InvariantCulture));
 1014            }
 1015
 2641016            if (MinSegments.HasValue)
 1017            {
 2041018                sb.Append("&MinSegments=");
 2041019                sb.Append(MinSegments.Value.ToString(CultureInfo.InvariantCulture));
 1020            }
 1021
 2641022            sb.Append("&BreakOnNonKeyFrames=");
 2641023            sb.Append(BreakOnNonKeyFrames.ToString(CultureInfo.InvariantCulture));
 1024        }
 1025        else
 1026        {
 1002951027            if (StartPositionTicks != 0)
 1028            {
 1000001029                sb.Append("&StartTimeTicks=");
 1000001030                sb.Append(StartPositionTicks.ToString(CultureInfo.InvariantCulture));
 1031            }
 1032        }
 1033
 1005591034        if (!string.IsNullOrEmpty(PlaySessionId))
 1035        {
 1000001036            sb.Append("&PlaySessionId=");
 1000001037            sb.Append(PlaySessionId);
 1038        }
 1039
 1005591040        if (!string.IsNullOrEmpty(accessToken))
 1041        {
 1005591042            sb.Append("&ApiKey=");
 1005591043            sb.Append(accessToken);
 1044        }
 1045
 1005591046        var liveStreamId = MediaSource?.LiveStreamId;
 1005591047        if (!string.IsNullOrEmpty(liveStreamId))
 1048        {
 01049            sb.Append("&LiveStreamId=");
 01050            sb.Append(liveStreamId);
 1051        }
 1052
 1005591053        if (!IsDirectStream)
 1054        {
 3111055            if (RequireNonAnamorphic)
 1056            {
 01057                sb.Append("&RequireNonAnamorphic=");
 01058                sb.Append(RequireNonAnamorphic.ToString(CultureInfo.InvariantCulture));
 1059            }
 1060
 3111061            if (TranscodingMaxAudioChannels.HasValue)
 1062            {
 2661063                sb.Append("&TranscodingMaxAudioChannels=");
 2661064                sb.Append(TranscodingMaxAudioChannels.Value.ToString(CultureInfo.InvariantCulture));
 1065            }
 1066
 3111067            if (EnableSubtitlesInManifest)
 1068            {
 01069                sb.Append("&EnableSubtitlesInManifest=");
 01070                sb.Append(EnableSubtitlesInManifest.ToString(CultureInfo.InvariantCulture));
 1071            }
 1072
 3111073            if (EnableMpegtsM2TsMode)
 1074            {
 01075                sb.Append("&EnableMpegtsM2TsMode=");
 01076                sb.Append(EnableMpegtsM2TsMode.ToString(CultureInfo.InvariantCulture));
 1077            }
 1078
 3111079            if (EstimateContentLength)
 1080            {
 01081                sb.Append("&EstimateContentLength=");
 01082                sb.Append(EstimateContentLength.ToString(CultureInfo.InvariantCulture));
 1083            }
 1084
 3111085            if (TranscodeSeekInfo != TranscodeSeekInfo.Auto)
 1086            {
 01087                sb.Append("&TranscodeSeekInfo=");
 01088                sb.Append(TranscodeSeekInfo.ToString());
 1089            }
 1090
 3111091            if (CopyTimestamps)
 1092            {
 241093                sb.Append("&CopyTimestamps=");
 241094                sb.Append(CopyTimestamps.ToString(CultureInfo.InvariantCulture));
 1095            }
 1096
 3111097            sb.Append("&RequireAvc=");
 3111098            sb.Append(RequireAvc.ToString(CultureInfo.InvariantCulture).ToLowerInvariant());
 1099
 3111100            sb.Append("&EnableAudioVbrEncoding=");
 3111101            sb.Append(EnableAudioVbrEncoding.ToString(CultureInfo.InvariantCulture).ToLowerInvariant());
 1102        }
 1103
 1005591104        var etag = MediaSource?.ETag;
 1005591105        if (!string.IsNullOrEmpty(etag))
 1106        {
 5561107            sb.Append("&Tag=");
 5561108            sb.Append(etag);
 1109        }
 1110
 1005591111        if (SubtitleStreamIndex.HasValue && SubtitleDeliveryMethod != SubtitleDeliveryMethod.External)
 1112        {
 521113            sb.Append("&SubtitleMethod=");
 521114            sb.Append(SubtitleDeliveryMethod);
 1115        }
 1116
 1005591117        if (SubtitleStreamIndex.HasValue && SubtitleDeliveryMethod == SubtitleDeliveryMethod.Embed && SubtitleCodecs.Cou
 1118        {
 01119            sb.Append("&SubtitleCodec=");
 01120            sb.AppendJoin(',', SubtitleCodecs);
 1121        }
 1122
 2060301123        foreach (var pair in StreamOptions)
 1124        {
 1125            // Strip spaces to avoid having to encode h264 profile names
 24561126            sb.Append('&');
 24561127            sb.Append(pair.Key);
 24561128            sb.Append('=');
 24561129            sb.Append(pair.Value.Replace(" ", string.Empty, StringComparison.Ordinal));
 1130        }
 1131
 1005591132        var transcodeReasonsValues = TranscodeReasons.GetUniqueFlags().ToArray();
 1005591133        if (!IsDirectStream && transcodeReasonsValues.Length > 0)
 1134        {
 3081135            sb.Append("&TranscodeReasons=");
 3081136            sb.AppendJoin(',', transcodeReasonsValues);
 1137        }
 1138
 1005591139        if (!string.IsNullOrEmpty(query))
 1140        {
 01141            sb.Append(query);
 1142        }
 1143
 1005591144        return sb.ToString();
 1145    }
 1146
 1147    /// <summary>
 1148    /// Gets the subtitle profiles.
 1149    /// </summary>
 1150    /// <param name="transcoderSupport">The transcoder support.</param>
 1151    /// <param name="includeSelectedTrackOnly">If only the selected track should be included.</param>
 1152    /// <param name="baseUrl">The base URL.</param>
 1153    /// <param name="accessToken">The access token.</param>
 1154    /// <returns>The <see cref="SubtitleStreamInfo"/> of the profiles.</returns>
 1155    public IEnumerable<SubtitleStreamInfo> GetSubtitleProfiles(ITranscoderSupport transcoderSupport, bool includeSelecte
 1156    {
 01157        return GetSubtitleProfiles(transcoderSupport, includeSelectedTrackOnly, false, baseUrl, accessToken);
 1158    }
 1159
 1160    /// <summary>
 1161    /// Gets the subtitle profiles.
 1162    /// </summary>
 1163    /// <param name="transcoderSupport">The transcoder support.</param>
 1164    /// <param name="includeSelectedTrackOnly">If only the selected track should be included.</param>
 1165    /// <param name="enableAllProfiles">If all profiles are enabled.</param>
 1166    /// <param name="baseUrl">The base URL.</param>
 1167    /// <param name="accessToken">The access token.</param>
 1168    /// <returns>The <see cref="SubtitleStreamInfo"/> of the profiles.</returns>
 1169    public IEnumerable<SubtitleStreamInfo> GetSubtitleProfiles(ITranscoderSupport transcoderSupport, bool includeSelecte
 1170    {
 01171        if (MediaSource is null)
 1172        {
 01173            return [];
 1174        }
 1175
 01176        List<SubtitleStreamInfo> list = [];
 1177
 1178        // HLS will preserve timestamps so we can just grab the full subtitle stream
 01179        long startPositionTicks = SubProtocol == MediaStreamProtocol.hls
 01180            ? 0
 01181            : (PlayMethod == PlayMethod.Transcode && !CopyTimestamps ? StartPositionTicks : 0);
 1182
 1183        // First add the selected track
 01184        if (SubtitleStreamIndex.HasValue)
 1185        {
 01186            foreach (var stream in MediaSource.MediaStreams)
 1187            {
 01188                if (stream.Type == MediaStreamType.Subtitle && stream.Index == SubtitleStreamIndex.Value)
 1189                {
 01190                    AddSubtitleProfiles(list, stream, transcoderSupport, enableAllProfiles, baseUrl, accessToken, startP
 1191                }
 1192            }
 1193        }
 1194
 01195        if (!includeSelectedTrackOnly)
 1196        {
 01197            foreach (var stream in MediaSource.MediaStreams)
 1198            {
 01199                if (stream.Type == MediaStreamType.Subtitle && (!SubtitleStreamIndex.HasValue || stream.Index != Subtitl
 1200                {
 01201                    AddSubtitleProfiles(list, stream, transcoderSupport, enableAllProfiles, baseUrl, accessToken, startP
 1202                }
 1203            }
 1204        }
 1205
 01206        return list;
 1207    }
 1208
 1209    private void AddSubtitleProfiles(List<SubtitleStreamInfo> list, MediaStream stream, ITranscoderSupport transcoderSup
 1210    {
 01211        if (enableAllProfiles)
 1212        {
 01213            foreach (var profile in DeviceProfile.SubtitleProfiles)
 1214            {
 01215                var info = GetSubtitleStreamInfo(stream, baseUrl, accessToken, startPositionTicks, new[] { profile }, tr
 01216                if (info is not null)
 1217                {
 01218                    list.Add(info);
 1219                }
 1220            }
 1221        }
 1222        else
 1223        {
 01224            var info = GetSubtitleStreamInfo(stream, baseUrl, accessToken, startPositionTicks, DeviceProfile.SubtitlePro
 01225            if (info is not null)
 1226            {
 01227                list.Add(info);
 1228            }
 1229        }
 01230    }
 1231
 1232    private SubtitleStreamInfo? GetSubtitleStreamInfo(MediaStream stream, string baseUrl, string? accessToken, long star
 1233    {
 01234        if (MediaSource is null)
 1235        {
 01236            return null;
 1237        }
 1238
 01239        var subtitleProfile = StreamBuilder.GetSubtitleProfile(MediaSource, stream, subtitleProfiles, PlayMethod, transc
 01240        var info = new SubtitleStreamInfo
 01241        {
 01242            IsForced = stream.IsForced,
 01243            Language = stream.Language,
 01244            Name = stream.Language ?? "Unknown",
 01245            Format = subtitleProfile.Format,
 01246            Index = stream.Index,
 01247            DeliveryMethod = subtitleProfile.Method,
 01248            DisplayTitle = stream.DisplayTitle
 01249        };
 1250
 01251        if (info.DeliveryMethod == SubtitleDeliveryMethod.External)
 1252        {
 01253            if (MediaSource.Protocol == MediaProtocol.File || !string.Equals(stream.Codec, subtitleProfile.Format, Strin
 1254            {
 01255                info.Url = string.Format(
 01256                    CultureInfo.InvariantCulture,
 01257                    "{0}/Videos/{1}/{2}/Subtitles/{3}/{4}/Stream.{5}",
 01258                    baseUrl,
 01259                    ItemId,
 01260                    MediaSourceId,
 01261                    stream.Index.ToString(CultureInfo.InvariantCulture),
 01262                    startPositionTicks.ToString(CultureInfo.InvariantCulture),
 01263                    subtitleProfile.Format);
 1264
 01265                if (!string.IsNullOrEmpty(accessToken))
 1266                {
 01267                    info.Url += "?ApiKey=" + accessToken;
 1268                }
 1269
 01270                info.IsExternalUrl = false;
 1271            }
 1272            else
 1273            {
 01274                info.Url = stream.Path;
 01275                info.IsExternalUrl = true;
 1276            }
 1277        }
 1278
 01279        return info;
 1280    }
 1281
 1282    /// <summary>
 1283    /// Gets the target video bit depth.
 1284    /// </summary>
 1285    /// <param name="codec">The codec.</param>
 1286    /// <returns>The target video bit depth.</returns>
 1287    public int? GetTargetVideoBitDepth(string? codec)
 1288    {
 961289        var value = GetOption(codec, "videobitdepth");
 1290
 961291        if (int.TryParse(value, CultureInfo.InvariantCulture, out var result))
 1292        {
 961293            return result;
 1294        }
 1295
 01296        return null;
 1297    }
 1298
 1299    /// <summary>
 1300    /// Gets the target audio bit depth.
 1301    /// </summary>
 1302    /// <param name="codec">The codec.</param>
 1303    /// <returns>The target audio bit depth.</returns>
 1304    public int? GetTargetAudioBitDepth(string? codec)
 1305    {
 01306        var value = GetOption(codec, "audiobitdepth");
 1307
 01308        if (int.TryParse(value, CultureInfo.InvariantCulture, out var result))
 1309        {
 01310            return result;
 1311        }
 1312
 01313        return null;
 1314    }
 1315
 1316    /// <summary>
 1317    /// Gets the target video level.
 1318    /// </summary>
 1319    /// <param name="codec">The codec.</param>
 1320    /// <returns>The target video level.</returns>
 1321    public double? GetTargetVideoLevel(string? codec)
 1322    {
 3081323        var value = GetOption(codec, "level");
 1324
 3081325        if (double.TryParse(value, CultureInfo.InvariantCulture, out var result))
 1326        {
 1701327            return result;
 1328        }
 1329
 1381330        return null;
 1331    }
 1332
 1333    /// <summary>
 1334    /// Gets the target reference frames.
 1335    /// </summary>
 1336    /// <param name="codec">The codec.</param>
 1337    /// <returns>The target reference frames.</returns>
 1338    public int? GetTargetRefFrames(string? codec)
 1339    {
 21340        var value = GetOption(codec, "maxrefframes");
 1341
 21342        if (int.TryParse(value, CultureInfo.InvariantCulture, out var result))
 1343        {
 01344            return result;
 1345        }
 1346
 21347        return null;
 1348    }
 1349
 1350    /// <summary>
 1351    /// Gets the target audio channels.
 1352    /// </summary>
 1353    /// <param name="codec">The codec.</param>
 1354    /// <returns>The target audio channels.</returns>
 1355    public int? GetTargetAudioChannels(string? codec)
 1356    {
 1741357        var defaultValue = GlobalMaxAudioChannels ?? TranscodingMaxAudioChannels;
 1358
 1741359        var value = GetOption(codec, "audiochannels");
 1741360        if (string.IsNullOrEmpty(value))
 1361        {
 1741362            return defaultValue;
 1363        }
 1364
 01365        if (int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var result))
 1366        {
 01367            return Math.Min(result, defaultValue ?? result);
 1368        }
 1369
 01370        return defaultValue;
 1371    }
 1372
 1373    /// <summary>
 1374    /// Gets the media stream count.
 1375    /// </summary>
 1376    /// <param name="type">The type.</param>
 1377    /// <param name="limit">The limit.</param>
 1378    /// <returns>The media stream count.</returns>
 1379    private int? GetMediaStreamCount(MediaStreamType type, int limit)
 1380    {
 01381        var count = MediaSource?.GetStreamCount(type);
 1382
 01383        if (count.HasValue)
 1384        {
 01385            count = Math.Min(count.Value, limit);
 1386        }
 1387
 01388        return count;
 1389    }
 1390}

Methods/Properties

get_MediaSourceId()
get_IsDirectStream()
get_TargetAudioStream()
get_TargetVideoStream()
get_TargetAudioSampleRate()
get_TargetAudioBitDepth()
get_TargetVideoBitDepth()
get_TargetRefFrames()
get_TargetFramerate()
get_TargetVideoLevel()
get_TargetPacketLength()
get_TargetVideoProfile()
get_TargetVideoRangeType()
get_TargetVideoCodecTag()
get_TargetAudioBitrate()
get_TargetAudioChannels()
get_TargetAudioCodec()
get_TargetVideoCodec()
get_TargetSize()
get_TargetVideoBitrate()
get_TargetTimestamp()
get_TargetTotalBitrate()
get_IsTargetAnamorphic()
get_IsTargetInterlaced()
get_IsTargetAVC()
get_TargetWidth()
get_TargetHeight()
get_TargetVideoStreamCount()
get_TargetAudioStreamCount()
SetOption(System.String,System.String,System.String)
SetOption(System.String,System.String)
GetOption(System.String,System.String)
GetOption(System.String)
ToUrl(System.String,System.String,System.String)
GetSubtitleProfiles(MediaBrowser.Model.Dlna.ITranscoderSupport,System.Boolean,System.String,System.String)
GetSubtitleProfiles(MediaBrowser.Model.Dlna.ITranscoderSupport,System.Boolean,System.Boolean,System.String,System.String)
AddSubtitleProfiles(System.Collections.Generic.List`1<MediaBrowser.Model.Dlna.SubtitleStreamInfo>,MediaBrowser.Model.Entities.MediaStream,MediaBrowser.Model.Dlna.ITranscoderSupport,System.Boolean,System.String,System.String,System.Int64)
GetSubtitleStreamInfo(MediaBrowser.Model.Entities.MediaStream,System.String,System.String,System.Int64,MediaBrowser.Model.Dlna.SubtitleProfile[],MediaBrowser.Model.Dlna.ITranscoderSupport)
GetTargetVideoBitDepth(System.String)
GetTargetAudioBitDepth(System.String)
GetTargetVideoLevel(System.String)
GetTargetRefFrames(System.String)
GetTargetAudioChannels(System.String)
GetMediaStreamCount(MediaBrowser.Model.Entities.MediaStreamType,System.Int32)