mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
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:
39
CUETools.Codecs/AudioDecoderSettings.cs
Normal file
39
CUETools.Codecs/AudioDecoderSettings.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,8 @@ namespace CUETools.Codecs
|
||||
private bool own;
|
||||
private ThreadPriority priority;
|
||||
|
||||
public AudioDecoderSettings Settings { get { return null; } }
|
||||
|
||||
public long Position
|
||||
{
|
||||
get
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="AudioBuffer.cs" />
|
||||
<Compile Include="AudioDecoderClass.cs" />
|
||||
<Compile Include="AudioDecoderSettings.cs" />
|
||||
<Compile Include="AudioEncoderSettings.cs" />
|
||||
<Compile Include="AudioPCMConfig.cs" />
|
||||
<Compile Include="AudioPipe.cs" />
|
||||
|
||||
@@ -72,6 +72,7 @@ namespace CUETools.Codecs
|
||||
formats.Add("wv", new CUEToolsFormat("wv", CUEToolsTagger.TagLibSharp, true, false, true, true, encoders.GetDefault("wv", true), null, decoders.GetDefault("wv", true)));
|
||||
formats.Add("ape", new CUEToolsFormat("ape", CUEToolsTagger.TagLibSharp, true, false, true, true, encoders.GetDefault("ape", true), null, decoders.GetDefault("ape", true)));
|
||||
formats.Add("tta", new CUEToolsFormat("tta", CUEToolsTagger.APEv2, true, false, false, true, encoders.GetDefault("tta", true), null, decoders.GetDefault("tta", true)));
|
||||
formats.Add("m2ts", new CUEToolsFormat("m2ts", CUEToolsTagger.APEv2, true, false, false, true, null, null, decoders.GetDefault("m2ts", true)));
|
||||
formats.Add("wav", new CUEToolsFormat("wav", CUEToolsTagger.TagLibSharp, true, false, false, true, encoders.GetDefault("wav", true), null, decoders.GetDefault("wav", true)));
|
||||
formats.Add("m4a", new CUEToolsFormat("m4a", CUEToolsTagger.TagLibSharp, true, true, false, true, encoders.GetDefault("m4a", true), encoders.GetDefault("m4a", false), decoders.GetDefault("m4a", true)));
|
||||
formats.Add("tak", new CUEToolsFormat("tak", CUEToolsTagger.APEv2, true, false, true, true, encoders.GetDefault("tak", true), null, decoders.GetDefault("tak", true)));
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
{
|
||||
public interface IAudioSource
|
||||
{
|
||||
AudioDecoderSettings Settings { get; }
|
||||
|
||||
AudioPCMConfig PCM { get; }
|
||||
string Path { get; }
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
private AudioPCMConfig pcm;
|
||||
private int _sampleVal;
|
||||
|
||||
public AudioDecoderSettings Settings { get { return null; } }
|
||||
|
||||
public long Length
|
||||
{
|
||||
get { return _sampleCount; }
|
||||
|
||||
@@ -10,6 +10,8 @@ namespace CUETools.Codecs
|
||||
Process _decoderProcess;
|
||||
WAVReader rdr;
|
||||
|
||||
public AudioDecoderSettings Settings { get { return null; } }
|
||||
|
||||
public long Position
|
||||
{
|
||||
get
|
||||
|
||||
@@ -14,6 +14,8 @@ namespace CUETools.Codecs
|
||||
bool _largeFile;
|
||||
string _path;
|
||||
|
||||
public AudioDecoderSettings Settings { get { return null; } }
|
||||
|
||||
public long Position
|
||||
{
|
||||
get
|
||||
|
||||
Reference in New Issue
Block a user