< Summary - Jellyfin

Information
Class: MediaBrowser.Model.Dlna.StreamInfo
Assembly: MediaBrowser.Model
File(s): /srv/git/jellyfin/MediaBrowser.Model/Dlna/StreamInfo.cs
Line coverage
45%
Covered lines: 170
Uncovered lines: 203
Coverable lines: 373
Total lines: 1389
Line coverage: 45.5%
Branch coverage
37%
Covered branches: 139
Total branches: 374
Branch coverage: 37.1%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 10/18/2025 - 12:10:13 AM Line coverage: 46.4% (172/370) Branch coverage: 38.1% (139/364) Total lines: 139011/28/2025 - 12:11:11 AM Line coverage: 45.8% (172/375) Branch coverage: 36.9% (139/376) Total lines: 13971/19/2026 - 12:13:54 AM Line coverage: 45.5% (170/373) Branch coverage: 36.9% (139/376) Total lines: 13891/27/2026 - 12:13:24 AM Line coverage: 45.5% (170/373) Branch coverage: 37.1% (139/374) Total lines: 1389 10/18/2025 - 12:10:13 AM Line coverage: 46.4% (172/370) Branch coverage: 38.1% (139/364) Total lines: 139011/28/2025 - 12:11:11 AM Line coverage: 45.8% (172/375) Branch coverage: 36.9% (139/376) Total lines: 13971/19/2026 - 12:13:54 AM Line coverage: 45.5% (170/373) Branch coverage: 36.9% (139/376) Total lines: 13891/27/2026 - 12:13:24 AM Line coverage: 45.5% (170/373) Branch coverage: 37.1% (139/374) Total lines: 1389

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 requires AVC.
 91    /// </summary>
 92    public bool RequireAvc { get; set; }
 93
 94    /// <summary>
 95    /// Gets or sets a value indicating whether the stream requires AVC.
 96    /// </summary>
 97    public bool RequireNonAnamorphic { get; set; }
 98
 99    /// <summary>
 100    /// Gets or sets a value indicating whether timestamps should be copied.
 101    /// </summary>
 102    public bool CopyTimestamps { get; set; }
 103
 104    /// <summary>
 105    /// Gets or sets a value indicating whether timestamps should be copied.
 106    /// </summary>
 107    public bool EnableMpegtsM2TsMode { get; set; }
 108
 109    /// <summary>
 110    /// Gets or sets a value indicating whether the subtitle manifest is enabled.
 111    /// </summary>
 112    public bool EnableSubtitlesInManifest { get; set; }
 113
 114    /// <summary>
 115    /// Gets or sets the audio codecs.
 116    /// </summary>
 117    /// <value>The audio codecs.</value>
 118    public IReadOnlyList<string> AudioCodecs { get; set; }
 119
 120    /// <summary>
 121    /// Gets or sets the video codecs.
 122    /// </summary>
 123    /// <value>The video codecs.</value>
 124    public IReadOnlyList<string> VideoCodecs { get; set; }
 125
 126    /// <summary>
 127    /// Gets or sets the audio stream index.
 128    /// </summary>
 129    /// <value>The audio stream index.</value>
 130    public int? AudioStreamIndex { get; set; }
 131
 132    /// <summary>
 133    /// Gets or sets the video stream index.
 134    /// </summary>
 135    /// <value>The subtitle stream index.</value>
 136    public int? SubtitleStreamIndex { get; set; }
 137
 138    /// <summary>
 139    /// Gets or sets the maximum transcoding audio channels.
 140    /// </summary>
 141    /// <value>The maximum transcoding audio channels.</value>
 142    public int? TranscodingMaxAudioChannels { get; set; }
 143
 144    /// <summary>
 145    /// Gets or sets the global maximum audio channels.
 146    /// </summary>
 147    /// <value>The global maximum audio channels.</value>
 148    public int? GlobalMaxAudioChannels { get; set; }
 149
 150    /// <summary>
 151    /// Gets or sets the audio bitrate.
 152    /// </summary>
 153    /// <value>The audio bitrate.</value>
 154    public int? AudioBitrate { get; set; }
 155
 156    /// <summary>
 157    /// Gets or sets the audio sample rate.
 158    /// </summary>
 159    /// <value>The audio sample rate.</value>
 160    public int? AudioSampleRate { get; set; }
 161
 162    /// <summary>
 163    /// Gets or sets the video bitrate.
 164    /// </summary>
 165    /// <value>The video bitrate.</value>
 166    public int? VideoBitrate { get; set; }
 167
 168    /// <summary>
 169    /// Gets or sets the maximum output width.
 170    /// </summary>
 171    /// <value>The output width.</value>
 172    public int? MaxWidth { get; set; }
 173
 174    /// <summary>
 175    /// Gets or sets the maximum output height.
 176    /// </summary>
 177    /// <value>The maximum output height.</value>
 178    public int? MaxHeight { get; set; }
 179
 180    /// <summary>
 181    /// Gets or sets the maximum framerate.
 182    /// </summary>
 183    /// <value>The maximum framerate.</value>
 184    public float? MaxFramerate { get; set; }
 185
 186    /// <summary>
 187    /// Gets or sets the device profile.
 188    /// </summary>
 189    /// <value>The device profile.</value>
 190    public required DeviceProfile DeviceProfile { get; set; }
 191
 192    /// <summary>
 193    /// Gets or sets the device profile id.
 194    /// </summary>
 195    /// <value>The device profile id.</value>
 196    public string? DeviceProfileId { get; set; }
 197
 198    /// <summary>
 199    /// Gets or sets the device id.
 200    /// </summary>
 201    /// <value>The device id.</value>
 202    public string? DeviceId { get; set; }
 203
 204    /// <summary>
 205    /// Gets or sets the runtime ticks.
 206    /// </summary>
 207    /// <value>The runtime ticks.</value>
 208    public long? RunTimeTicks { get; set; }
 209
 210    /// <summary>
 211    /// Gets or sets the transcode seek info.
 212    /// </summary>
 213    /// <value>The transcode seek info.</value>
 214    public TranscodeSeekInfo TranscodeSeekInfo { get; set; }
 215
 216    /// <summary>
 217    /// Gets or sets a value indicating whether content length should be estimated.
 218    /// </summary>
 219    public bool EstimateContentLength { get; set; }
 220
 221    /// <summary>
 222    /// Gets or sets the media source info.
 223    /// </summary>
 224    /// <value>The media source info.</value>
 225    public MediaSourceInfo? MediaSource { get; set; }
 226
 227    /// <summary>
 228    /// Gets or sets the subtitle codecs.
 229    /// </summary>
 230    /// <value>The subtitle codecs.</value>
 231    public IReadOnlyList<string> SubtitleCodecs { get; set; }
 232
 233    /// <summary>
 234    /// Gets or sets the subtitle delivery method.
 235    /// </summary>
 236    /// <value>The subtitle delivery method.</value>
 237    public SubtitleDeliveryMethod SubtitleDeliveryMethod { get; set; }
 238
 239    /// <summary>
 240    /// Gets or sets the subtitle format.
 241    /// </summary>
 242    /// <value>The subtitle format.</value>
 243    public string? SubtitleFormat { get; set; }
 244
 245    /// <summary>
 246    /// Gets or sets the play session id.
 247    /// </summary>
 248    /// <value>The play session id.</value>
 249    public string? PlaySessionId { get; set; }
 250
 251    /// <summary>
 252    /// Gets or sets the transcode reasons.
 253    /// </summary>
 254    /// <value>The transcode reasons.</value>
 255    public TranscodeReason TranscodeReasons { get; set; }
 256
 257    /// <summary>
 258    /// Gets the stream options.
 259    /// </summary>
 260    /// <value>The stream options.</value>
 261    public Dictionary<string, string> StreamOptions { get; private set; }
 262
 263    /// <summary>
 264    /// Gets the media source id.
 265    /// </summary>
 266    /// <value>The media source id.</value>
 201396267    public string? MediaSourceId => MediaSource?.Id;
 268
 269    /// <summary>
 270    /// Gets or sets a value indicating whether audio VBR encoding is enabled.
 271    /// </summary>
 272    public bool EnableAudioVbrEncoding { get; set; }
 273
 274    /// <summary>
 275    /// Gets or sets a value indicating whether always burn in subtitles when transcoding.
 276    /// </summary>
 277    public bool AlwaysBurnInSubtitleWhenTranscoding { get; set; }
 278
 279    /// <summary>
 280    /// Gets a value indicating whether the stream is direct.
 281    /// </summary>
 603096282    public bool IsDirectStream => MediaSource?.VideoType is not (VideoType.Dvd or VideoType.BluRay)
 603096283        && PlayMethod is PlayMethod.DirectStream or PlayMethod.DirectPlay;
 284
 285    /// <summary>
 286    /// Gets the audio stream that will be used in the output stream.
 287    /// </summary>
 288    /// <value>The audio stream.</value>
 692289    public MediaStream? TargetAudioStream => MediaSource?.GetDefaultAudioStream(AudioStreamIndex);
 290
 291    /// <summary>
 292    /// Gets the video stream that will be used in the output stream.
 293    /// </summary>
 294    /// <value>The video stream.</value>
 1006295    public MediaStream? TargetVideoStream => MediaSource?.VideoStream;
 296
 297    /// <summary>
 298    /// Gets the audio sample rate that will be in the output stream.
 299    /// </summary>
 300    /// <value>The target audio sample rate.</value>
 301    public int? TargetAudioSampleRate
 302    {
 303        get
 304        {
 0305            var stream = TargetAudioStream;
 0306            return AudioSampleRate.HasValue && !IsDirectStream
 0307                ? AudioSampleRate
 0308                : stream?.SampleRate;
 309        }
 310    }
 311
 312    /// <summary>
 313    /// Gets the audio bit depth that will be in the output stream.
 314    /// </summary>
 315    /// <value>The target bit depth.</value>
 316    public int? TargetAudioBitDepth
 317    {
 318        get
 319        {
 0320            if (IsDirectStream)
 321            {
 0322                return TargetAudioStream?.BitDepth;
 323            }
 324
 0325            var targetAudioCodecs = TargetAudioCodec;
 0326            var audioCodec = targetAudioCodecs.Count == 0 ? null : targetAudioCodecs[0];
 0327            if (!string.IsNullOrEmpty(audioCodec))
 328            {
 0329                return GetTargetAudioBitDepth(audioCodec);
 330            }
 331
 0332            return TargetAudioStream?.BitDepth;
 333        }
 334    }
 335
 336    /// <summary>
 337    /// Gets the video bit depth that will be in the output stream.
 338    /// </summary>
 339    /// <value>The target video bit depth.</value>
 340    public int? TargetVideoBitDepth
 341    {
 342        get
 343        {
 96344            if (IsDirectStream)
 345            {
 0346                return TargetVideoStream?.BitDepth;
 347            }
 348
 96349            var targetVideoCodecs = TargetVideoCodec;
 96350            var videoCodec = targetVideoCodecs.Count == 0 ? null : targetVideoCodecs[0];
 96351            if (!string.IsNullOrEmpty(videoCodec))
 352            {
 96353                return GetTargetVideoBitDepth(videoCodec);
 354            }
 355
 0356            return TargetVideoStream?.BitDepth;
 357        }
 358    }
 359
 360    /// <summary>
 361    /// Gets the target reference frames that will be in the output stream.
 362    /// </summary>
 363    /// <value>The target reference frames.</value>
 364    public int? TargetRefFrames
 365    {
 366        get
 367        {
 0368            if (IsDirectStream)
 369            {
 0370                return TargetVideoStream?.RefFrames;
 371            }
 372
 0373            var targetVideoCodecs = TargetVideoCodec;
 0374            var videoCodec = targetVideoCodecs.Count == 0 ? null : targetVideoCodecs[0];
 0375            if (!string.IsNullOrEmpty(videoCodec))
 376            {
 0377                return GetTargetRefFrames(videoCodec);
 378            }
 379
 0380            return TargetVideoStream?.RefFrames;
 381        }
 382    }
 383
 384    /// <summary>
 385    /// Gets the target framerate that will be in the output stream.
 386    /// </summary>
 387    /// <value>The target framerate.</value>
 388    public float? TargetFramerate
 389    {
 390        get
 391        {
 0392            var stream = TargetVideoStream;
 0393            return MaxFramerate.HasValue && !IsDirectStream
 0394                ? MaxFramerate
 0395                : stream?.ReferenceFrameRate;
 396        }
 397    }
 398
 399    /// <summary>
 400    /// Gets the target video level that will be in the output stream.
 401    /// </summary>
 402    /// <value>The target video level.</value>
 403    public double? TargetVideoLevel
 404    {
 405        get
 406        {
 96407            if (IsDirectStream)
 408            {
 0409                return TargetVideoStream?.Level;
 410            }
 411
 96412            var targetVideoCodecs = TargetVideoCodec;
 96413            var videoCodec = targetVideoCodecs.Count == 0 ? null : targetVideoCodecs[0];
 96414            if (!string.IsNullOrEmpty(videoCodec))
 415            {
 96416                return GetTargetVideoLevel(videoCodec);
 417            }
 418
 0419            return TargetVideoStream?.Level;
 420        }
 421    }
 422
 423    /// <summary>
 424    /// Gets the target packet length that will be in the output stream.
 425    /// </summary>
 426    /// <value>The target packet length.</value>
 427    public int? TargetPacketLength
 428    {
 429        get
 430        {
 0431            var stream = TargetVideoStream;
 0432            return !IsDirectStream
 0433                ? null
 0434                : stream?.PacketLength;
 435        }
 436    }
 437
 438    /// <summary>
 439    /// Gets the target video profile that will be in the output stream.
 440    /// </summary>
 441    /// <value>The target video profile.</value>
 442    public string? TargetVideoProfile
 443    {
 444        get
 445        {
 96446            if (IsDirectStream)
 447            {
 0448                return TargetVideoStream?.Profile;
 449            }
 450
 96451            var targetVideoCodecs = TargetVideoCodec;
 96452            var videoCodec = targetVideoCodecs.Count == 0 ? null : targetVideoCodecs[0];
 96453            if (!string.IsNullOrEmpty(videoCodec))
 454            {
 96455                return GetOption(videoCodec, "profile");
 456            }
 457
 0458            return TargetVideoStream?.Profile;
 459        }
 460    }
 461
 462    /// <summary>
 463    /// Gets the target video range type that will be in the output stream.
 464    /// </summary>
 465    /// <value>The video range type.</value>
 466    public VideoRangeType TargetVideoRangeType
 467    {
 468        get
 469        {
 0470            if (IsDirectStream)
 471            {
 0472                return TargetVideoStream?.VideoRangeType ?? VideoRangeType.Unknown;
 473            }
 474
 0475            var targetVideoCodecs = TargetVideoCodec;
 0476            var videoCodec = targetVideoCodecs.Count == 0 ? null : targetVideoCodecs[0];
 0477            if (!string.IsNullOrEmpty(videoCodec)
 0478                && Enum.TryParse(GetOption(videoCodec, "rangetype"), true, out VideoRangeType videoRangeType))
 479            {
 0480                return videoRangeType;
 481            }
 482
 0483            return TargetVideoStream?.VideoRangeType ?? VideoRangeType.Unknown;
 484        }
 485    }
 486
 487    /// <summary>
 488    /// Gets the target video codec tag.
 489    /// </summary>
 490    /// <value>The video codec tag.</value>
 491    public string? TargetVideoCodecTag
 492    {
 493        get
 494        {
 0495            var stream = TargetVideoStream;
 0496            return !IsDirectStream
 0497                ? null
 0498                : stream?.CodecTag;
 499        }
 500    }
 501
 502    /// <summary>
 503    /// Gets the audio bitrate that will be in the output stream.
 504    /// </summary>
 505    /// <value>The audio bitrate.</value>
 506    public int? TargetAudioBitrate
 507    {
 508        get
 509        {
 0510            var stream = TargetAudioStream;
 0511            return AudioBitrate.HasValue && !IsDirectStream
 0512                ? AudioBitrate
 0513                : stream?.BitRate;
 514        }
 515    }
 516
 517    /// <summary>
 518    /// Gets the amount of audio channels that will be in the output stream.
 519    /// </summary>
 520    /// <value>The target audio channels.</value>
 521    public int? TargetAudioChannels
 522    {
 523        get
 524        {
 0525            if (IsDirectStream)
 526            {
 0527                return TargetAudioStream?.Channels;
 528            }
 529
 0530            var targetAudioCodecs = TargetAudioCodec;
 0531            var codec = targetAudioCodecs.Count == 0 ? null : targetAudioCodecs[0];
 0532            if (!string.IsNullOrEmpty(codec))
 533            {
 0534                return GetTargetRefFrames(codec);
 535            }
 536
 0537            return TargetAudioStream?.Channels;
 538        }
 539    }
 540
 541    /// <summary>
 542    /// Gets the audio codec that will be in the output stream.
 543    /// </summary>
 544    /// <value>The audio codec.</value>
 545    public IReadOnlyList<string> TargetAudioCodec
 546    {
 547        get
 548        {
 394549            var stream = TargetAudioStream;
 550
 394551            string? inputCodec = stream?.Codec;
 552
 394553            if (IsDirectStream)
 554            {
 248555                return string.IsNullOrEmpty(inputCodec) ? [] : [inputCodec];
 556            }
 557
 784558            foreach (string codec in AudioCodecs)
 559            {
 286560                if (string.Equals(codec, inputCodec, StringComparison.OrdinalIgnoreCase))
 561                {
 80562                    return string.IsNullOrEmpty(codec) ? [] : [codec];
 563                }
 564            }
 565
 66566            return AudioCodecs;
 80567        }
 568    }
 569
 570    /// <summary>
 571    /// Gets the video codec that will be in the output stream.
 572    /// </summary>
 573    /// <value>The target video codec.</value>
 574    public IReadOnlyList<string> TargetVideoCodec
 575    {
 576        get
 577        {
 728578            var stream = TargetVideoStream;
 579
 728580            string? inputCodec = stream?.Codec;
 581
 728582            if (IsDirectStream)
 583            {
 248584                return string.IsNullOrEmpty(inputCodec) ? [] : [inputCodec];
 585            }
 586
 2280587            foreach (string codec in VideoCodecs)
 588            {
 900589                if (string.Equals(codec, inputCodec, StringComparison.OrdinalIgnoreCase))
 590                {
 480591                    return string.IsNullOrEmpty(codec) ? [] : [codec];
 592                }
 593            }
 594
 0595            return VideoCodecs;
 480596        }
 597    }
 598
 599    /// <summary>
 600    /// Gets the target size of the output stream.
 601    /// </summary>
 602    /// <value>The target size.</value>
 603    public long? TargetSize
 604    {
 605        get
 606        {
 0607            if (IsDirectStream)
 608            {
 0609                return MediaSource?.Size;
 610            }
 611
 0612            if (RunTimeTicks.HasValue)
 613            {
 0614                int? totalBitrate = TargetTotalBitrate;
 615
 0616                double totalSeconds = RunTimeTicks.Value;
 617                // Convert to ms
 0618                totalSeconds /= 10000;
 619                // Convert to seconds
 0620                totalSeconds /= 1000;
 621
 0622                return totalBitrate.HasValue ?
 0623                    Convert.ToInt64(totalBitrate.Value * totalSeconds) :
 0624                    null;
 625            }
 626
 0627            return null;
 628        }
 629    }
 630
 631    /// <summary>
 632    /// Gets the target video bitrate of the output stream.
 633    /// </summary>
 634    /// <value>The video bitrate.</value>
 635    public int? TargetVideoBitrate
 636    {
 637        get
 638        {
 0639            var stream = TargetVideoStream;
 640
 0641            return VideoBitrate.HasValue && !IsDirectStream
 0642                ? VideoBitrate
 0643                : stream?.BitRate;
 644        }
 645    }
 646
 647    /// <summary>
 648    /// Gets the target timestamp of the output stream.
 649    /// </summary>
 650    /// <value>The target timestamp.</value>
 651    public TransportStreamTimestamp TargetTimestamp
 652    {
 653        get
 654        {
 0655            var defaultValue = string.Equals(Container, "m2ts", StringComparison.OrdinalIgnoreCase)
 0656                ? TransportStreamTimestamp.Valid
 0657                : TransportStreamTimestamp.None;
 658
 0659            return !IsDirectStream
 0660                ? defaultValue
 0661                : MediaSource is null ? defaultValue : MediaSource.Timestamp ?? TransportStreamTimestamp.None;
 662        }
 663    }
 664
 665    /// <summary>
 666    /// Gets the target total bitrate of the output stream.
 667    /// </summary>
 668    /// <value>The target total bitrate.</value>
 0669    public int? TargetTotalBitrate => (TargetAudioBitrate ?? 0) + (TargetVideoBitrate ?? 0);
 670
 671    /// <summary>
 672    /// Gets a value indicating whether the output stream is anamorphic.
 673    /// </summary>
 674    public bool? IsTargetAnamorphic
 675    {
 676        get
 677        {
 0678            if (IsDirectStream)
 679            {
 0680                return TargetVideoStream?.IsAnamorphic;
 681            }
 682
 0683            return false;
 684        }
 685    }
 686
 687    /// <summary>
 688    /// Gets a value indicating whether the output stream is interlaced.
 689    /// </summary>
 690    public bool? IsTargetInterlaced
 691    {
 692        get
 693        {
 0694            if (IsDirectStream)
 695            {
 0696                return TargetVideoStream?.IsInterlaced;
 697            }
 698
 0699            var targetVideoCodecs = TargetVideoCodec;
 0700            var videoCodec = targetVideoCodecs.Count == 0 ? null : targetVideoCodecs[0];
 0701            if (!string.IsNullOrEmpty(videoCodec))
 702            {
 0703                if (string.Equals(GetOption(videoCodec, "deinterlace"), "true", StringComparison.OrdinalIgnoreCase))
 704                {
 0705                    return false;
 706                }
 707            }
 708
 0709            return TargetVideoStream?.IsInterlaced;
 710        }
 711    }
 712
 713    /// <summary>
 714    /// Gets a value indicating whether the output stream is AVC.
 715    /// </summary>
 716    public bool? IsTargetAVC
 717    {
 718        get
 719        {
 0720            if (IsDirectStream)
 721            {
 0722                return TargetVideoStream?.IsAVC;
 723            }
 724
 0725            return true;
 726        }
 727    }
 728
 729    /// <summary>
 730    /// Gets the target width of the output stream.
 731    /// </summary>
 732    /// <value>The target width.</value>
 733    public int? TargetWidth
 734    {
 735        get
 736        {
 0737            var videoStream = TargetVideoStream;
 738
 0739            if (videoStream is not null && videoStream.Width.HasValue && videoStream.Height.HasValue)
 740            {
 0741                ImageDimensions size = new ImageDimensions(videoStream.Width.Value, videoStream.Height.Value);
 742
 0743                size = DrawingUtils.Resize(size, 0, 0, MaxWidth ?? 0, MaxHeight ?? 0);
 744
 0745                return size.Width;
 746            }
 747
 0748            return MaxWidth;
 749        }
 750    }
 751
 752    /// <summary>
 753    /// Gets the target height of the output stream.
 754    /// </summary>
 755    /// <value>The target height.</value>
 756    public int? TargetHeight
 757    {
 758        get
 759        {
 0760            var videoStream = TargetVideoStream;
 761
 0762            if (videoStream is not null && videoStream.Width.HasValue && videoStream.Height.HasValue)
 763            {
 0764                ImageDimensions size = new ImageDimensions(videoStream.Width.Value, videoStream.Height.Value);
 765
 0766                size = DrawingUtils.Resize(size, 0, 0, MaxWidth ?? 0, MaxHeight ?? 0);
 767
 0768                return size.Height;
 769            }
 770
 0771            return MaxHeight;
 772        }
 773    }
 774
 775    /// <summary>
 776    /// Gets the target video stream count of the output stream.
 777    /// </summary>
 778    /// <value>The target video stream count.</value>
 779    public int? TargetVideoStreamCount
 780    {
 781        get
 782        {
 0783            if (IsDirectStream)
 784            {
 0785                return GetMediaStreamCount(MediaStreamType.Video, int.MaxValue);
 786            }
 787
 0788            return GetMediaStreamCount(MediaStreamType.Video, 1);
 789        }
 790    }
 791
 792    /// <summary>
 793    /// Gets the target audio stream count of the output stream.
 794    /// </summary>
 795    /// <value>The target audio stream count.</value>
 796    public int? TargetAudioStreamCount
 797    {
 798        get
 799        {
 0800            if (IsDirectStream)
 801            {
 0802                return GetMediaStreamCount(MediaStreamType.Audio, int.MaxValue);
 803            }
 804
 0805            return GetMediaStreamCount(MediaStreamType.Audio, 1);
 806        }
 807    }
 808
 809    /// <summary>
 810    /// Sets a stream option.
 811    /// </summary>
 812    /// <param name="qualifier">The qualifier.</param>
 813    /// <param name="name">The name.</param>
 814    /// <param name="value">The value.</param>
 815    public void SetOption(string? qualifier, string name, string value)
 816    {
 1388817        if (string.IsNullOrEmpty(qualifier))
 818        {
 0819            SetOption(name, value);
 820        }
 821        else
 822        {
 1388823            SetOption(qualifier + "-" + name, value);
 824        }
 1388825    }
 826
 827    /// <summary>
 828    /// Sets a stream option.
 829    /// </summary>
 830    /// <param name="name">The name.</param>
 831    /// <param name="value">The value.</param>
 832    public void SetOption(string name, string value)
 833    {
 1388834        StreamOptions[name] = value;
 1388835    }
 836
 837    /// <summary>
 838    /// Gets a stream option.
 839    /// </summary>
 840    /// <param name="qualifier">The qualifier.</param>
 841    /// <param name="name">The name.</param>
 842    /// <returns>The value.</returns>
 843    public string? GetOption(string? qualifier, string name)
 844    {
 1170845        var value = GetOption(qualifier + "-" + name);
 846
 1170847        if (string.IsNullOrEmpty(value))
 848        {
 722849            value = GetOption(name);
 850        }
 851
 1170852        return value;
 853    }
 854
 855    /// <summary>
 856    /// Gets a stream option.
 857    /// </summary>
 858    /// <param name="name">The name.</param>
 859    /// <returns>The value.</returns>
 860    public string? GetOption(string name)
 861    {
 1892862        if (StreamOptions.TryGetValue(name, out var value))
 863        {
 448864            return value;
 865        }
 866
 1444867        return null;
 868    }
 869
 870    /// <summary>
 871    /// Returns this output stream URL for this class.
 872    /// </summary>
 873    /// <param name="baseUrl">The base Url.</param>
 874    /// <param name="accessToken">The access Token.</param>
 875    /// <param name="query">Optional extra query.</param>
 876    /// <returns>A querystring representation of this object.</returns>
 877    public string ToUrl(string? baseUrl, string? accessToken, string? query)
 878    {
 100559879        var sb = new StringBuilder();
 100559880        if (!string.IsNullOrEmpty(baseUrl))
 881        {
 100559882            sb.Append(baseUrl.TrimEnd('/'));
 883        }
 884
 100559885        if (MediaType == DlnaProfileType.Audio)
 886        {
 100001887            sb.Append("/audio/");
 888        }
 889        else
 890        {
 558891            sb.Append("/videos/");
 892        }
 893
 100559894        sb.Append(ItemId);
 895
 100559896        if (SubProtocol == MediaStreamProtocol.hls)
 897        {
 264898            sb.Append("/master.m3u8?");
 899        }
 900        else
 901        {
 100295902            sb.Append("/stream");
 903
 100295904            if (!string.IsNullOrEmpty(Container))
 905            {
 100276906                sb.Append('.');
 100276907                sb.Append(Container);
 908            }
 909
 100295910            sb.Append('?');
 911        }
 912
 100559913        if (!string.IsNullOrEmpty(DeviceProfileId))
 914        {
 100000915            sb.Append("&DeviceProfileId=");
 100000916            sb.Append(DeviceProfileId);
 917        }
 918
 100559919        if (!string.IsNullOrEmpty(DeviceId))
 920        {
 100278921            sb.Append("&DeviceId=");
 100278922            sb.Append(DeviceId);
 923        }
 924
 100559925        if (!string.IsNullOrEmpty(MediaSourceId))
 926        {
 556927            sb.Append("&MediaSourceId=");
 556928            sb.Append(MediaSourceId);
 929        }
 930
 931        // default true so don't store.
 100559932        if (IsDirectStream)
 933        {
 100248934            sb.Append("&Static=true");
 935        }
 936
 100559937        if (VideoCodecs.Count != 0)
 938        {
 540939            sb.Append("&VideoCodec=");
 540940            sb.AppendJoin(',', VideoCodecs);
 941        }
 942
 100559943        if (AudioCodecs.Count != 0)
 944        {
 540945            sb.Append("&AudioCodec=");
 540946            sb.AppendJoin(',', AudioCodecs);
 947        }
 948
 100559949        if (AudioStreamIndex.HasValue)
 950        {
 554951            sb.Append("&AudioStreamIndex=");
 554952            sb.Append(AudioStreamIndex.Value.ToString(CultureInfo.InvariantCulture));
 953        }
 954
 100559955        if (SubtitleStreamIndex.HasValue && (AlwaysBurnInSubtitleWhenTranscoding || SubtitleDeliveryMethod != SubtitleDe
 956        {
 16957            sb.Append("&SubtitleStreamIndex=");
 16958            sb.Append(SubtitleStreamIndex.Value.ToString(CultureInfo.InvariantCulture));
 959        }
 960
 100559961        if (VideoBitrate.HasValue)
 962        {
 292963            sb.Append("&VideoBitrate=");
 292964            sb.Append(VideoBitrate.Value.ToString(CultureInfo.InvariantCulture));
 965        }
 966
 100559967        if (AudioBitrate.HasValue)
 968        {
 292969            sb.Append("&AudioBitrate=");
 292970            sb.Append(AudioBitrate.Value.ToString(CultureInfo.InvariantCulture));
 971        }
 972
 100559973        if (AudioSampleRate.HasValue)
 974        {
 110975            sb.Append("&AudioSampleRate=");
 110976            sb.Append(AudioSampleRate.Value.ToString(CultureInfo.InvariantCulture));
 977        }
 978
 100559979        if (MaxFramerate.HasValue)
 980        {
 290981            sb.Append("&MaxFramerate=");
 290982            sb.Append(MaxFramerate.Value.ToString(CultureInfo.InvariantCulture));
 983        }
 984
 100559985        if (MaxWidth.HasValue)
 986        {
 8987            sb.Append("&MaxWidth=");
 8988            sb.Append(MaxWidth.Value.ToString(CultureInfo.InvariantCulture));
 989        }
 990
 100559991        if (MaxHeight.HasValue)
 992        {
 0993            sb.Append("&MaxHeight=");
 0994            sb.Append(MaxHeight.Value.ToString(CultureInfo.InvariantCulture));
 995        }
 996
 100559997        if (SubProtocol == MediaStreamProtocol.hls)
 998        {
 264999            if (!string.IsNullOrEmpty(Container))
 1000            {
 2641001                sb.Append("&SegmentContainer=");
 2641002                sb.Append(Container);
 1003            }
 1004
 2641005            if (SegmentLength.HasValue)
 1006            {
 01007                sb.Append("&SegmentLength=");
 01008                sb.Append(SegmentLength.Value.ToString(CultureInfo.InvariantCulture));
 1009            }
 1010
 2641011            if (MinSegments.HasValue)
 1012            {
 2041013                sb.Append("&MinSegments=");
 2041014                sb.Append(MinSegments.Value.ToString(CultureInfo.InvariantCulture));
 1015            }
 1016        }
 1017        else
 1018        {
 1002951019            if (StartPositionTicks != 0)
 1020            {
 1000001021                sb.Append("&StartTimeTicks=");
 1000001022                sb.Append(StartPositionTicks.ToString(CultureInfo.InvariantCulture));
 1023            }
 1024        }
 1025
 1005591026        if (!string.IsNullOrEmpty(PlaySessionId))
 1027        {
 1000001028            sb.Append("&PlaySessionId=");
 1000001029            sb.Append(PlaySessionId);
 1030        }
 1031
 1005591032        if (!string.IsNullOrEmpty(accessToken))
 1033        {
 1005591034            sb.Append("&ApiKey=");
 1005591035            sb.Append(accessToken);
 1036        }
 1037
 1005591038        var liveStreamId = MediaSource?.LiveStreamId;
 1005591039        if (!string.IsNullOrEmpty(liveStreamId))
 1040        {
 01041            sb.Append("&LiveStreamId=");
 01042            sb.Append(liveStreamId);
 1043        }
 1044
 1005591045        if (!IsDirectStream)
 1046        {
 3111047            if (RequireNonAnamorphic)
 1048            {
 01049                sb.Append("&RequireNonAnamorphic=");
 01050                sb.Append(RequireNonAnamorphic.ToString(CultureInfo.InvariantCulture));
 1051            }
 1052
 3111053            if (TranscodingMaxAudioChannels.HasValue)
 1054            {
 2661055                sb.Append("&TranscodingMaxAudioChannels=");
 2661056                sb.Append(TranscodingMaxAudioChannels.Value.ToString(CultureInfo.InvariantCulture));
 1057            }
 1058
 3111059            if (EnableSubtitlesInManifest)
 1060            {
 01061                sb.Append("&EnableSubtitlesInManifest=");
 01062                sb.Append(EnableSubtitlesInManifest.ToString(CultureInfo.InvariantCulture));
 1063            }
 1064
 3111065            if (EnableMpegtsM2TsMode)
 1066            {
 01067                sb.Append("&EnableMpegtsM2TsMode=");
 01068                sb.Append(EnableMpegtsM2TsMode.ToString(CultureInfo.InvariantCulture));
 1069            }
 1070
 3111071            if (EstimateContentLength)
 1072            {
 01073                sb.Append("&EstimateContentLength=");
 01074                sb.Append(EstimateContentLength.ToString(CultureInfo.InvariantCulture));
 1075            }
 1076
 3111077            if (TranscodeSeekInfo != TranscodeSeekInfo.Auto)
 1078            {
 01079                sb.Append("&TranscodeSeekInfo=");
 01080                sb.Append(TranscodeSeekInfo.ToString());
 1081            }
 1082
 3111083            if (CopyTimestamps)
 1084            {
 241085                sb.Append("&CopyTimestamps=");
 241086                sb.Append(CopyTimestamps.ToString(CultureInfo.InvariantCulture));
 1087            }
 1088
 3111089            sb.Append("&RequireAvc=");
 3111090            sb.Append(RequireAvc.ToString(CultureInfo.InvariantCulture).ToLowerInvariant());
 1091
 3111092            sb.Append("&EnableAudioVbrEncoding=");
 3111093            sb.Append(EnableAudioVbrEncoding.ToString(CultureInfo.InvariantCulture).ToLowerInvariant());
 1094        }
 1095
 1005591096        var etag = MediaSource?.ETag;
 1005591097        if (!string.IsNullOrEmpty(etag))
 1098        {
 5561099            sb.Append("&Tag=");
 5561100            sb.Append(etag);
 1101        }
 1102
 1005591103        if (SubtitleStreamIndex.HasValue && SubtitleDeliveryMethod != SubtitleDeliveryMethod.External)
 1104        {
 521105            sb.Append("&SubtitleMethod=");
 521106            sb.Append(SubtitleDeliveryMethod);
 1107        }
 1108
 1005591109        if (SubtitleStreamIndex.HasValue && SubtitleDeliveryMethod == SubtitleDeliveryMethod.Embed && SubtitleCodecs.Cou
 1110        {
 01111            sb.Append("&SubtitleCodec=");
 01112            sb.AppendJoin(',', SubtitleCodecs);
 1113        }
 1114
 2060301115        foreach (var pair in StreamOptions)
 1116        {
 1117            // Strip spaces to avoid having to encode h264 profile names
 24561118            sb.Append('&');
 24561119            sb.Append(pair.Key);
 24561120            sb.Append('=');
 24561121            sb.Append(pair.Value.Replace(" ", string.Empty, StringComparison.Ordinal));
 1122        }
 1123
 1005591124        var transcodeReasonsValues = TranscodeReasons.GetUniqueFlags().ToArray();
 1005591125        if (!IsDirectStream && transcodeReasonsValues.Length > 0)
 1126        {
 3081127            sb.Append("&TranscodeReasons=");
 3081128            sb.AppendJoin(',', transcodeReasonsValues);
 1129        }
 1130
 1005591131        if (!string.IsNullOrEmpty(query))
 1132        {
 01133            sb.Append(query);
 1134        }
 1135
 1005591136        return sb.ToString();
 1137    }
 1138
 1139    /// <summary>
 1140    /// Gets the subtitle profiles.
 1141    /// </summary>
 1142    /// <param name="transcoderSupport">The transcoder support.</param>
 1143    /// <param name="includeSelectedTrackOnly">If only the selected track should be included.</param>
 1144    /// <param name="baseUrl">The base URL.</param>
 1145    /// <param name="accessToken">The access token.</param>
 1146    /// <returns>The <see cref="SubtitleStreamInfo"/> of the profiles.</returns>
 1147    public IEnumerable<SubtitleStreamInfo> GetSubtitleProfiles(ITranscoderSupport transcoderSupport, bool includeSelecte
 1148    {
 01149        return GetSubtitleProfiles(transcoderSupport, includeSelectedTrackOnly, false, baseUrl, accessToken);
 1150    }
 1151
 1152    /// <summary>
 1153    /// Gets the subtitle profiles.
 1154    /// </summary>
 1155    /// <param name="transcoderSupport">The transcoder support.</param>
 1156    /// <param name="includeSelectedTrackOnly">If only the selected track should be included.</param>
 1157    /// <param name="enableAllProfiles">If all profiles are enabled.</param>
 1158    /// <param name="baseUrl">The base URL.</param>
 1159    /// <param name="accessToken">The access token.</param>
 1160    /// <returns>The <see cref="SubtitleStreamInfo"/> of the profiles.</returns>
 1161    public IEnumerable<SubtitleStreamInfo> GetSubtitleProfiles(ITranscoderSupport transcoderSupport, bool includeSelecte
 1162    {
 01163        if (MediaSource is null)
 1164        {
 01165            return [];
 1166        }
 1167
 01168        List<SubtitleStreamInfo> list = [];
 1169
 1170        // HLS will preserve timestamps so we can just grab the full subtitle stream
 01171        long startPositionTicks = SubProtocol == MediaStreamProtocol.hls
 01172            ? 0
 01173            : (PlayMethod == PlayMethod.Transcode && !CopyTimestamps ? StartPositionTicks : 0);
 1174
 1175        // First add the selected track
 01176        if (SubtitleStreamIndex.HasValue)
 1177        {
 01178            foreach (var stream in MediaSource.MediaStreams)
 1179            {
 01180                if (stream.Type == MediaStreamType.Subtitle && stream.Index == SubtitleStreamIndex.Value)
 1181                {
 01182                    AddSubtitleProfiles(list, stream, transcoderSupport, enableAllProfiles, baseUrl, accessToken, startP
 1183                }
 1184            }
 1185        }
 1186
 01187        if (!includeSelectedTrackOnly)
 1188        {
 01189            foreach (var stream in MediaSource.MediaStreams)
 1190            {
 01191                if (stream.Type == MediaStreamType.Subtitle && (!SubtitleStreamIndex.HasValue || stream.Index != Subtitl
 1192                {
 01193                    AddSubtitleProfiles(list, stream, transcoderSupport, enableAllProfiles, baseUrl, accessToken, startP
 1194                }
 1195            }
 1196        }
 1197
 01198        return list;
 1199    }
 1200
 1201    private void AddSubtitleProfiles(List<SubtitleStreamInfo> list, MediaStream stream, ITranscoderSupport transcoderSup
 1202    {
 01203        if (enableAllProfiles)
 1204        {
 01205            foreach (var profile in DeviceProfile.SubtitleProfiles)
 1206            {
 01207                var info = GetSubtitleStreamInfo(stream, baseUrl, accessToken, startPositionTicks, new[] { profile }, tr
 01208                if (info is not null)
 1209                {
 01210                    list.Add(info);
 1211                }
 1212            }
 1213        }
 1214        else
 1215        {
 01216            var info = GetSubtitleStreamInfo(stream, baseUrl, accessToken, startPositionTicks, DeviceProfile.SubtitlePro
 01217            if (info is not null)
 1218            {
 01219                list.Add(info);
 1220            }
 1221        }
 01222    }
 1223
 1224    private SubtitleStreamInfo? GetSubtitleStreamInfo(MediaStream stream, string baseUrl, string? accessToken, long star
 1225    {
 01226        if (MediaSource is null)
 1227        {
 01228            return null;
 1229        }
 1230
 01231        var subtitleProfile = StreamBuilder.GetSubtitleProfile(MediaSource, stream, subtitleProfiles, PlayMethod, transc
 01232        var info = new SubtitleStreamInfo
 01233        {
 01234            IsForced = stream.IsForced,
 01235            Language = stream.Language,
 01236            Name = stream.Language ?? "Unknown",
 01237            Format = subtitleProfile.Format,
 01238            Index = stream.Index,
 01239            DeliveryMethod = subtitleProfile.Method,
 01240            DisplayTitle = stream.DisplayTitle
 01241        };
 1242
 01243        if (info.DeliveryMethod == SubtitleDeliveryMethod.External)
 1244        {
 1245            // Default to using the API URL
 01246            info.Url = string.Format(
 01247                CultureInfo.InvariantCulture,
 01248                "{0}/Videos/{1}/{2}/Subtitles/{3}/{4}/Stream.{5}",
 01249                baseUrl,
 01250                ItemId,
 01251                MediaSourceId,
 01252                stream.Index.ToString(CultureInfo.InvariantCulture),
 01253                startPositionTicks.ToString(CultureInfo.InvariantCulture),
 01254                subtitleProfile.Format);
 01255            info.IsExternalUrl = false;
 1256
 1257            // Check conditions for potentially using the direct path
 01258            if (stream.IsExternal // Must be external
 01259                && stream.SupportsExternalStream
 01260                && string.Equals(stream.Codec, subtitleProfile.Format, StringComparison.OrdinalIgnoreCase) // Format mus
 01261                && !string.IsNullOrEmpty(stream.Path) // Path must exist
 01262                && Uri.TryCreate(stream.Path, UriKind.Absolute, out Uri? uriResult) // Path must be an absolute URI
 01263                && (uriResult.Scheme == Uri.UriSchemeHttp || uriResult.Scheme == Uri.UriSchemeHttps)) // Scheme must be 
 1264            {
 1265                // All conditions met, override with the direct path
 01266                info.Url = stream.Path;
 01267                info.IsExternalUrl = true;
 1268            }
 1269
 1270            // Append ApiKey only if we are using the API URL
 01271            if (!info.IsExternalUrl && !string.IsNullOrEmpty(accessToken))
 1272            {
 1273                // Use "?ApiKey=" as seen in HEAD and other parts of the code
 01274                info.Url += "?ApiKey=" + accessToken;
 1275            }
 1276        }
 1277
 01278        return info;
 1279    }
 1280
 1281    /// <summary>
 1282    /// Gets the target video bit depth.
 1283    /// </summary>
 1284    /// <param name="codec">The codec.</param>
 1285    /// <returns>The target video bit depth.</returns>
 1286    public int? GetTargetVideoBitDepth(string? codec)
 1287    {
 961288        var value = GetOption(codec, "videobitdepth");
 1289
 961290        if (int.TryParse(value, CultureInfo.InvariantCulture, out var result))
 1291        {
 961292            return result;
 1293        }
 1294
 01295        return null;
 1296    }
 1297
 1298    /// <summary>
 1299    /// Gets the target audio bit depth.
 1300    /// </summary>
 1301    /// <param name="codec">The codec.</param>
 1302    /// <returns>The target audio bit depth.</returns>
 1303    public int? GetTargetAudioBitDepth(string? codec)
 1304    {
 01305        var value = GetOption(codec, "audiobitdepth");
 1306
 01307        if (int.TryParse(value, CultureInfo.InvariantCulture, out var result))
 1308        {
 01309            return result;
 1310        }
 1311
 01312        return null;
 1313    }
 1314
 1315    /// <summary>
 1316    /// Gets the target video level.
 1317    /// </summary>
 1318    /// <param name="codec">The codec.</param>
 1319    /// <returns>The target video level.</returns>
 1320    public double? GetTargetVideoLevel(string? codec)
 1321    {
 3081322        var value = GetOption(codec, "level");
 1323
 3081324        if (double.TryParse(value, CultureInfo.InvariantCulture, out var result))
 1325        {
 1701326            return result;
 1327        }
 1328
 1381329        return null;
 1330    }
 1331
 1332    /// <summary>
 1333    /// Gets the target reference frames.
 1334    /// </summary>
 1335    /// <param name="codec">The codec.</param>
 1336    /// <returns>The target reference frames.</returns>
 1337    public int? GetTargetRefFrames(string? codec)
 1338    {
 21339        var value = GetOption(codec, "maxrefframes");
 1340
 21341        if (int.TryParse(value, CultureInfo.InvariantCulture, out var result))
 1342        {
 01343            return result;
 1344        }
 1345
 21346        return null;
 1347    }
 1348
 1349    /// <summary>
 1350    /// Gets the target audio channels.
 1351    /// </summary>
 1352    /// <param name="codec">The codec.</param>
 1353    /// <returns>The target audio channels.</returns>
 1354    public int? GetTargetAudioChannels(string? codec)
 1355    {
 1741356        var defaultValue = GlobalMaxAudioChannels ?? TranscodingMaxAudioChannels;
 1357
 1741358        var value = GetOption(codec, "audiochannels");
 1741359        if (string.IsNullOrEmpty(value))
 1360        {
 1741361            return defaultValue;
 1362        }
 1363
 01364        if (int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var result))
 1365        {
 01366            return Math.Min(result, defaultValue ?? result);
 1367        }
 1368
 01369        return defaultValue;
 1370    }
 1371
 1372    /// <summary>
 1373    /// Gets the media stream count.
 1374    /// </summary>
 1375    /// <param name="type">The type.</param>
 1376    /// <param name="limit">The limit.</param>
 1377    /// <returns>The media stream count.</returns>
 1378    private int? GetMediaStreamCount(MediaStreamType type, int limit)
 1379    {
 01380        var count = MediaSource?.GetStreamCount(type);
 1381
 01382        if (count.HasValue)
 1383        {
 01384            count = Math.Min(count.Value, limit);
 1385        }
 1386
 01387        return count;
 1388    }
 1389}

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)