added ChannelLayout
This commit is contained in:
parent
b07193e1bc
commit
4786ad704a
|
@ -74,6 +74,12 @@ namespace MediaBrowser.Common.MediaInfo
|
||||||
/// <value>The channels.</value>
|
/// <value>The channels.</value>
|
||||||
public int channels { get; set; }
|
public int channels { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the channel_layout.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The channel_layout.</value>
|
||||||
|
public string channel_layout { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the avg_frame_rate.
|
/// Gets or sets the avg_frame_rate.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -24,6 +24,12 @@ namespace MediaBrowser.Model.Entities
|
||||||
/// <value>The type of the scan.</value>
|
/// <value>The type of the scan.</value>
|
||||||
public string ScanType { get; set; }
|
public string ScanType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the channel layout.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The channel layout.</value>
|
||||||
|
public string ChannelLayout { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the bit rate.
|
/// Gets or sets the bit rate.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using MediaBrowser.Common.MediaInfo;
|
using System.Linq;
|
||||||
|
using MediaBrowser.Common.MediaInfo;
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.MediaInfo;
|
using MediaBrowser.Controller.MediaInfo;
|
||||||
|
@ -201,6 +202,8 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||||
{
|
{
|
||||||
stream.SampleRate = int.Parse(streamInfo.sample_rate, UsCulture);
|
stream.SampleRate = int.Parse(streamInfo.sample_rate, UsCulture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stream.ChannelLayout = ParseChannelLayout(streamInfo.channel_layout);
|
||||||
}
|
}
|
||||||
else if (string.Equals(streamInfo.codec_type, "subtitle", StringComparison.OrdinalIgnoreCase))
|
else if (string.Equals(streamInfo.codec_type, "subtitle", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
|
@ -249,6 +252,16 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||||
return stream;
|
return stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string ParseChannelLayout(string input)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(input))
|
||||||
|
{
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
|
||||||
|
return input.Split('(').FirstOrDefault();
|
||||||
|
}
|
||||||
|
|
||||||
private string GetAspectRatio(MediaStreamInfo info)
|
private string GetAspectRatio(MediaStreamInfo info)
|
||||||
{
|
{
|
||||||
var original = info.display_aspect_ratio;
|
var original = info.display_aspect_ratio;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user