Преглед на файлове

Add color transfer to ffprobe results

MrTimscampi преди 5 години
родител
ревизия
428e1b04fc
променени са 2 файла, в които са добавени 12 реда и са изтрити 0 реда
  1. 7 0
      MediaBrowser.MediaEncoding/Probing/MediaStreamInfo.cs
  2. 5 0
      MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs

+ 7 - 0
MediaBrowser.MediaEncoding/Probing/MediaStreamInfo.cs

@@ -278,5 +278,12 @@ namespace MediaBrowser.MediaEncoding.Probing
         /// <value>The disposition.</value>
         [JsonPropertyName("disposition")]
         public IReadOnlyDictionary<string, int> Disposition { get; set; }
+
+        /// <summary>
+        /// Gets or sets the color transfer.
+        /// </summary>
+        /// <value>The color transfer.</value>
+        [JsonPropertyName("color_transfer")]
+        public string ColorTransfer { get; set; }
     }
 }

+ 5 - 0
MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs

@@ -695,6 +695,11 @@ namespace MediaBrowser.MediaEncoding.Probing
                 {
                     stream.RefFrames = streamInfo.Refs;
                 }
+
+                if (!string.IsNullOrEmpty(streamInfo.ColorTransfer))
+                {
+                    stream.ColorTransfer = streamInfo.ColorTransfer;
+                }
             }
             else
             {