MediaStream.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719
  1. #nullable disable
  2. #pragma warning disable CS1591
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Globalization;
  6. using System.Linq;
  7. using System.Text;
  8. using Jellyfin.Extensions;
  9. using MediaBrowser.Model.Dlna;
  10. using MediaBrowser.Model.Extensions;
  11. using MediaBrowser.Model.MediaInfo;
  12. namespace MediaBrowser.Model.Entities
  13. {
  14. /// <summary>
  15. /// Class MediaStream.
  16. /// </summary>
  17. public class MediaStream
  18. {
  19. private static readonly string[] _specialCodes =
  20. {
  21. // Uncoded languages.
  22. "mis",
  23. // Multiple languages.
  24. "mul",
  25. // Undetermined.
  26. "und",
  27. // No linguistic content; not applicable.
  28. "zxx"
  29. };
  30. /// <summary>
  31. /// Gets or sets the codec.
  32. /// </summary>
  33. /// <value>The codec.</value>
  34. public string Codec { get; set; }
  35. /// <summary>
  36. /// Gets or sets the codec tag.
  37. /// </summary>
  38. /// <value>The codec tag.</value>
  39. public string CodecTag { get; set; }
  40. /// <summary>
  41. /// Gets or sets the language.
  42. /// </summary>
  43. /// <value>The language.</value>
  44. public string Language { get; set; }
  45. /// <summary>
  46. /// Gets or sets the color range.
  47. /// </summary>
  48. /// <value>The color range.</value>
  49. public string ColorRange { get; set; }
  50. /// <summary>
  51. /// Gets or sets the color space.
  52. /// </summary>
  53. /// <value>The color space.</value>
  54. public string ColorSpace { get; set; }
  55. /// <summary>
  56. /// Gets or sets the color transfer.
  57. /// </summary>
  58. /// <value>The color transfer.</value>
  59. public string ColorTransfer { get; set; }
  60. /// <summary>
  61. /// Gets or sets the color primaries.
  62. /// </summary>
  63. /// <value>The color primaries.</value>
  64. public string ColorPrimaries { get; set; }
  65. /// <summary>
  66. /// Gets or sets the Dolby Vision version major.
  67. /// </summary>
  68. /// <value>The Dolby Vision version major.</value>
  69. public int? DvVersionMajor { get; set; }
  70. /// <summary>
  71. /// Gets or sets the Dolby Vision version minor.
  72. /// </summary>
  73. /// <value>The Dolby Vision version minor.</value>
  74. public int? DvVersionMinor { get; set; }
  75. /// <summary>
  76. /// Gets or sets the Dolby Vision profile.
  77. /// </summary>
  78. /// <value>The Dolby Vision profile.</value>
  79. public int? DvProfile { get; set; }
  80. /// <summary>
  81. /// Gets or sets the Dolby Vision level.
  82. /// </summary>
  83. /// <value>The Dolby Vision level.</value>
  84. public int? DvLevel { get; set; }
  85. /// <summary>
  86. /// Gets or sets the Dolby Vision rpu present flag.
  87. /// </summary>
  88. /// <value>The Dolby Vision rpu present flag.</value>
  89. public int? RpuPresentFlag { get; set; }
  90. /// <summary>
  91. /// Gets or sets the Dolby Vision el present flag.
  92. /// </summary>
  93. /// <value>The Dolby Vision el present flag.</value>
  94. public int? ElPresentFlag { get; set; }
  95. /// <summary>
  96. /// Gets or sets the Dolby Vision bl present flag.
  97. /// </summary>
  98. /// <value>The Dolby Vision bl present flag.</value>
  99. public int? BlPresentFlag { get; set; }
  100. /// <summary>
  101. /// Gets or sets the Dolby Vision bl signal compatibility id.
  102. /// </summary>
  103. /// <value>The Dolby Vision bl signal compatibility id.</value>
  104. public int? DvBlSignalCompatibilityId { get; set; }
  105. /// <summary>
  106. /// Gets or sets the comment.
  107. /// </summary>
  108. /// <value>The comment.</value>
  109. public string Comment { get; set; }
  110. /// <summary>
  111. /// Gets or sets the time base.
  112. /// </summary>
  113. /// <value>The time base.</value>
  114. public string TimeBase { get; set; }
  115. /// <summary>
  116. /// Gets or sets the codec time base.
  117. /// </summary>
  118. /// <value>The codec time base.</value>
  119. public string CodecTimeBase { get; set; }
  120. /// <summary>
  121. /// Gets or sets the title.
  122. /// </summary>
  123. /// <value>The title.</value>
  124. public string Title { get; set; }
  125. /// <summary>
  126. /// Gets the video range.
  127. /// </summary>
  128. /// <value>The video range.</value>
  129. public string VideoRange
  130. {
  131. get
  132. {
  133. var (videoRange, _) = GetVideoColorRange();
  134. return videoRange;
  135. }
  136. }
  137. /// <summary>
  138. /// Gets the video range type.
  139. /// </summary>
  140. /// <value>The video range type.</value>
  141. public string VideoRangeType
  142. {
  143. get
  144. {
  145. var (_, videoRangeType) = GetVideoColorRange();
  146. return videoRangeType;
  147. }
  148. }
  149. /// <summary>
  150. /// Gets the video dovi title.
  151. /// </summary>
  152. /// <value>The video dovi title.</value>
  153. public string VideoDoViTitle
  154. {
  155. get
  156. {
  157. var dvProfile = DvProfile;
  158. var rpuPresentFlag = RpuPresentFlag == 1;
  159. var blPresentFlag = BlPresentFlag == 1;
  160. var dvBlCompatId = DvBlSignalCompatibilityId;
  161. if (rpuPresentFlag
  162. && blPresentFlag
  163. && (dvProfile == 4
  164. || dvProfile == 5
  165. || dvProfile == 7
  166. || dvProfile == 8
  167. || dvProfile == 9))
  168. {
  169. var title = "DV Profile " + dvProfile;
  170. if (dvBlCompatId > 0)
  171. {
  172. title += "." + dvBlCompatId;
  173. }
  174. return dvBlCompatId switch
  175. {
  176. 1 => title + " (HDR10)",
  177. 2 => title + " (SDR)",
  178. 4 => title + " (HLG)",
  179. _ => title
  180. };
  181. }
  182. return null;
  183. }
  184. }
  185. public string LocalizedUndefined { get; set; }
  186. public string LocalizedDefault { get; set; }
  187. public string LocalizedForced { get; set; }
  188. public string LocalizedExternal { get; set; }
  189. public string LocalizedHearingImpaired { get; set; }
  190. public string DisplayTitle
  191. {
  192. get
  193. {
  194. switch (Type)
  195. {
  196. case MediaStreamType.Audio:
  197. {
  198. var attributes = new List<string>();
  199. // Do not display the language code in display titles if unset or set to a special code. Show it in all other cases (possibly expanded).
  200. if (!string.IsNullOrEmpty(Language) && !_specialCodes.Contains(Language, StringComparison.OrdinalIgnoreCase))
  201. {
  202. // Get full language string i.e. eng -> English. Will not work for some languages which use ISO 639-2/B instead of /T codes.
  203. string fullLanguage = CultureInfo
  204. .GetCultures(CultureTypes.NeutralCultures)
  205. .FirstOrDefault(r => r.ThreeLetterISOLanguageName.Equals(Language, StringComparison.OrdinalIgnoreCase))
  206. ?.DisplayName;
  207. attributes.Add(StringHelper.FirstToUpper(fullLanguage ?? Language));
  208. }
  209. if (!string.IsNullOrEmpty(Codec) && !string.Equals(Codec, "dca", StringComparison.OrdinalIgnoreCase) && !string.Equals(Codec, "dts", StringComparison.OrdinalIgnoreCase))
  210. {
  211. attributes.Add(AudioCodec.GetFriendlyName(Codec));
  212. }
  213. else if (!string.IsNullOrEmpty(Profile) && !string.Equals(Profile, "lc", StringComparison.OrdinalIgnoreCase))
  214. {
  215. attributes.Add(Profile);
  216. }
  217. if (!string.IsNullOrEmpty(ChannelLayout))
  218. {
  219. attributes.Add(StringHelper.FirstToUpper(ChannelLayout));
  220. }
  221. else if (Channels.HasValue)
  222. {
  223. attributes.Add(Channels.Value.ToString(CultureInfo.InvariantCulture) + " ch");
  224. }
  225. if (IsDefault)
  226. {
  227. attributes.Add(string.IsNullOrEmpty(LocalizedDefault) ? "Default" : LocalizedDefault);
  228. }
  229. if (IsExternal)
  230. {
  231. attributes.Add(string.IsNullOrEmpty(LocalizedExternal) ? "External" : LocalizedExternal);
  232. }
  233. if (!string.IsNullOrEmpty(Title))
  234. {
  235. var result = new StringBuilder(Title);
  236. foreach (var tag in attributes)
  237. {
  238. // Keep Tags that are not already in Title.
  239. if (!Title.Contains(tag, StringComparison.OrdinalIgnoreCase))
  240. {
  241. result.Append(" - ").Append(tag);
  242. }
  243. }
  244. return result.ToString();
  245. }
  246. return string.Join(" - ", attributes);
  247. }
  248. case MediaStreamType.Video:
  249. {
  250. var attributes = new List<string>();
  251. var resolutionText = GetResolutionText();
  252. if (!string.IsNullOrEmpty(resolutionText))
  253. {
  254. attributes.Add(resolutionText);
  255. }
  256. if (!string.IsNullOrEmpty(Codec))
  257. {
  258. attributes.Add(Codec.ToUpperInvariant());
  259. }
  260. if (!string.IsNullOrEmpty(VideoRange))
  261. {
  262. attributes.Add(VideoRange.ToUpperInvariant());
  263. }
  264. if (!string.IsNullOrEmpty(Title))
  265. {
  266. var result = new StringBuilder(Title);
  267. foreach (var tag in attributes)
  268. {
  269. // Keep Tags that are not already in Title.
  270. if (!Title.Contains(tag, StringComparison.OrdinalIgnoreCase))
  271. {
  272. result.Append(" - ").Append(tag);
  273. }
  274. }
  275. return result.ToString();
  276. }
  277. return string.Join(' ', attributes);
  278. }
  279. case MediaStreamType.Subtitle:
  280. {
  281. var attributes = new List<string>();
  282. if (!string.IsNullOrEmpty(Language))
  283. {
  284. // Get full language string i.e. eng -> English. Will not work for some languages which use ISO 639-2/B instead of /T codes.
  285. string fullLanguage = CultureInfo
  286. .GetCultures(CultureTypes.NeutralCultures)
  287. .FirstOrDefault(r => r.ThreeLetterISOLanguageName.Equals(Language, StringComparison.OrdinalIgnoreCase))
  288. ?.DisplayName;
  289. attributes.Add(StringHelper.FirstToUpper(fullLanguage ?? Language));
  290. }
  291. else
  292. {
  293. attributes.Add(string.IsNullOrEmpty(LocalizedUndefined) ? "Und" : LocalizedUndefined);
  294. }
  295. if (IsHearingImpaired)
  296. {
  297. attributes.Add(string.IsNullOrEmpty(LocalizedHearingImpaired) ? "Hearing Impaired" : LocalizedHearingImpaired);
  298. }
  299. if (IsDefault)
  300. {
  301. attributes.Add(string.IsNullOrEmpty(LocalizedDefault) ? "Default" : LocalizedDefault);
  302. }
  303. if (IsForced)
  304. {
  305. attributes.Add(string.IsNullOrEmpty(LocalizedForced) ? "Forced" : LocalizedForced);
  306. }
  307. if (!string.IsNullOrEmpty(Codec))
  308. {
  309. attributes.Add(Codec.ToUpperInvariant());
  310. }
  311. if (IsExternal)
  312. {
  313. attributes.Add(string.IsNullOrEmpty(LocalizedExternal) ? "External" : LocalizedExternal);
  314. }
  315. if (!string.IsNullOrEmpty(Title))
  316. {
  317. var result = new StringBuilder(Title);
  318. foreach (var tag in attributes)
  319. {
  320. // Keep Tags that are not already in Title.
  321. if (!Title.Contains(tag, StringComparison.OrdinalIgnoreCase))
  322. {
  323. result.Append(" - ").Append(tag);
  324. }
  325. }
  326. return result.ToString();
  327. }
  328. return string.Join(" - ", attributes);
  329. }
  330. default:
  331. return null;
  332. }
  333. }
  334. }
  335. public string NalLengthSize { get; set; }
  336. /// <summary>
  337. /// Gets or sets a value indicating whether this instance is interlaced.
  338. /// </summary>
  339. /// <value><c>true</c> if this instance is interlaced; otherwise, <c>false</c>.</value>
  340. public bool IsInterlaced { get; set; }
  341. public bool? IsAVC { get; set; }
  342. /// <summary>
  343. /// Gets or sets the channel layout.
  344. /// </summary>
  345. /// <value>The channel layout.</value>
  346. public string ChannelLayout { get; set; }
  347. /// <summary>
  348. /// Gets or sets the bit rate.
  349. /// </summary>
  350. /// <value>The bit rate.</value>
  351. public int? BitRate { get; set; }
  352. /// <summary>
  353. /// Gets or sets the bit depth.
  354. /// </summary>
  355. /// <value>The bit depth.</value>
  356. public int? BitDepth { get; set; }
  357. /// <summary>
  358. /// Gets or sets the reference frames.
  359. /// </summary>
  360. /// <value>The reference frames.</value>
  361. public int? RefFrames { get; set; }
  362. /// <summary>
  363. /// Gets or sets the length of the packet.
  364. /// </summary>
  365. /// <value>The length of the packet.</value>
  366. public int? PacketLength { get; set; }
  367. /// <summary>
  368. /// Gets or sets the channels.
  369. /// </summary>
  370. /// <value>The channels.</value>
  371. public int? Channels { get; set; }
  372. /// <summary>
  373. /// Gets or sets the sample rate.
  374. /// </summary>
  375. /// <value>The sample rate.</value>
  376. public int? SampleRate { get; set; }
  377. /// <summary>
  378. /// Gets or sets a value indicating whether this instance is default.
  379. /// </summary>
  380. /// <value><c>true</c> if this instance is default; otherwise, <c>false</c>.</value>
  381. public bool IsDefault { get; set; }
  382. /// <summary>
  383. /// Gets or sets a value indicating whether this instance is forced.
  384. /// </summary>
  385. /// <value><c>true</c> if this instance is forced; otherwise, <c>false</c>.</value>
  386. public bool IsForced { get; set; }
  387. /// <summary>
  388. /// Gets or sets a value indicating whether this instance is for the hearing impaired.
  389. /// </summary>
  390. /// <value><c>true</c> if this instance is for the hearing impaired; otherwise, <c>false</c>.</value>
  391. public bool IsHearingImpaired { get; set; }
  392. /// <summary>
  393. /// Gets or sets the height.
  394. /// </summary>
  395. /// <value>The height.</value>
  396. public int? Height { get; set; }
  397. /// <summary>
  398. /// Gets or sets the width.
  399. /// </summary>
  400. /// <value>The width.</value>
  401. public int? Width { get; set; }
  402. /// <summary>
  403. /// Gets or sets the average frame rate.
  404. /// </summary>
  405. /// <value>The average frame rate.</value>
  406. public float? AverageFrameRate { get; set; }
  407. /// <summary>
  408. /// Gets or sets the real frame rate.
  409. /// </summary>
  410. /// <value>The real frame rate.</value>
  411. public float? RealFrameRate { get; set; }
  412. /// <summary>
  413. /// Gets or sets the profile.
  414. /// </summary>
  415. /// <value>The profile.</value>
  416. public string Profile { get; set; }
  417. /// <summary>
  418. /// Gets or sets the type.
  419. /// </summary>
  420. /// <value>The type.</value>
  421. public MediaStreamType Type { get; set; }
  422. /// <summary>
  423. /// Gets or sets the aspect ratio.
  424. /// </summary>
  425. /// <value>The aspect ratio.</value>
  426. public string AspectRatio { get; set; }
  427. /// <summary>
  428. /// Gets or sets the index.
  429. /// </summary>
  430. /// <value>The index.</value>
  431. public int Index { get; set; }
  432. /// <summary>
  433. /// Gets or sets the score.
  434. /// </summary>
  435. /// <value>The score.</value>
  436. public int? Score { get; set; }
  437. /// <summary>
  438. /// Gets or sets a value indicating whether this instance is external.
  439. /// </summary>
  440. /// <value><c>true</c> if this instance is external; otherwise, <c>false</c>.</value>
  441. public bool IsExternal { get; set; }
  442. /// <summary>
  443. /// Gets or sets the method.
  444. /// </summary>
  445. /// <value>The method.</value>
  446. public SubtitleDeliveryMethod? DeliveryMethod { get; set; }
  447. /// <summary>
  448. /// Gets or sets the delivery URL.
  449. /// </summary>
  450. /// <value>The delivery URL.</value>
  451. public string DeliveryUrl { get; set; }
  452. /// <summary>
  453. /// Gets or sets a value indicating whether this instance is external URL.
  454. /// </summary>
  455. /// <value><c>null</c> if [is external URL] contains no value, <c>true</c> if [is external URL]; otherwise, <c>false</c>.</value>
  456. public bool? IsExternalUrl { get; set; }
  457. public bool IsTextSubtitleStream
  458. {
  459. get
  460. {
  461. if (Type != MediaStreamType.Subtitle)
  462. {
  463. return false;
  464. }
  465. if (string.IsNullOrEmpty(Codec) && !IsExternal)
  466. {
  467. return false;
  468. }
  469. return IsTextFormat(Codec);
  470. }
  471. }
  472. /// <summary>
  473. /// Gets or sets a value indicating whether [supports external stream].
  474. /// </summary>
  475. /// <value><c>true</c> if [supports external stream]; otherwise, <c>false</c>.</value>
  476. public bool SupportsExternalStream { get; set; }
  477. /// <summary>
  478. /// Gets or sets the filename.
  479. /// </summary>
  480. /// <value>The filename.</value>
  481. public string Path { get; set; }
  482. /// <summary>
  483. /// Gets or sets the pixel format.
  484. /// </summary>
  485. /// <value>The pixel format.</value>
  486. public string PixelFormat { get; set; }
  487. /// <summary>
  488. /// Gets or sets the level.
  489. /// </summary>
  490. /// <value>The level.</value>
  491. public double? Level { get; set; }
  492. /// <summary>
  493. /// Gets or sets whether this instance is anamorphic.
  494. /// </summary>
  495. /// <value><c>true</c> if this instance is anamorphic; otherwise, <c>false</c>.</value>
  496. public bool? IsAnamorphic { get; set; }
  497. internal string GetResolutionText()
  498. {
  499. if (!Width.HasValue || !Height.HasValue)
  500. {
  501. return null;
  502. }
  503. return Width switch
  504. {
  505. // 256x144 (16:9 square pixel format)
  506. <= 256 when Height <= 144 => IsInterlaced ? "144i" : "144p",
  507. // 426x240 (16:9 square pixel format)
  508. <= 426 when Height <= 240 => IsInterlaced ? "240i" : "240p",
  509. // 640x360 (16:9 square pixel format)
  510. <= 640 when Height <= 360 => IsInterlaced ? "360i" : "360p",
  511. // 682x384 (16:9 square pixel format)
  512. <= 682 when Height <= 384 => IsInterlaced ? "384i" : "384p",
  513. // 720x404 (16:9 square pixel format)
  514. <= 720 when Height <= 404 => IsInterlaced ? "404i" : "404p",
  515. // 854x480 (16:9 square pixel format)
  516. <= 854 when Height <= 480 => IsInterlaced ? "480i" : "480p",
  517. // 960x544 (16:9 square pixel format)
  518. <= 960 when Height <= 544 => IsInterlaced ? "540i" : "540p",
  519. // 1024x576 (16:9 square pixel format)
  520. <= 1024 when Height <= 576 => IsInterlaced ? "576i" : "576p",
  521. // 1280x720
  522. <= 1280 when Height <= 962 => IsInterlaced ? "720i" : "720p",
  523. // 2560x1080 (FHD ultra wide 21:9) using 1440px width to accommodate WQHD
  524. <= 2560 when Height <= 1440 => IsInterlaced ? "1080i" : "1080p",
  525. // 4K
  526. <= 4096 when Height <= 3072 => "4K",
  527. // 8K
  528. <= 8192 when Height <= 6144 => "8K",
  529. _ => null
  530. };
  531. }
  532. public static bool IsTextFormat(string format)
  533. {
  534. string codec = format ?? string.Empty;
  535. // sub = external .sub file
  536. return !codec.Contains("pgs", StringComparison.OrdinalIgnoreCase) &&
  537. !codec.Contains("dvd", StringComparison.OrdinalIgnoreCase) &&
  538. !codec.Contains("dvbsub", StringComparison.OrdinalIgnoreCase) &&
  539. !string.Equals(codec, "sub", StringComparison.OrdinalIgnoreCase) &&
  540. !string.Equals(codec, "dvb_subtitle", StringComparison.OrdinalIgnoreCase);
  541. }
  542. public bool SupportsSubtitleConversionTo(string toCodec)
  543. {
  544. if (!IsTextSubtitleStream)
  545. {
  546. return false;
  547. }
  548. var fromCodec = Codec;
  549. // Can't convert from this
  550. if (string.Equals(fromCodec, "ass", StringComparison.OrdinalIgnoreCase))
  551. {
  552. return false;
  553. }
  554. if (string.Equals(fromCodec, "ssa", StringComparison.OrdinalIgnoreCase))
  555. {
  556. return false;
  557. }
  558. // Can't convert to this
  559. if (string.Equals(toCodec, "ass", StringComparison.OrdinalIgnoreCase))
  560. {
  561. return false;
  562. }
  563. if (string.Equals(toCodec, "ssa", StringComparison.OrdinalIgnoreCase))
  564. {
  565. return false;
  566. }
  567. return true;
  568. }
  569. public (string VideoRange, string VideoRangeType) GetVideoColorRange()
  570. {
  571. if (Type != MediaStreamType.Video)
  572. {
  573. return (null, null);
  574. }
  575. var colorTransfer = ColorTransfer;
  576. if (string.Equals(colorTransfer, "smpte2084", StringComparison.OrdinalIgnoreCase))
  577. {
  578. return ("HDR", "HDR10");
  579. }
  580. if (string.Equals(colorTransfer, "arib-std-b67", StringComparison.OrdinalIgnoreCase))
  581. {
  582. return ("HDR", "HLG");
  583. }
  584. var codecTag = CodecTag;
  585. var dvProfile = DvProfile;
  586. var rpuPresentFlag = RpuPresentFlag == 1;
  587. var blPresentFlag = BlPresentFlag == 1;
  588. var dvBlCompatId = DvBlSignalCompatibilityId;
  589. var isDoViHDRProfile = dvProfile == 5 || dvProfile == 7 || dvProfile == 8;
  590. var isDoViHDRFlag = rpuPresentFlag && blPresentFlag && (dvBlCompatId == 0 || dvBlCompatId == 1 || dvBlCompatId == 4);
  591. if ((isDoViHDRProfile && isDoViHDRFlag)
  592. || string.Equals(codecTag, "dovi", StringComparison.OrdinalIgnoreCase)
  593. || string.Equals(codecTag, "dvh1", StringComparison.OrdinalIgnoreCase)
  594. || string.Equals(codecTag, "dvhe", StringComparison.OrdinalIgnoreCase)
  595. || string.Equals(codecTag, "dav1", StringComparison.OrdinalIgnoreCase))
  596. {
  597. return ("HDR", "DOVI");
  598. }
  599. return ("SDR", "SDR");
  600. }
  601. }
  602. }