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\CRC32.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="CyclicBufferInputStream.cs" />
|
||||
<Compile Include="CyclicBufferOutputStream.cs" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace CUETools.Processor
|
||||
namespace CUETools.Codecs
|
||||
{
|
||||
public class CUEToolsFormat
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace CUETools.Processor
|
||||
namespace CUETools.Codecs
|
||||
{
|
||||
public enum CUEToolsTagger
|
||||
{
|
||||
@@ -1,9 +1,8 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Xml.Serialization;
|
||||
using CUETools.Codecs;
|
||||
|
||||
namespace CUETools.Processor
|
||||
namespace CUETools.Codecs
|
||||
{
|
||||
public class CUEToolsUDC : INotifyPropertyChanged
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace CUETools.Processor
|
||||
namespace CUETools.Codecs
|
||||
{
|
||||
public class CUEToolsUDCList : BindingList<CUEToolsUDC>
|
||||
{
|
||||
@@ -17,6 +17,7 @@ namespace CUETools.Converter
|
||||
Console.Error.WriteLine();
|
||||
Console.Error.WriteLine(" --decoder <name> Use non-default decoder.");
|
||||
Console.Error.WriteLine(" --encoder <name> Use non-default encoder.");
|
||||
Console.Error.WriteLine(" --encoder-format <ext> Use encoder format different from file extension.");
|
||||
Console.Error.WriteLine(" --lossy Use lossy encoder/mode.");
|
||||
Console.Error.WriteLine(" --lossless Use lossless encoder/mode (default).");
|
||||
Console.Error.WriteLine(" -p # Padding bytes.");
|
||||
@@ -107,7 +108,7 @@ namespace CUETools.Converter
|
||||
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("the extent permitted by law. <http://www.gnu.org/licenses/> for details.");
|
||||
if (!ok || sourceFile == null || destFile == null)
|
||||
@@ -126,8 +127,6 @@ namespace CUETools.Converter
|
||||
TimeSpan lastPrint = TimeSpan.FromMilliseconds(0);
|
||||
CUEConfig config = new CUEConfig();
|
||||
|
||||
SettingsReader sr = new SettingsReader("CUE Tools", "settings.txt", null);
|
||||
config.Load(sr);
|
||||
#if !DEBUG
|
||||
try
|
||||
#endif
|
||||
|
||||
@@ -259,7 +259,7 @@ namespace CUETools.FlakeExe
|
||||
|
||||
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("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.");
|
||||
|
||||
@@ -82,7 +82,6 @@
|
||||
<Compile Include="CUESheet.cs" />
|
||||
<Compile Include="CUESheetAudio.cs" />
|
||||
<Compile Include="CUEStyle.cs" />
|
||||
<Compile Include="CUEToolsFormat.cs" />
|
||||
<Compile Include="CUEToolsLocalDB.cs" />
|
||||
<Compile Include="CUEToolsLocalDBEntry.cs" />
|
||||
<Compile Include="CUEToolsProfile.cs" />
|
||||
@@ -90,9 +89,6 @@
|
||||
<Compile Include="CUEToolsScript.cs" />
|
||||
<Compile Include="CUEToolsSelectionEventArgs.cs" />
|
||||
<Compile Include="CUEToolsSourceFile.cs" />
|
||||
<Compile Include="CUEToolsTagger.cs" />
|
||||
<Compile Include="CUEToolsUDC.cs" />
|
||||
<Compile Include="CUEToolsUDCList.cs" />
|
||||
<Compile Include="CUEToolsVerifyTask.cs" />
|
||||
<Compile Include="CUETrackMetadata.cs" />
|
||||
<Compile Include="FileGroupInfo.cs" />
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Text;
|
||||
using TagLib.Asf;
|
||||
using CUETools.Codecs;
|
||||
|
||||
namespace CUETools.Processor
|
||||
{
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TagLib;
|
||||
using CUETools.Codecs;
|
||||
|
||||
namespace TagLib.UserDefined {
|
||||
/// <summary>
|
||||
@@ -46,7 +47,7 @@ namespace TagLib.UserDefined {
|
||||
{
|
||||
#region Private Fields
|
||||
|
||||
private CUETools.Processor.CUEToolsTagger tagger;
|
||||
private CUEToolsTagger tagger;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -71,17 +72,17 @@ namespace TagLib.UserDefined {
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// <paramref name="path" /> is <see langword="null" />.
|
||||
/// </exception>
|
||||
public File (string path, ReadStyle propertiesStyle, CUETools.Processor.CUEToolsTagger _tagger)
|
||||
public File (string path, ReadStyle propertiesStyle, CUEToolsTagger _tagger)
|
||||
: base (path, propertiesStyle)
|
||||
{
|
||||
tagger = _tagger;
|
||||
// Make sure we have a tag.
|
||||
switch (tagger)
|
||||
{
|
||||
case CUETools.Processor.CUEToolsTagger.APEv2:
|
||||
case CUEToolsTagger.APEv2:
|
||||
GetTag(TagTypes.Ape, true);
|
||||
break;
|
||||
case CUETools.Processor.CUEToolsTagger.ID3v2:
|
||||
case CUEToolsTagger.ID3v2:
|
||||
GetTag(TagTypes.Id3v2, true);
|
||||
break;
|
||||
}
|
||||
@@ -99,17 +100,17 @@ namespace TagLib.UserDefined {
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// <paramref name="path" /> is <see langword="null" />.
|
||||
/// </exception>
|
||||
public File(string path, CUETools.Processor.CUEToolsTagger _tagger)
|
||||
public File(string path, CUEToolsTagger _tagger)
|
||||
: base(path)
|
||||
{
|
||||
tagger = _tagger;
|
||||
// Make sure we have a tag.
|
||||
switch (tagger)
|
||||
{
|
||||
case CUETools.Processor.CUEToolsTagger.APEv2:
|
||||
case CUEToolsTagger.APEv2:
|
||||
GetTag(TagTypes.Ape, true);
|
||||
break;
|
||||
case CUETools.Processor.CUEToolsTagger.ID3v2:
|
||||
case CUEToolsTagger.ID3v2:
|
||||
GetTag(TagTypes.Id3v2, true);
|
||||
break;
|
||||
}
|
||||
@@ -134,17 +135,17 @@ namespace TagLib.UserDefined {
|
||||
/// />.
|
||||
/// </exception>
|
||||
public File (File.IFileAbstraction abstraction,
|
||||
ReadStyle propertiesStyle, CUETools.Processor.CUEToolsTagger _tagger)
|
||||
ReadStyle propertiesStyle, CUEToolsTagger _tagger)
|
||||
: base (abstraction, propertiesStyle)
|
||||
{
|
||||
tagger = _tagger;
|
||||
// Make sure we have a tag.
|
||||
switch (tagger)
|
||||
{
|
||||
case CUETools.Processor.CUEToolsTagger.APEv2:
|
||||
case CUEToolsTagger.APEv2:
|
||||
GetTag(TagTypes.Ape, true);
|
||||
break;
|
||||
case CUETools.Processor.CUEToolsTagger.ID3v2:
|
||||
case CUEToolsTagger.ID3v2:
|
||||
GetTag(TagTypes.Id3v2, true);
|
||||
break;
|
||||
}
|
||||
@@ -163,17 +164,17 @@ namespace TagLib.UserDefined {
|
||||
/// <paramref name="abstraction" /> is <see langword="null"
|
||||
/// />.
|
||||
/// </exception>
|
||||
public File(File.IFileAbstraction abstraction, CUETools.Processor.CUEToolsTagger _tagger)
|
||||
public File(File.IFileAbstraction abstraction, CUEToolsTagger _tagger)
|
||||
: base (abstraction)
|
||||
{
|
||||
tagger = _tagger;
|
||||
// Make sure we have a tag.
|
||||
switch (tagger)
|
||||
{
|
||||
case CUETools.Processor.CUEToolsTagger.APEv2:
|
||||
case CUEToolsTagger.APEv2:
|
||||
GetTag(TagTypes.Ape, true);
|
||||
break;
|
||||
case CUETools.Processor.CUEToolsTagger.ID3v2:
|
||||
case CUEToolsTagger.ID3v2:
|
||||
GetTag(TagTypes.Id3v2, true);
|
||||
break;
|
||||
}
|
||||
@@ -185,7 +186,7 @@ namespace TagLib.UserDefined {
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public CUETools.Processor.CUEToolsTagger Tagger
|
||||
public CUEToolsTagger Tagger
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -331,8 +332,8 @@ namespace TagLib.UserDefined {
|
||||
|
||||
private static TagLib.File UserDefinedResolver(TagLib.File.IFileAbstraction abstraction, string mimetype, TagLib.ReadStyle style)
|
||||
{
|
||||
foreach (KeyValuePair<string,CUETools.Processor.CUEToolsFormat> fmt in _config.formats)
|
||||
if (fmt.Value.tagger != CUETools.Processor.CUEToolsTagger.TagLibSharp && mimetype == "taglib/" + fmt.Key)
|
||||
foreach (KeyValuePair<string,CUEToolsFormat> fmt in _config.formats)
|
||||
if (fmt.Value.tagger != CUEToolsTagger.TagLibSharp && mimetype == "taglib/" + fmt.Key)
|
||||
return new File(abstraction, style, fmt.Value.tagger);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using CUEControls;
|
||||
using CUETools.Processor;
|
||||
using CUETools.Codecs;
|
||||
|
||||
namespace JDP
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user