aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.MediaEncoding/Probing
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.MediaEncoding/Probing')
-rw-r--r--MediaBrowser.MediaEncoding/Probing/MediaStreamInfo.cs7
-rw-r--r--MediaBrowser.MediaEncoding/Probing/MediaStreamInfoSideData.cs74
-rw-r--r--MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs35
3 files changed, 115 insertions, 1 deletions
diff --git a/MediaBrowser.MediaEncoding/Probing/MediaStreamInfo.cs b/MediaBrowser.MediaEncoding/Probing/MediaStreamInfo.cs
index c9c8c34c2..eab8f79bb 100644
--- a/MediaBrowser.MediaEncoding/Probing/MediaStreamInfo.cs
+++ b/MediaBrowser.MediaEncoding/Probing/MediaStreamInfo.cs
@@ -310,5 +310,12 @@ namespace MediaBrowser.MediaEncoding.Probing
/// <value>The color primaries.</value>
[JsonPropertyName("color_primaries")]
public string ColorPrimaries { get; set; }
+
+ /// <summary>
+ /// Gets or sets the side_data_list.
+ /// </summary>
+ /// <value>The side_data_list.</value>
+ [JsonPropertyName("side_data_list")]
+ public IReadOnlyList<MediaStreamInfoSideData> SideDataList { get; set; }
}
}
diff --git a/MediaBrowser.MediaEncoding/Probing/MediaStreamInfoSideData.cs b/MediaBrowser.MediaEncoding/Probing/MediaStreamInfoSideData.cs
new file mode 100644
index 000000000..095757bef
--- /dev/null
+++ b/MediaBrowser.MediaEncoding/Probing/MediaStreamInfoSideData.cs
@@ -0,0 +1,74 @@
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace MediaBrowser.MediaEncoding.Probing
+{
+ /// <summary>
+ /// Class MediaStreamInfoSideData.
+ /// </summary>
+ public class MediaStreamInfoSideData
+ {
+ /// <summary>
+ /// Gets or sets the SideDataType.
+ /// </summary>
+ /// <value>The SideDataType.</value>
+ [JsonPropertyName("side_data_type")]
+ public string? SideDataType { get; set; }
+
+ /// <summary>
+ /// Gets or sets the DvVersionMajor.
+ /// </summary>
+ /// <value>The DvVersionMajor.</value>
+ [JsonPropertyName("dv_version_major")]
+ public int? DvVersionMajor { get; set; }
+
+ /// <summary>
+ /// Gets or sets the DvVersionMinor.
+ /// </summary>
+ /// <value>The DvVersionMinor.</value>
+ [JsonPropertyName("dv_version_minor")]
+ public int? DvVersionMinor { get; set; }
+
+ /// <summary>
+ /// Gets or sets the DvProfile.
+ /// </summary>
+ /// <value>The DvProfile.</value>
+ [JsonPropertyName("dv_profile")]
+ public int? DvProfile { get; set; }
+
+ /// <summary>
+ /// Gets or sets the DvLevel.
+ /// </summary>
+ /// <value>The DvLevel.</value>
+ [JsonPropertyName("dv_level")]
+ public int? DvLevel { get; set; }
+
+ /// <summary>
+ /// Gets or sets the RpuPresentFlag.
+ /// </summary>
+ /// <value>The RpuPresentFlag.</value>
+ [JsonPropertyName("rpu_present_flag")]
+ public int? RpuPresentFlag { get; set; }
+
+ /// <summary>
+ /// Gets or sets the ElPresentFlag.
+ /// </summary>
+ /// <value>The ElPresentFlag.</value>
+ [JsonPropertyName("el_present_flag")]
+ public int? ElPresentFlag { get; set; }
+
+ /// <summary>
+ /// Gets or sets the BlPresentFlag.
+ /// </summary>
+ /// <value>The BlPresentFlag.</value>
+ [JsonPropertyName("bl_present_flag")]
+ public int? BlPresentFlag { get; set; }
+
+ /// <summary>
+ /// Gets or sets the DvBlSignalCompatibilityId.
+ /// </summary>
+ /// <value>The DvBlSignalCompatibilityId.</value>
+ [JsonPropertyName("dv_bl_signal_compatibility_id")]
+ public int? DvBlSignalCompatibilityId { get; set; }
+ }
+}
diff --git a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
index 3f78d0d42..6cae7f558 100644
--- a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
+++ b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
@@ -44,16 +44,28 @@ namespace MediaBrowser.MediaEncoding.Probing
private IReadOnlyList<string> SplitWhitelist => _splitWhiteList ??= new string[]
{
"AC/DC",
+ "A/T/O/S",
"As/Hi Soundworks",
"Au/Ra",
"Bremer/McCoy",
+ "b/bqスタヂオ",
+ "DOV/S",
+ "DJ'TEKINA//SOMETHING",
+ "IX/ON",
+ "J-CORE SLi//CER",
+ "M(a/u)SH",
+ "Kaoru/Brilliance",
+ "signum/ii",
+ "Richiter(LORB/DUGEM DI BARAT)",
"이달의 소녀 1/3",
"R!N / Gemie",
"LOONA 1/3",
"LOONA / yyxy",
"LOONA / ODD EYE CIRCLE",
"K/DA",
- "22/7"
+ "22/7",
+ "諭吉佳作/men",
+ "//dARTH nULL"
};
public MediaInfo GetMediaInfo(InternalMediaInfoResult data, VideoType? videoType, bool isAudio, string path, MediaProtocol protocol)
@@ -841,6 +853,27 @@ namespace MediaBrowser.MediaEncoding.Probing
{
stream.ColorPrimaries = streamInfo.ColorPrimaries;
}
+
+ if (streamInfo.SideDataList != null)
+ {
+ foreach (var data in streamInfo.SideDataList)
+ {
+ // Parse Dolby Vision metadata from side_data
+ if (string.Equals(data.SideDataType, "DOVI configuration record", StringComparison.OrdinalIgnoreCase))
+ {
+ stream.DvVersionMajor = data.DvVersionMajor;
+ stream.DvVersionMinor = data.DvVersionMinor;
+ stream.DvProfile = data.DvProfile;
+ stream.DvLevel = data.DvLevel;
+ stream.RpuPresentFlag = data.RpuPresentFlag;
+ stream.ElPresentFlag = data.ElPresentFlag;
+ stream.BlPresentFlag = data.BlPresentFlag;
+ stream.DvBlSignalCompatibilityId = data.DvBlSignalCompatibilityId;
+
+ break;
+ }
+ }
+ }
}
else
{