mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
Code cleanup: some lowlevel codec infrastructure moved
from CUETools.Processor to CUETools.Codecs
This commit is contained in:
@@ -74,6 +74,10 @@
|
|||||||
<Compile Include="CRC\CRC16CCITT.cs" />
|
<Compile Include="CRC\CRC16CCITT.cs" />
|
||||||
<Compile Include="CRC\CRC32.cs" />
|
<Compile Include="CRC\CRC32.cs" />
|
||||||
<Compile Include="CRC\CRC8.cs" />
|
<Compile Include="CRC\CRC8.cs" />
|
||||||
|
<Compile Include="CUEToolsFormat.cs" />
|
||||||
|
<Compile Include="CUEToolsTagger.cs" />
|
||||||
|
<Compile Include="CUEToolsUDC.cs" />
|
||||||
|
<Compile Include="CUEToolsUDCList.cs" />
|
||||||
<Compile Include="CyclicBuffer.cs" />
|
<Compile Include="CyclicBuffer.cs" />
|
||||||
<Compile Include="CyclicBufferInputStream.cs" />
|
<Compile Include="CyclicBufferInputStream.cs" />
|
||||||
<Compile Include="CyclicBufferOutputStream.cs" />
|
<Compile Include="CyclicBufferOutputStream.cs" />
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace CUETools.Processor
|
namespace CUETools.Codecs
|
||||||
{
|
{
|
||||||
public class CUEToolsFormat
|
public class CUEToolsFormat
|
||||||
{
|
{
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace CUETools.Processor
|
namespace CUETools.Codecs
|
||||||
{
|
{
|
||||||
public enum CUEToolsTagger
|
public enum CUEToolsTagger
|
||||||
{
|
{
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
using CUETools.Codecs;
|
|
||||||
|
|
||||||
namespace CUETools.Processor
|
namespace CUETools.Codecs
|
||||||
{
|
{
|
||||||
public class CUEToolsUDC : INotifyPropertyChanged
|
public class CUEToolsUDC : INotifyPropertyChanged
|
||||||
{
|
{
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace CUETools.Processor
|
namespace CUETools.Codecs
|
||||||
{
|
{
|
||||||
public class CUEToolsUDCList : BindingList<CUEToolsUDC>
|
public class CUEToolsUDCList : BindingList<CUEToolsUDC>
|
||||||
{
|
{
|
||||||
@@ -15,12 +15,13 @@ namespace CUETools.Converter
|
|||||||
Console.Error.WriteLine();
|
Console.Error.WriteLine();
|
||||||
Console.Error.WriteLine("Options:");
|
Console.Error.WriteLine("Options:");
|
||||||
Console.Error.WriteLine();
|
Console.Error.WriteLine();
|
||||||
Console.Error.WriteLine(" --decoder <name> Use non-default decoder.");
|
Console.Error.WriteLine(" --decoder <name> Use non-default decoder.");
|
||||||
Console.Error.WriteLine(" --encoder <name> Use non-default encoder.");
|
Console.Error.WriteLine(" --encoder <name> Use non-default encoder.");
|
||||||
Console.Error.WriteLine(" --lossy Use lossy encoder/mode.");
|
Console.Error.WriteLine(" --encoder-format <ext> Use encoder format different from file extension.");
|
||||||
Console.Error.WriteLine(" --lossless Use lossless encoder/mode (default).");
|
Console.Error.WriteLine(" --lossy Use lossy encoder/mode.");
|
||||||
Console.Error.WriteLine(" -p # Padding bytes.");
|
Console.Error.WriteLine(" --lossless Use lossless encoder/mode (default).");
|
||||||
Console.Error.WriteLine(" -m <mode> Encoder mode (0..8 for flac, V0..V9 for mp3, etc)");
|
Console.Error.WriteLine(" -p # Padding bytes.");
|
||||||
|
Console.Error.WriteLine(" -m <mode> Encoder mode (0..8 for flac, V0..V9 for mp3, etc)");
|
||||||
Console.Error.WriteLine();
|
Console.Error.WriteLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,7 +108,7 @@ namespace CUETools.Converter
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Console.Error.WriteLine("CUETools.Converter, Copyright (C) 2009-13 Grigory Chudov.");
|
Console.Error.WriteLine("CUETools.Converter, Copyright (C) 2009-2013 Grigory Chudov.");
|
||||||
Console.Error.WriteLine("This is free software under the GNU GPLv3+ license; There is NO WARRANTY, to");
|
Console.Error.WriteLine("This is free software under the GNU GPLv3+ license; There is NO WARRANTY, to");
|
||||||
Console.Error.WriteLine("the extent permitted by law. <http://www.gnu.org/licenses/> for details.");
|
Console.Error.WriteLine("the extent permitted by law. <http://www.gnu.org/licenses/> for details.");
|
||||||
if (!ok || sourceFile == null || destFile == null)
|
if (!ok || sourceFile == null || destFile == null)
|
||||||
@@ -126,8 +127,6 @@ namespace CUETools.Converter
|
|||||||
TimeSpan lastPrint = TimeSpan.FromMilliseconds(0);
|
TimeSpan lastPrint = TimeSpan.FromMilliseconds(0);
|
||||||
CUEConfig config = new CUEConfig();
|
CUEConfig config = new CUEConfig();
|
||||||
|
|
||||||
SettingsReader sr = new SettingsReader("CUE Tools", "settings.txt", null);
|
|
||||||
config.Load(sr);
|
|
||||||
#if !DEBUG
|
#if !DEBUG
|
||||||
try
|
try
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ namespace CUETools.FlakeExe
|
|||||||
|
|
||||||
if (!quiet)
|
if (!quiet)
|
||||||
{
|
{
|
||||||
Console.WriteLine("CUETools.Flake, Copyright (C) 2009 Grigory Chudov.");
|
Console.WriteLine("CUETools.Flake, Copyright (C) 2009-2013 Grigory Chudov.");
|
||||||
Console.WriteLine("Based on Flake encoder by Justin Ruggles, <http://flake-enc.sourceforge.net/>.");
|
Console.WriteLine("Based on Flake encoder by Justin Ruggles, <http://flake-enc.sourceforge.net/>.");
|
||||||
Console.WriteLine("This is free software under the GNU GPLv3+ license; There is NO WARRANTY, to");
|
Console.WriteLine("This is free software under the GNU GPLv3+ license; There is NO WARRANTY, to");
|
||||||
Console.WriteLine("the extent permitted by law. <http://www.gnu.org/licenses/> for details.");
|
Console.WriteLine("the extent permitted by law. <http://www.gnu.org/licenses/> for details.");
|
||||||
|
|||||||
@@ -82,7 +82,6 @@
|
|||||||
<Compile Include="CUESheet.cs" />
|
<Compile Include="CUESheet.cs" />
|
||||||
<Compile Include="CUESheetAudio.cs" />
|
<Compile Include="CUESheetAudio.cs" />
|
||||||
<Compile Include="CUEStyle.cs" />
|
<Compile Include="CUEStyle.cs" />
|
||||||
<Compile Include="CUEToolsFormat.cs" />
|
|
||||||
<Compile Include="CUEToolsLocalDB.cs" />
|
<Compile Include="CUEToolsLocalDB.cs" />
|
||||||
<Compile Include="CUEToolsLocalDBEntry.cs" />
|
<Compile Include="CUEToolsLocalDBEntry.cs" />
|
||||||
<Compile Include="CUEToolsProfile.cs" />
|
<Compile Include="CUEToolsProfile.cs" />
|
||||||
@@ -90,9 +89,6 @@
|
|||||||
<Compile Include="CUEToolsScript.cs" />
|
<Compile Include="CUEToolsScript.cs" />
|
||||||
<Compile Include="CUEToolsSelectionEventArgs.cs" />
|
<Compile Include="CUEToolsSelectionEventArgs.cs" />
|
||||||
<Compile Include="CUEToolsSourceFile.cs" />
|
<Compile Include="CUEToolsSourceFile.cs" />
|
||||||
<Compile Include="CUEToolsTagger.cs" />
|
|
||||||
<Compile Include="CUEToolsUDC.cs" />
|
|
||||||
<Compile Include="CUEToolsUDCList.cs" />
|
|
||||||
<Compile Include="CUEToolsVerifyTask.cs" />
|
<Compile Include="CUEToolsVerifyTask.cs" />
|
||||||
<Compile Include="CUETrackMetadata.cs" />
|
<Compile Include="CUETrackMetadata.cs" />
|
||||||
<Compile Include="FileGroupInfo.cs" />
|
<Compile Include="FileGroupInfo.cs" />
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using TagLib.Asf;
|
using TagLib.Asf;
|
||||||
|
using CUETools.Codecs;
|
||||||
|
|
||||||
namespace CUETools.Processor
|
namespace CUETools.Processor
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using TagLib;
|
using TagLib;
|
||||||
|
using CUETools.Codecs;
|
||||||
|
|
||||||
namespace TagLib.UserDefined {
|
namespace TagLib.UserDefined {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -46,7 +47,7 @@ namespace TagLib.UserDefined {
|
|||||||
{
|
{
|
||||||
#region Private Fields
|
#region Private Fields
|
||||||
|
|
||||||
private CUETools.Processor.CUEToolsTagger tagger;
|
private CUEToolsTagger tagger;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -71,17 +72,17 @@ namespace TagLib.UserDefined {
|
|||||||
/// <exception cref="ArgumentNullException">
|
/// <exception cref="ArgumentNullException">
|
||||||
/// <paramref name="path" /> is <see langword="null" />.
|
/// <paramref name="path" /> is <see langword="null" />.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public File (string path, ReadStyle propertiesStyle, CUETools.Processor.CUEToolsTagger _tagger)
|
public File (string path, ReadStyle propertiesStyle, CUEToolsTagger _tagger)
|
||||||
: base (path, propertiesStyle)
|
: base (path, propertiesStyle)
|
||||||
{
|
{
|
||||||
tagger = _tagger;
|
tagger = _tagger;
|
||||||
// Make sure we have a tag.
|
// Make sure we have a tag.
|
||||||
switch (tagger)
|
switch (tagger)
|
||||||
{
|
{
|
||||||
case CUETools.Processor.CUEToolsTagger.APEv2:
|
case CUEToolsTagger.APEv2:
|
||||||
GetTag(TagTypes.Ape, true);
|
GetTag(TagTypes.Ape, true);
|
||||||
break;
|
break;
|
||||||
case CUETools.Processor.CUEToolsTagger.ID3v2:
|
case CUEToolsTagger.ID3v2:
|
||||||
GetTag(TagTypes.Id3v2, true);
|
GetTag(TagTypes.Id3v2, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -99,17 +100,17 @@ namespace TagLib.UserDefined {
|
|||||||
/// <exception cref="ArgumentNullException">
|
/// <exception cref="ArgumentNullException">
|
||||||
/// <paramref name="path" /> is <see langword="null" />.
|
/// <paramref name="path" /> is <see langword="null" />.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public File(string path, CUETools.Processor.CUEToolsTagger _tagger)
|
public File(string path, CUEToolsTagger _tagger)
|
||||||
: base(path)
|
: base(path)
|
||||||
{
|
{
|
||||||
tagger = _tagger;
|
tagger = _tagger;
|
||||||
// Make sure we have a tag.
|
// Make sure we have a tag.
|
||||||
switch (tagger)
|
switch (tagger)
|
||||||
{
|
{
|
||||||
case CUETools.Processor.CUEToolsTagger.APEv2:
|
case CUEToolsTagger.APEv2:
|
||||||
GetTag(TagTypes.Ape, true);
|
GetTag(TagTypes.Ape, true);
|
||||||
break;
|
break;
|
||||||
case CUETools.Processor.CUEToolsTagger.ID3v2:
|
case CUEToolsTagger.ID3v2:
|
||||||
GetTag(TagTypes.Id3v2, true);
|
GetTag(TagTypes.Id3v2, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -134,17 +135,17 @@ namespace TagLib.UserDefined {
|
|||||||
/// />.
|
/// />.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public File (File.IFileAbstraction abstraction,
|
public File (File.IFileAbstraction abstraction,
|
||||||
ReadStyle propertiesStyle, CUETools.Processor.CUEToolsTagger _tagger)
|
ReadStyle propertiesStyle, CUEToolsTagger _tagger)
|
||||||
: base (abstraction, propertiesStyle)
|
: base (abstraction, propertiesStyle)
|
||||||
{
|
{
|
||||||
tagger = _tagger;
|
tagger = _tagger;
|
||||||
// Make sure we have a tag.
|
// Make sure we have a tag.
|
||||||
switch (tagger)
|
switch (tagger)
|
||||||
{
|
{
|
||||||
case CUETools.Processor.CUEToolsTagger.APEv2:
|
case CUEToolsTagger.APEv2:
|
||||||
GetTag(TagTypes.Ape, true);
|
GetTag(TagTypes.Ape, true);
|
||||||
break;
|
break;
|
||||||
case CUETools.Processor.CUEToolsTagger.ID3v2:
|
case CUEToolsTagger.ID3v2:
|
||||||
GetTag(TagTypes.Id3v2, true);
|
GetTag(TagTypes.Id3v2, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -163,17 +164,17 @@ namespace TagLib.UserDefined {
|
|||||||
/// <paramref name="abstraction" /> is <see langword="null"
|
/// <paramref name="abstraction" /> is <see langword="null"
|
||||||
/// />.
|
/// />.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public File(File.IFileAbstraction abstraction, CUETools.Processor.CUEToolsTagger _tagger)
|
public File(File.IFileAbstraction abstraction, CUEToolsTagger _tagger)
|
||||||
: base (abstraction)
|
: base (abstraction)
|
||||||
{
|
{
|
||||||
tagger = _tagger;
|
tagger = _tagger;
|
||||||
// Make sure we have a tag.
|
// Make sure we have a tag.
|
||||||
switch (tagger)
|
switch (tagger)
|
||||||
{
|
{
|
||||||
case CUETools.Processor.CUEToolsTagger.APEv2:
|
case CUEToolsTagger.APEv2:
|
||||||
GetTag(TagTypes.Ape, true);
|
GetTag(TagTypes.Ape, true);
|
||||||
break;
|
break;
|
||||||
case CUETools.Processor.CUEToolsTagger.ID3v2:
|
case CUEToolsTagger.ID3v2:
|
||||||
GetTag(TagTypes.Id3v2, true);
|
GetTag(TagTypes.Id3v2, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -185,7 +186,7 @@ namespace TagLib.UserDefined {
|
|||||||
|
|
||||||
#region Public Methods
|
#region Public Methods
|
||||||
|
|
||||||
public CUETools.Processor.CUEToolsTagger Tagger
|
public CUEToolsTagger Tagger
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -331,8 +332,8 @@ namespace TagLib.UserDefined {
|
|||||||
|
|
||||||
private static TagLib.File UserDefinedResolver(TagLib.File.IFileAbstraction abstraction, string mimetype, TagLib.ReadStyle style)
|
private static TagLib.File UserDefinedResolver(TagLib.File.IFileAbstraction abstraction, string mimetype, TagLib.ReadStyle style)
|
||||||
{
|
{
|
||||||
foreach (KeyValuePair<string,CUETools.Processor.CUEToolsFormat> fmt in _config.formats)
|
foreach (KeyValuePair<string,CUEToolsFormat> fmt in _config.formats)
|
||||||
if (fmt.Value.tagger != CUETools.Processor.CUEToolsTagger.TagLibSharp && mimetype == "taglib/" + fmt.Key)
|
if (fmt.Value.tagger != CUEToolsTagger.TagLibSharp && mimetype == "taglib/" + fmt.Key)
|
||||||
return new File(abstraction, style, fmt.Value.tagger);
|
return new File(abstraction, style, fmt.Value.tagger);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using System.IO;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using CUEControls;
|
using CUEControls;
|
||||||
using CUETools.Processor;
|
using CUETools.Processor;
|
||||||
|
using CUETools.Codecs;
|
||||||
|
|
||||||
namespace JDP
|
namespace JDP
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user