Cuetools.Converter.exe: support for --decoder-option parameter.

Implemented "Stream" option in BDLPCM Reader to make it possible to select
the right stream in m2ts file.
This commit is contained in:
Grigory Chudov
2018-02-10 17:33:22 -05:00
parent 0e624d610d
commit 8cedc982a6
25 changed files with 179 additions and 33 deletions

View File

@@ -0,0 +1,39 @@
using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
namespace CUETools.Codecs
{
public class AudioDecoderSettings
{
public AudioDecoderSettings()
{
// Iterate through each property and call ResetValue()
foreach (PropertyDescriptor property in TypeDescriptor.GetProperties(this))
property.ResetValue(this);
}
public AudioDecoderSettings Clone()
{
return this.MemberwiseClone() as AudioDecoderSettings;
}
public bool HasBrowsableAttributes()
{
bool hasBrowsable = false;
foreach (PropertyDescriptor property in TypeDescriptor.GetProperties(this))
{
bool isBrowsable = true;
foreach (var attribute in property.Attributes)
{
var browsable = attribute as BrowsableAttribute;
isBrowsable &= browsable == null || browsable.Browsable;
}
hasBrowsable |= isBrowsable;
}
return hasBrowsable;
}
}
}