mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-24 09:44:47 +03:00
Detect audio spatial format (#9996)
* Detect audio spatial format * Update MediaBrowser.Model/Entities/MediaStream.cs * Update MediaStream.cs --------- Co-authored-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -214,6 +215,27 @@ namespace MediaBrowser.Model.Entities
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the audio spatial format.
|
||||
/// </summary>
|
||||
/// <value>The audio spatial format.</value>
|
||||
[DefaultValue(AudioSpatialFormat.None)]
|
||||
public AudioSpatialFormat AudioSpatialFormat
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Type != MediaStreamType.Audio || string.IsNullOrEmpty(Profile))
|
||||
{
|
||||
return AudioSpatialFormat.None;
|
||||
}
|
||||
|
||||
return
|
||||
Profile.Contains("Dolby Atmos", StringComparison.OrdinalIgnoreCase) ? AudioSpatialFormat.DolbyAtmos :
|
||||
Profile.Contains("DTS:X", StringComparison.OrdinalIgnoreCase) ? AudioSpatialFormat.DTSX :
|
||||
AudioSpatialFormat.None;
|
||||
}
|
||||
}
|
||||
|
||||
public string LocalizedUndefined { get; set; }
|
||||
|
||||
public string LocalizedDefault { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user