소스 검색

Add color primaries to ffprobe output

MrTimscampi 5 년 전
부모
커밋
2e18142bb3
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

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

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

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