CUETools.Converter: reducing dependancy on CUETools.Processor;

CUETools.Codecs should be enough. Tagging is the only remaining issue.
This commit is contained in:
Grigory Chudov
2013-06-11 21:19:48 -04:00
parent a273f36ffa
commit e0d789b727
13 changed files with 1083 additions and 1744 deletions

View File

@@ -28,15 +28,14 @@ namespace CUERipper
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmCUERipper));
CUEControls.RectRadius rectRadius8 = new CUEControls.RectRadius();
CUEControls.RectRadius rectRadius1 = new CUEControls.RectRadius();
CUEControls.RectRadius rectRadius2 = new CUEControls.RectRadius();
CUEControls.RectRadius rectRadius3 = new CUEControls.RectRadius();
CUEControls.RectRadius rectRadius4 = new CUEControls.RectRadius();
CUEControls.RectRadius rectRadius5 = new CUEControls.RectRadius();
CUEControls.RectRadius rectRadius6 = new CUEControls.RectRadius();
CUEControls.RectRadius rectRadius7 = new CUEControls.RectRadius();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripStatusLabelMusicBrainz = new System.Windows.Forms.ToolStripStatusLabel();
@@ -59,22 +58,22 @@ namespace CUERipper
this.buttonEncoderSettings = new System.Windows.Forms.Button();
this.checkBoxTestAndCopy = new System.Windows.Forms.CheckBox();
this.bnComboBoxLosslessOrNot = new CUEControls.ImgComboBox();
this.losslessOrNotBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.bindingSourceCR = new System.Windows.Forms.BindingSource(this.components);
this.losslessOrNotBindingSource = new System.Windows.Forms.BindingSource();
this.bindingSourceCR = new System.Windows.Forms.BindingSource();
this.bnComboBoxEncoder = new CUEControls.ImgComboBox();
this.encodersBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.encodersBindingSource = new System.Windows.Forms.BindingSource();
this.labelSecureMode = new System.Windows.Forms.Label();
this.bnComboBoxFormat = new CUEControls.ImgComboBox();
this.formatsBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.formatsBindingSource = new System.Windows.Forms.BindingSource();
this.labelEncoderMinMode = new System.Windows.Forms.Label();
this.bnComboBoxImage = new CUEControls.ImgComboBox();
this.cUEStylesBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.cUEStylesBindingSource = new System.Windows.Forms.BindingSource();
this.labelEncoderMaxMode = new System.Windows.Forms.Label();
this.labelEncoderMode = new System.Windows.Forms.Label();
this.trackBarEncoderMode = new System.Windows.Forms.TrackBar();
this.trackBarSecureMode = new System.Windows.Forms.TrackBar();
this.drivesBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.imageListChecked = new System.Windows.Forms.ImageList(this.components);
this.drivesBindingSource = new System.Windows.Forms.BindingSource();
this.imageListChecked = new System.Windows.Forms.ImageList();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.progressBarErrors = new ProgressODoom.ProgressBarEx();
this.plainBackgroundPainter1 = new ProgressODoom.PlainBackgroundPainter();
@@ -84,10 +83,10 @@ namespace CUERipper
this.progressBarCD = new ProgressODoom.ProgressBarEx();
this.plainProgressPainter2 = new ProgressODoom.PlainProgressPainter();
this.txtOutputPath = new System.Windows.Forms.TextBox();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.toolTip1 = new System.Windows.Forms.ToolTip();
this.bnComboBoxRelease = new CUEControls.ImgComboBox();
this.releasesBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.imageListMetadataSource = new System.Windows.Forms.ImageList(this.components);
this.releasesBindingSource = new System.Windows.Forms.BindingSource();
this.imageListMetadataSource = new System.Windows.Forms.ImageList();
this.bnComboBoxDrives = new CUEControls.ImgComboBox();
this.bnComboBoxOutputFormat = new CUEControls.ImgComboBox();
this.listMetadata = new System.Windows.Forms.ListView();
@@ -328,11 +327,11 @@ namespace CUERipper
this.bnComboBoxLosslessOrNot.ImageList = null;
resources.ApplyResources(this.bnComboBoxLosslessOrNot, "bnComboBoxLosslessOrNot");
this.bnComboBoxLosslessOrNot.Name = "bnComboBoxLosslessOrNot";
rectRadius8.BottomLeft = 2;
rectRadius8.BottomRight = 2;
rectRadius8.TopLeft = 2;
rectRadius8.TopRight = 6;
this.bnComboBoxLosslessOrNot.Radius = rectRadius8;
rectRadius1.BottomLeft = 2;
rectRadius1.BottomRight = 2;
rectRadius1.TopLeft = 2;
rectRadius1.TopRight = 6;
this.bnComboBoxLosslessOrNot.Radius = rectRadius1;
this.bnComboBoxLosslessOrNot.SelectedValueChanged += new System.EventHandler(this.bnComboBoxLosslessOrNot_SelectedValueChanged);
//
// losslessOrNotBindingSource
@@ -353,11 +352,11 @@ namespace CUERipper
this.bnComboBoxEncoder.ImageList = null;
resources.ApplyResources(this.bnComboBoxEncoder, "bnComboBoxEncoder");
this.bnComboBoxEncoder.Name = "bnComboBoxEncoder";
rectRadius1.BottomLeft = 2;
rectRadius1.BottomRight = 2;
rectRadius1.TopLeft = 2;
rectRadius1.TopRight = 6;
this.bnComboBoxEncoder.Radius = rectRadius1;
rectRadius2.BottomLeft = 2;
rectRadius2.BottomRight = 2;
rectRadius2.TopLeft = 2;
rectRadius2.TopRight = 6;
this.bnComboBoxEncoder.Radius = rectRadius2;
this.bnComboBoxEncoder.SelectedValueChanged += new System.EventHandler(this.bnComboBoxEncoder_SelectedValueChanged);
//
// encodersBindingSource
@@ -380,11 +379,11 @@ namespace CUERipper
this.bnComboBoxFormat.ImageList = null;
resources.ApplyResources(this.bnComboBoxFormat, "bnComboBoxFormat");
this.bnComboBoxFormat.Name = "bnComboBoxFormat";
rectRadius2.BottomLeft = 2;
rectRadius2.BottomRight = 2;
rectRadius2.TopLeft = 2;
rectRadius2.TopRight = 6;
this.bnComboBoxFormat.Radius = rectRadius2;
rectRadius3.BottomLeft = 2;
rectRadius3.BottomRight = 2;
rectRadius3.TopLeft = 2;
rectRadius3.TopRight = 6;
this.bnComboBoxFormat.Radius = rectRadius3;
this.bnComboBoxFormat.SelectedValueChanged += new System.EventHandler(this.bnComboBoxFormat_SelectedValueChanged);
//
// formatsBindingSource
@@ -406,11 +405,11 @@ namespace CUERipper
this.bnComboBoxImage.ImageList = null;
resources.ApplyResources(this.bnComboBoxImage, "bnComboBoxImage");
this.bnComboBoxImage.Name = "bnComboBoxImage";
rectRadius3.BottomLeft = 2;
rectRadius3.BottomRight = 2;
rectRadius3.TopLeft = 2;
rectRadius3.TopRight = 6;
this.bnComboBoxImage.Radius = rectRadius3;
rectRadius4.BottomLeft = 2;
rectRadius4.BottomRight = 2;
rectRadius4.TopLeft = 2;
rectRadius4.TopRight = 6;
this.bnComboBoxImage.Radius = rectRadius4;
this.bnComboBoxImage.SelectedValueChanged += new System.EventHandler(this.bnComboBoxImage_SelectedValueChanged);
//
// cUEStylesBindingSource
@@ -550,11 +549,11 @@ namespace CUERipper
this.bnComboBoxRelease.ImageKeyMember = "ImageKey";
this.bnComboBoxRelease.ImageList = this.imageListMetadataSource;
this.bnComboBoxRelease.Name = "bnComboBoxRelease";
rectRadius4.BottomLeft = 2;
rectRadius4.BottomRight = 2;
rectRadius4.TopLeft = 2;
rectRadius4.TopRight = 6;
this.bnComboBoxRelease.Radius = rectRadius4;
rectRadius5.BottomLeft = 2;
rectRadius5.BottomRight = 2;
rectRadius5.TopLeft = 2;
rectRadius5.TopRight = 6;
this.bnComboBoxRelease.Radius = rectRadius5;
this.bnComboBoxRelease.SelectedValueChanged += new System.EventHandler(this.bnComboBoxRelease_SelectedValueChanged);
//
// releasesBindingSource
@@ -588,11 +587,11 @@ namespace CUERipper
this.bnComboBoxDrives.ImageKeyMember = "ImageKey";
this.bnComboBoxDrives.ImageList = this.imageListMetadataSource;
this.bnComboBoxDrives.Name = "bnComboBoxDrives";
rectRadius5.BottomLeft = 2;
rectRadius5.BottomRight = 2;
rectRadius5.TopLeft = 2;
rectRadius5.TopRight = 6;
this.bnComboBoxDrives.Radius = rectRadius5;
rectRadius6.BottomLeft = 2;
rectRadius6.BottomRight = 2;
rectRadius6.TopLeft = 2;
rectRadius6.TopRight = 6;
this.bnComboBoxDrives.Radius = rectRadius6;
this.bnComboBoxDrives.SelectedIndexChanged += new System.EventHandler(this.bnComboBoxDrives_SelectedIndexChanged);
//
// bnComboBoxOutputFormat
@@ -603,11 +602,11 @@ namespace CUERipper
resources.ApplyResources(this.bnComboBoxOutputFormat, "bnComboBoxOutputFormat");
this.bnComboBoxOutputFormat.ImageList = null;
this.bnComboBoxOutputFormat.Name = "bnComboBoxOutputFormat";
rectRadius6.BottomLeft = 2;
rectRadius6.BottomRight = 2;
rectRadius6.TopLeft = 2;
rectRadius6.TopRight = 6;
this.bnComboBoxOutputFormat.Radius = rectRadius6;
rectRadius7.BottomLeft = 2;
rectRadius7.BottomRight = 2;
rectRadius7.TopLeft = 2;
rectRadius7.TopRight = 6;
this.bnComboBoxOutputFormat.Radius = rectRadius7;
this.bnComboBoxOutputFormat.TabStop = false;
this.bnComboBoxOutputFormat.DropDown += new System.EventHandler(this.bnComboBoxOutputFormat_DroppedDown);
this.bnComboBoxOutputFormat.TextChanged += new System.EventHandler(this.bnComboBoxOutputFormat_TextChanged);

View File

@@ -121,31 +121,6 @@
<value>222, 95</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="statusStrip1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 424</value>
</data>
<data name="statusStrip1.Size" type="System.Drawing.Size, System.Drawing">
<value>664, 25</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="statusStrip1.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
</data>
<data name="statusStrip1.Text" xml:space="preserve">
<value>statusStrip1</value>
</data>
<data name="&gt;&gt;statusStrip1.Name" xml:space="preserve">
<value>statusStrip1</value>
</data>
<data name="&gt;&gt;statusStrip1.Type" xml:space="preserve">
<value>System.Windows.Forms.StatusStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;statusStrip1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;statusStrip1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="toolStripStatusLabel1.Size" type="System.Drawing.Size, System.Drawing">
<value>487, 20</value>
</data>
@@ -198,36 +173,30 @@
<data name="toolStripStatusLabel2.Text" xml:space="preserve">
<value>toolStripStatusAr</value>
</data>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>357, 17</value>
</metadata>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="listTracks.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
<data name="statusStrip1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 424</value>
</data>
<data name="listTracks.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
<data name="statusStrip1.Size" type="System.Drawing.Size, System.Drawing">
<value>664, 25</value>
</data>
<data name="listTracks.Size" type="System.Drawing.Size, System.Drawing">
<value>656, 158</value>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="statusStrip1.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
</data>
<data name="listTracks.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
<data name="statusStrip1.Text" xml:space="preserve">
<value>statusStrip1</value>
</data>
<data name="listTracks.ToolTip" xml:space="preserve">
<value>Double-click to edit track names</value>
<data name="&gt;&gt;statusStrip1.Name" xml:space="preserve">
<value>statusStrip1</value>
</data>
<data name="&gt;&gt;listTracks.Name" xml:space="preserve">
<value>listTracks</value>
<data name="&gt;&gt;statusStrip1.Type" xml:space="preserve">
<value>System.Windows.Forms.StatusStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;listTracks.Type" xml:space="preserve">
<value>System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="&gt;&gt;statusStrip1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;listTracks.Parent" xml:space="preserve">
<value>panel4</value>
</data>
<data name="&gt;&gt;listTracks.ZOrder" xml:space="preserve">
<value>0</value>
<data name="&gt;&gt;statusStrip1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="Title.DisplayIndex" type="System.Int32, mscorlib">
<value>1</value>
@@ -265,6 +234,37 @@
<data name="Length.Width" type="System.Int32, mscorlib">
<value>70</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="listTracks.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="listTracks.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="listTracks.Size" type="System.Drawing.Size, System.Drawing">
<value>656, 158</value>
</data>
<data name="listTracks.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>357, 17</value>
</metadata>
<data name="listTracks.ToolTip" xml:space="preserve">
<value>Double-click to edit track names</value>
</data>
<data name="&gt;&gt;listTracks.Name" xml:space="preserve">
<value>listTracks</value>
</data>
<data name="&gt;&gt;listTracks.Type" xml:space="preserve">
<value>System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;listTracks.Parent" xml:space="preserve">
<value>panel4</value>
</data>
<data name="&gt;&gt;listTracks.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="buttonGo.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
@@ -415,174 +415,6 @@
<data name="&gt;&gt;lblWriteOffset.ZOrder" xml:space="preserve">
<value>12</value>
</data>
<data name="&gt;&gt;buttonEncoderSettings.Name" xml:space="preserve">
<value>buttonEncoderSettings</value>
</data>
<data name="&gt;&gt;buttonEncoderSettings.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonEncoderSettings.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;buttonEncoderSettings.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;checkBoxTestAndCopy.Name" xml:space="preserve">
<value>checkBoxTestAndCopy</value>
</data>
<data name="&gt;&gt;checkBoxTestAndCopy.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;checkBoxTestAndCopy.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;checkBoxTestAndCopy.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;bnComboBoxLosslessOrNot.Name" xml:space="preserve">
<value>bnComboBoxLosslessOrNot</value>
</data>
<data name="&gt;&gt;bnComboBoxLosslessOrNot.Type" xml:space="preserve">
<value>CUEControls.ImgComboBox, CUEControls, Version=2.1.5.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;bnComboBoxLosslessOrNot.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;bnComboBoxLosslessOrNot.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;bnComboBoxEncoder.Name" xml:space="preserve">
<value>bnComboBoxEncoder</value>
</data>
<data name="&gt;&gt;bnComboBoxEncoder.Type" xml:space="preserve">
<value>CUEControls.ImgComboBox, CUEControls, Version=2.1.5.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;bnComboBoxEncoder.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;bnComboBoxEncoder.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;labelSecureMode.Name" xml:space="preserve">
<value>labelSecureMode</value>
</data>
<data name="&gt;&gt;labelSecureMode.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelSecureMode.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;labelSecureMode.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="&gt;&gt;bnComboBoxFormat.Name" xml:space="preserve">
<value>bnComboBoxFormat</value>
</data>
<data name="&gt;&gt;bnComboBoxFormat.Type" xml:space="preserve">
<value>CUEControls.ImgComboBox, CUEControls, Version=2.1.5.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;bnComboBoxFormat.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;bnComboBoxFormat.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="&gt;&gt;labelEncoderMinMode.Name" xml:space="preserve">
<value>labelEncoderMinMode</value>
</data>
<data name="&gt;&gt;labelEncoderMinMode.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelEncoderMinMode.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;labelEncoderMinMode.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="&gt;&gt;bnComboBoxImage.Name" xml:space="preserve">
<value>bnComboBoxImage</value>
</data>
<data name="&gt;&gt;bnComboBoxImage.Type" xml:space="preserve">
<value>CUEControls.ImgComboBox, CUEControls, Version=2.1.5.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;bnComboBoxImage.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;bnComboBoxImage.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="&gt;&gt;labelEncoderMaxMode.Name" xml:space="preserve">
<value>labelEncoderMaxMode</value>
</data>
<data name="&gt;&gt;labelEncoderMaxMode.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelEncoderMaxMode.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;labelEncoderMaxMode.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="&gt;&gt;labelEncoderMode.Name" xml:space="preserve">
<value>labelEncoderMode</value>
</data>
<data name="&gt;&gt;labelEncoderMode.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelEncoderMode.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;labelEncoderMode.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="&gt;&gt;trackBarEncoderMode.Name" xml:space="preserve">
<value>trackBarEncoderMode</value>
</data>
<data name="&gt;&gt;trackBarEncoderMode.Type" xml:space="preserve">
<value>System.Windows.Forms.TrackBar, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;trackBarEncoderMode.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;trackBarEncoderMode.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="&gt;&gt;trackBarSecureMode.Name" xml:space="preserve">
<value>trackBarSecureMode</value>
</data>
<data name="&gt;&gt;trackBarSecureMode.Type" xml:space="preserve">
<value>System.Windows.Forms.TrackBar, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;trackBarSecureMode.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;trackBarSecureMode.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="groupBoxSettings.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Left</value>
</data>
<data name="groupBoxSettings.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="groupBoxSettings.Size" type="System.Drawing.Size, System.Drawing">
<value>339, 136</value>
</data>
<data name="groupBoxSettings.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="&gt;&gt;groupBoxSettings.Name" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;groupBoxSettings.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBoxSettings.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;groupBoxSettings.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="buttonEncoderSettings.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
@@ -670,9 +502,6 @@
<data name="&gt;&gt;bnComboBoxLosslessOrNot.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<metadata name="bindingSourceCR.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>210, 56</value>
</metadata>
<metadata name="encodersBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1217, 56</value>
</metadata>
@@ -952,6 +781,30 @@
<data name="&gt;&gt;trackBarSecureMode.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="groupBoxSettings.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Left</value>
</data>
<data name="groupBoxSettings.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="groupBoxSettings.Size" type="System.Drawing.Size, System.Drawing">
<value>339, 136</value>
</data>
<data name="groupBoxSettings.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="&gt;&gt;groupBoxSettings.Name" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;groupBoxSettings.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBoxSettings.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;groupBoxSettings.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<metadata name="drivesBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>882, 56</value>
</metadata>
@@ -963,7 +816,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABy
CQAAAk1TRnQBSQFMAgEBBAEAAeQBAgHkAQIBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CQAAAk1TRnQBSQFMAgEBBAEAAewBAgHsAQIBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@@ -1018,12 +871,15 @@
<metadata name="styledBorderPainter1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>624, 17</value>
</metadata>
<metadata name="plainProgressPainter1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>454, 17</value>
</metadata>
<data name="progressBarErrors.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 91</value>
</data>
<metadata name="plainProgressPainter1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>454, 17</value>
</metadata>
<metadata name="gradientGlossPainter1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>789, 17</value>
</metadata>
<data name="progressBarErrors.Size" type="System.Drawing.Size, System.Drawing">
<value>170, 23</value>
</data>
@@ -1042,27 +898,12 @@
<data name="&gt;&gt;progressBarErrors.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<metadata name="plainBackgroundPainter1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>960, 17</value>
</metadata>
<metadata name="styledBorderPainter1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>624, 17</value>
</metadata>
<metadata name="plainProgressPainter1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>454, 17</value>
</metadata>
<metadata name="gradientGlossPainter1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>789, 17</value>
</metadata>
<metadata name="gradientGlossPainter1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>789, 17</value>
</metadata>
<metadata name="plainProgressPainter2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>356, 56</value>
</metadata>
<data name="progressBarCD.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 64</value>
</data>
<metadata name="plainProgressPainter2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>356, 56</value>
</metadata>
<data name="progressBarCD.Size" type="System.Drawing.Size, System.Drawing">
<value>170, 23</value>
</data>
@@ -1084,9 +925,6 @@
<data name="&gt;&gt;progressBarCD.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<metadata name="plainProgressPainter2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>356, 56</value>
</metadata>
<data name="txtOutputPath.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@@ -1114,9 +952,6 @@
<data name="&gt;&gt;txtOutputPath.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>357, 17</value>
</metadata>
<data name="bnComboBoxRelease.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
@@ -1131,7 +966,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAY
EgAAAk1TRnQBSQFMAgEBCwEAAeQBAgHkAQIBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
EgAAAk1TRnQBSQFMAgEBCwEAAewBAgHsAQIBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@@ -1298,6 +1133,24 @@
<data name="&gt;&gt;bnComboBoxOutputFormat.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="columnHeaderValue.DisplayIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="columnHeaderValue.Text" xml:space="preserve">
<value>Value</value>
</data>
<data name="columnHeaderValue.Width" type="System.Int32, mscorlib">
<value>450</value>
</data>
<data name="columnHeaderName.DisplayIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="columnHeaderName.Text" xml:space="preserve">
<value>Name</value>
</data>
<data name="columnHeaderName.Width" type="System.Int32, mscorlib">
<value>140</value>
</data>
<data name="listMetadata.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@@ -1325,24 +1178,6 @@
<data name="&gt;&gt;listMetadata.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="columnHeaderValue.DisplayIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="columnHeaderValue.Text" xml:space="preserve">
<value>Value</value>
</data>
<data name="columnHeaderValue.Width" type="System.Int32, mscorlib">
<value>450</value>
</data>
<data name="columnHeaderName.DisplayIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="columnHeaderName.Text" xml:space="preserve">
<value>Name</value>
</data>
<data name="columnHeaderName.Width" type="System.Int32, mscorlib">
<value>140</value>
</data>
<data name="buttonMetadata.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 57</value>
</data>
@@ -1610,6 +1445,21 @@
<data name="&gt;&gt;buttonSettings.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="panel7.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="panel7.Location" type="System.Drawing.Point, System.Drawing">
<value>339, 0</value>
</data>
<data name="panel7.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 5, 5, 5</value>
</data>
<data name="panel7.Size" type="System.Drawing.Size, System.Drawing">
<value>141, 136</value>
</data>
<data name="panel7.TabIndex" type="System.Int32, mscorlib">
<value>44</value>
</data>
<data name="&gt;&gt;panel7.Name" xml:space="preserve">
<value>panel7</value>
</data>
@@ -1646,32 +1496,23 @@
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="panel7.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
<data name="buttonEjectDisk.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="panel7.Location" type="System.Drawing.Point, System.Drawing">
<value>339, 0</value>
<data name="buttonEjectDisk.Location" type="System.Drawing.Point, System.Drawing">
<value>182, 57</value>
</data>
<data name="panel7.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 5, 5, 5</value>
<data name="buttonEjectDisk.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 24</value>
</data>
<data name="panel7.Size" type="System.Drawing.Size, System.Drawing">
<value>141, 136</value>
<data name="buttonEjectDisk.TabIndex" type="System.Int32, mscorlib">
<value>45</value>
</data>
<data name="panel7.TabIndex" type="System.Int32, mscorlib">
<value>44</value>
<data name="buttonEjectDisk.Text" xml:space="preserve">
<value>Eject</value>
</data>
<data name="&gt;&gt;panel7.Name" xml:space="preserve">
<value>panel7</value>
</data>
<data name="&gt;&gt;panel7.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel7.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;panel7.ZOrder" xml:space="preserve">
<value>0</value>
<data name="buttonEjectDisk.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
<value>ImageBeforeText</value>
</data>
<data name="&gt;&gt;buttonEjectDisk.Name" xml:space="preserve">
<value>buttonEjectDisk</value>
@@ -1712,36 +1553,6 @@
<data name="&gt;&gt;panel3.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="buttonEjectDisk.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="buttonEjectDisk.Location" type="System.Drawing.Point, System.Drawing">
<value>182, 57</value>
</data>
<data name="buttonEjectDisk.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 24</value>
</data>
<data name="buttonEjectDisk.TabIndex" type="System.Int32, mscorlib">
<value>45</value>
</data>
<data name="buttonEjectDisk.Text" xml:space="preserve">
<value>Eject</value>
</data>
<data name="buttonEjectDisk.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
<value>ImageBeforeText</value>
</data>
<data name="&gt;&gt;buttonEjectDisk.Name" xml:space="preserve">
<value>buttonEjectDisk</value>
</data>
<data name="&gt;&gt;buttonEjectDisk.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonEjectDisk.Parent" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;buttonEjectDisk.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="panel4.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>

View File

@@ -61,6 +61,10 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CUETools.Codecs\CUETools.Codecs.csproj">
<Project>{6458A13A-30EF-45A9-9D58-E5031B17BEE2}</Project>
<Name>CUETools.Codecs</Name>
</ProjectReference>
<ProjectReference Include="..\CUETools.CTDB\CUETools.CTDB.csproj">
<Project>{AA2A9A7E-45FB-4632-AD85-85B0E556F818}</Project>
<Name>CUETools.CTDB</Name>

View File

@@ -74,6 +74,7 @@
<Compile Include="CRC\CRC16CCITT.cs" />
<Compile Include="CRC\CRC32.cs" />
<Compile Include="CRC\CRC8.cs" />
<Compile Include="CUEToolsCodecsConfig.cs" />
<Compile Include="CUEToolsFormat.cs" />
<Compile Include="CUEToolsTagger.cs" />
<Compile Include="CUEToolsUDC.cs" />

View File

@@ -0,0 +1,70 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
using System.Threading;
using System.Xml;
using System.Xml.Serialization;
namespace CUETools.Codecs
{
public class CUEToolsCodecsConfig
{
public Dictionary<string, CUEToolsFormat> formats;
public CUEToolsUDCList encoders;
public CUEToolsUDCList decoders;
public CUEToolsCodecsConfig(List<Type> encs, List<Type> decs)
{
encoders = new CUEToolsUDCList(true);
foreach (Type type in encs)
foreach (AudioEncoderClassAttribute enc in Attribute.GetCustomAttributes(type, typeof(AudioEncoderClassAttribute)))
{
try
{
encoders.Add(new CUEToolsUDC(enc, type));
}
catch (Exception)
{
}
}
decoders = new CUEToolsUDCList(false);
foreach (Type type in decs)
foreach (AudioDecoderClass dec in Attribute.GetCustomAttributes(type, typeof(AudioDecoderClass)))
decoders.Add(new CUEToolsUDC(dec, type));
if (Type.GetType("Mono.Runtime", false) == null)
{
encoders.Add(new CUEToolsUDC("flake", "flac", true, "0 1 2 3 4 5 6 7 8 9 10 11 12", "8", "flake.exe", "-%M - -o %O -p %P"));
encoders.Add(new CUEToolsUDC("takc", "tak", true, "0 1 2 2e 2m 3 3e 3m 4 4e 4m", "2", "takc.exe", "-e -p%M -overwrite - %O"));
encoders.Add(new CUEToolsUDC("ffmpeg alac", "m4a", true, "", "", "ffmpeg.exe", "-i - -f ipod -acodec alac -y %O"));
encoders.Add(new CUEToolsUDC("VBR (lame.exe)", "mp3", false, "V9 V8 V7 V6 V5 V4 V3 V2 V1 V0", "V2", "lame.exe", "--vbr-new -%M - %O"));
encoders.Add(new CUEToolsUDC("CBR (lame.exe)", "mp3", false, "96 128 192 256 320", "256", "lame.exe", "-m s -q 0 -b %M --noreplaygain - %O"));
encoders.Add(new CUEToolsUDC("oggenc", "ogg", false, "-1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8", "3", "oggenc.exe", "-q %M - -o %O"));
encoders.Add(new CUEToolsUDC("nero aac", "m4a", false, "0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9", "0.4", "neroAacEnc.exe", "-q %M -if - -of %O"));
encoders.Add(new CUEToolsUDC("qaac tvbr", "m4a", false, "10 20 30 40 50 60 70 80 90 100 110 127", "80", "qaac.exe", "-s -V %M -q 2 - -o %O"));
decoders.Add(new CUEToolsUDC("takc", "tak", true, "", "", "takc.exe", "-d %I -"));
decoders.Add(new CUEToolsUDC("ffmpeg alac", "m4a", true, "", "", "ffmpeg.exe", "-v 0 -i %I -f wav -"));
}
else
{
// !!!
}
formats = new Dictionary<string, CUEToolsFormat>();
formats.Add("flac", new CUEToolsFormat("flac", CUEToolsTagger.TagLibSharp, true, false, true, true, encoders.GetDefault("flac", true), null, decoders.GetDefault("flac", true)));
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("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)));
formats.Add("wma", new CUEToolsFormat("wma", CUEToolsTagger.TagLibSharp, true, true, false, true, encoders.GetDefault("wma", true), encoders.GetDefault("wma", false), decoders.GetDefault("wma", true)));
formats.Add("mp3", new CUEToolsFormat("mp3", CUEToolsTagger.TagLibSharp, false, true, false, true, null, encoders.GetDefault("mp3", false), null));
formats.Add("ogg", new CUEToolsFormat("ogg", CUEToolsTagger.TagLibSharp, false, true, false, true, null, encoders.GetDefault("ogg", false), null));
}
}
}

View File

@@ -1,9 +1,8 @@
using System;
using System.Collections.Generic;
using System.IO;
using CUETools.Codecs;
using CUETools.Processor;
using CUETools.Processor.Settings;
using System.Collections.Generic;
namespace CUETools.Converter
{
@@ -25,7 +24,7 @@ namespace CUETools.Converter
Console.Error.WriteLine();
}
public static CUEToolsUDC GetEncoder(CUEConfig config, CUEToolsFormat fmt, bool lossless, string chosenEncoder)
public static CUEToolsUDC GetEncoder(CUEToolsCodecsConfig config, CUEToolsFormat fmt, bool lossless, string chosenEncoder)
{
CUEToolsUDC tmpEncoder;
return chosenEncoder != null ?
@@ -33,7 +32,7 @@ namespace CUETools.Converter
(lossless ? fmt.encoderLossless : fmt.encoderLossy);
}
public static IAudioSource GetAudioSource(CUEConfig config, string path, string chosenDecoder)
public static IAudioSource GetAudioSource(CUEToolsCodecsConfig config, string path, string chosenDecoder)
{
if (path == "-")
return new WAVReader("", Console.OpenStandardInput());
@@ -125,7 +124,7 @@ namespace CUETools.Converter
DateTime start = DateTime.Now;
TimeSpan lastPrint = TimeSpan.FromMilliseconds(0);
CUEConfig config = new CUEConfig();
CUEToolsCodecsConfig config = new CUEConfig();
#if !DEBUG
try
@@ -164,7 +163,7 @@ namespace CUETools.Converter
Program.GetEncoder(config, fmt, true, encoderName) ?? Program.GetEncoder(config, fmt, false, encoderName);
if (encoder == null)
{
var lst = new List<CUEToolsUDC>(config.Encoders).FindAll(
var lst = new List<CUEToolsUDC>(config.encoders).FindAll(
e => e.extension == fmt.extension && (audioEncoderType == AudioEncoderType.NoAudio || audioEncoderType == (e.Lossless ? AudioEncoderType.Lossless : AudioEncoderType.Lossy))).
ConvertAll(e => e.Name + (e.Lossless ? " (lossless)" : " (lossy)"));
throw new Exception("Encoders available for format " + fmt.extension + ": " + (lst.Count == 0 ? "none" : string.Join(", ", lst.ToArray())));
@@ -241,7 +240,7 @@ namespace CUETools.Converter
if (sourceFile != "-" && destFile != "-" && destFile != "nul")
{
TagLib.File destInfo = TagLib.File.Create(new TagLib.File.LocalFileAbstraction(destFile));
if (Tagging.UpdateTags(destInfo, Tagging.Analyze(sourceInfo), config))
if (Tagging.UpdateTags(destInfo, Tagging.Analyze(sourceInfo), config, false))
{
sourceInfo.Tag.CopyTo(destInfo.Tag, true);
destInfo.Tag.Pictures = sourceInfo.Tag.Pictures;

View File

@@ -11,7 +11,7 @@ using CUETools.Processor.Settings;
namespace CUETools.Processor
{
public class CUEConfig
public class CUEConfig : CUEToolsCodecsConfig
{
public readonly static XmlSerializerNamespaces xmlEmptyNamespaces = new XmlSerializerNamespaces(new XmlQualifiedName[] { XmlQualifiedName.Empty });
public readonly static XmlWriterSettings xmlEmptySettings = new XmlWriterSettings { Indent = true, OmitXmlDeclaration = true };
@@ -54,9 +54,6 @@ namespace CUETools.Processor
public bool oneInstance;
public bool checkForUpdates;
public string language;
public Dictionary<string, CUEToolsFormat> formats;
public CUEToolsUDCList encoders;
public CUEToolsUDCList decoders;
public Dictionary<string, CUEToolsScript> scripts;
public string defaultVerifyScript;
public string defaultEncodeScript;
@@ -86,6 +83,7 @@ namespace CUETools.Processor
}
public CUEConfig()
: base(CUEProcessorPlugins.encs, CUEProcessorPlugins.decs)
{
fixOffsetMinimumConfidence = 2;
fixOffsetMinimumTracksPercent = 51;
@@ -149,53 +147,6 @@ namespace CUETools.Processor
language = Thread.CurrentThread.CurrentUICulture.Name;
encoders = new CUEToolsUDCList(true);
foreach (Type type in CUEProcessorPlugins.encs)
foreach (AudioEncoderClassAttribute enc in Attribute.GetCustomAttributes(type, typeof(AudioEncoderClassAttribute)))
{
try
{
encoders.Add(new CUEToolsUDC(enc, type));
}
catch (Exception)
{
}
}
decoders = new CUEToolsUDCList(false);
foreach (Type type in CUEProcessorPlugins.decs)
foreach (AudioDecoderClass dec in Attribute.GetCustomAttributes(type, typeof(AudioDecoderClass)))
decoders.Add(new CUEToolsUDC(dec, type));
if (Type.GetType("Mono.Runtime", false) == null)
{
encoders.Add(new CUEToolsUDC("flake", "flac", true, "0 1 2 3 4 5 6 7 8 9 10 11 12", "8", "flake.exe", "-%M - -o %O -p %P"));
encoders.Add(new CUEToolsUDC("takc", "tak", true, "0 1 2 2e 2m 3 3e 3m 4 4e 4m", "2", "takc.exe", "-e -p%M -overwrite - %O"));
encoders.Add(new CUEToolsUDC("ffmpeg alac", "m4a", true, "", "", "ffmpeg.exe", "-i - -f ipod -acodec alac -y %O"));
encoders.Add(new CUEToolsUDC("VBR (lame.exe)", "mp3", false, "V9 V8 V7 V6 V5 V4 V3 V2 V1 V0", "V2", "lame.exe", "--vbr-new -%M - %O"));
encoders.Add(new CUEToolsUDC("CBR (lame.exe)", "mp3", false, "96 128 192 256 320", "256", "lame.exe", "-m s -q 0 -b %M --noreplaygain - %O"));
encoders.Add(new CUEToolsUDC("oggenc", "ogg", false, "-1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8", "3", "oggenc.exe", "-q %M - -o %O"));
encoders.Add(new CUEToolsUDC("nero aac", "m4a", false, "0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9", "0.4", "neroAacEnc.exe", "-q %M -if - -of %O"));
encoders.Add(new CUEToolsUDC("qaac tvbr", "m4a", false, "10 20 30 40 50 60 70 80 90 100 110 127", "80", "qaac.exe", "-s -V %M -q 2 - -o %O"));
decoders.Add(new CUEToolsUDC("takc", "tak", true, "", "", "takc.exe", "-d %I -"));
decoders.Add(new CUEToolsUDC("ffmpeg alac", "m4a", true, "", "", "ffmpeg.exe", "-v 0 -i %I -f wav -"));
}
else
{
// !!!
}
formats = new Dictionary<string, CUEToolsFormat>();
formats.Add("flac", new CUEToolsFormat("flac", CUEToolsTagger.TagLibSharp, true, false, true, true, encoders.GetDefault("flac", true), null, decoders.GetDefault("flac", true)));
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("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)));
formats.Add("wma", new CUEToolsFormat("wma", CUEToolsTagger.TagLibSharp, true, true, false, true, encoders.GetDefault("wma", true), encoders.GetDefault("wma", false), decoders.GetDefault("wma", true)));
formats.Add("mp3", new CUEToolsFormat("mp3", CUEToolsTagger.TagLibSharp, false, true, false, true, null, encoders.GetDefault("mp3", false), null));
formats.Add("ogg", new CUEToolsFormat("ogg", CUEToolsTagger.TagLibSharp, false, true, false, true, null, encoders.GetDefault("ogg", false), null));
scripts = new Dictionary<string, CUEToolsScript>();
scripts.Add("default", new CUEToolsScript("default", true,
new CUEAction[] { CUEAction.Verify, CUEAction.Encode },

View File

@@ -2665,7 +2665,7 @@ namespace CUETools.Processor
NameValueCollection tags = GenerateAlbumTags(bestOffset, OutputStyle == CUEStyle.SingleFileWithCUE, _ripperLog ?? _eacLog);
TagLib.UserDefined.AdditionalFileTypes.Config = _config;
TagLib.File fileInfo = TagLib.File.Create(new TagLib.File.LocalFileAbstraction(_destPaths[0]));
if (Tagging.UpdateTags(fileInfo, tags, _config))
if (Tagging.UpdateTags(fileInfo, tags, _config, _config.advanced.UseId3v24))
{
TagLib.File sourceFileInfo = _tracks[0]._fileInfo ?? _fileInfo;
@@ -2751,7 +2751,7 @@ namespace CUETools.Processor
NameValueCollection tags = GenerateTrackTags(iTrack, bestOffset);
TagLib.UserDefined.AdditionalFileTypes.Config = _config;
TagLib.File fileInfo = TagLib.File.Create(new TagLib.File.LocalFileAbstraction(path));
if (Tagging.UpdateTags(fileInfo, tags, _config))
if (Tagging.UpdateTags(fileInfo, tags, _config, _config.advanced.UseId3v24))
{
TagLib.File sourceFileInfo = _tracks[iTrack]._fileInfo ?? _fileInfo;
@@ -3024,7 +3024,7 @@ namespace CUETools.Processor
NameValueCollection tags = Tagging.Analyze(_fileInfo);
CleanupTags(tags, "ACCURATERIP");
GenerateAccurateRipTags(tags, bestOffset, -1);
if (Tagging.UpdateTags(_fileInfo, tags, _config))
if (Tagging.UpdateTags(_fileInfo, tags, _config, _config.advanced.UseId3v24))
_fileInfo.Save();
}
else if (_hasTrackFilenames)
@@ -3034,7 +3034,7 @@ namespace CUETools.Processor
NameValueCollection tags = Tagging.Analyze(_tracks[iTrack]._fileInfo);
CleanupTags(tags, "ACCURATERIP");
GenerateAccurateRipTags(tags, bestOffset, iTrack);
if (Tagging.UpdateTags(_tracks[iTrack]._fileInfo, tags, _config))
if (Tagging.UpdateTags(_tracks[iTrack]._fileInfo, tags, _config, _config.advanced.UseId3v24))
_tracks[iTrack]._fileInfo.Save();
}
}
@@ -3050,7 +3050,7 @@ namespace CUETools.Processor
CleanupTags(tags, "CTDBDISCCONFIDENCE");
CleanupTags(tags, "CTDBTRACKCONFIDENCE");
GenerateCTDBTags(tags, -1);
if (Tagging.UpdateTags(_fileInfo, tags, _config))
if (Tagging.UpdateTags(_fileInfo, tags, _config, _config.advanced.UseId3v24))
_fileInfo.Save();
}
else if (_hasTrackFilenames)
@@ -3061,7 +3061,7 @@ namespace CUETools.Processor
CleanupTags(tags, "CTDBDISCCONFIDENCE");
CleanupTags(tags, "CTDBTRACKCONFIDENCE");
GenerateCTDBTags(tags, iTrack);
if (Tagging.UpdateTags(_tracks[iTrack]._fileInfo, tags, _config))
if (Tagging.UpdateTags(_tracks[iTrack]._fileInfo, tags, _config, _config.advanced.UseId3v24))
_tracks[iTrack]._fileInfo.Save();
}
}

View File

@@ -9,7 +9,7 @@ namespace CUETools.Processor
{
public class Tagging
{
public static bool UpdateTags(TagLib.File fileInfo, NameValueCollection tags, CUEConfig config)
public static bool UpdateTags(TagLib.File fileInfo, NameValueCollection tags, CUEToolsCodecsConfig config, bool useId3v24)
{
if (fileInfo is TagLib.Riff.File)
return false;
@@ -29,10 +29,11 @@ namespace CUETools.Processor
}
return true;
}
if (fileInfo is TagLib.Mpeg.AudioFile || (fileInfo is TagLib.UserDefined.File && (fileInfo as TagLib.UserDefined.File).Tagger == CUEToolsTagger.ID3v2))
if (fileInfo is TagLib.Mpeg.AudioFile || (fileInfo is TagLib.UserDefined.File &&
(fileInfo as TagLib.UserDefined.File).Tagger == CUEToolsTagger.ID3v2))
{
var id3v2 = (TagLib.Id3v2.Tag)fileInfo.GetTag(TagLib.TagTypes.Id3v2, true);
id3v2.Version = (byte) (config.advanced.UseId3v24 ? 4 : 3);
id3v2.Version = (byte)(useId3v24 ? 4 : 3);
foreach (string tag in tags.AllKeys)
{
var frame = TagLib.Id3v2.UserTextInformationFrame.Get(id3v2, tag, true);
@@ -56,11 +57,11 @@ namespace CUETools.Processor
return true;
}
public static void UpdateTags(string path, NameValueCollection tags, CUEConfig config)
public static void UpdateTags(string path, NameValueCollection tags, CUEToolsCodecsConfig config, bool useId3v24)
{
TagLib.UserDefined.AdditionalFileTypes.Config = config;
TagLib.File fileInfo = TagLib.File.Create(new TagLib.File.LocalFileAbstraction(path));
if (UpdateTags(fileInfo, tags, config))
if (UpdateTags(fileInfo, tags, config, useId3v24))
fileInfo.Save();
//IAudioSource audioSource = AudioReadWrite.GetAudioSource(path, null, config);
//audioSource.Tags = tags;

View File

@@ -319,9 +319,9 @@ namespace TagLib.UserDefined {
public static class AdditionalFileTypes
{
private static bool inited = false;
private static CUETools.Processor.CUEConfig _config;
private static CUEToolsCodecsConfig _config;
public static CUETools.Processor.CUEConfig Config
public static CUEToolsCodecsConfig Config
{
set
{

View File

@@ -65,6 +65,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libwavpack", "..\wavpack-4.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.ARCUE", "..\CUETools.ARCUE\CUETools.ARCUE.csproj", "{A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}"
ProjectSection(ProjectDependencies) = postProject
{6458A13A-30EF-45A9-9D58-E5031B17BEE2} = {6458A13A-30EF-45A9-9D58-E5031B17BEE2}
{AA2A9A7E-45FB-4632-AD85-85B0E556F818} = {AA2A9A7E-45FB-4632-AD85-85B0E556F818}
EndProjectSection
EndProject

View File

@@ -45,16 +45,16 @@ namespace JDP {
this.checkBoxEditTags = new System.Windows.Forms.CheckBox();
this.checkBoxARVerifyOnEncode = new System.Windows.Forms.CheckBox();
this.checkBoxCTDBVerifyOnEncode = new System.Windows.Forms.CheckBox();
this.tableLayoutPanelVerifyMode = new System.Windows.Forms.TableLayoutPanel();
this.checkBoxSkipRecent = new System.Windows.Forms.CheckBox();
this.checkBoxVerifyUseLocal = new System.Windows.Forms.CheckBox();
this.checkBoxCTDBVerify = new System.Windows.Forms.CheckBox();
this.toolStripCorrectorFormat = new System.Windows.Forms.ToolStrip();
this.toolStripButtonCorrectorOverwrite = new System.Windows.Forms.ToolStripButton();
this.toolStripDropDownButtonCorrectorMode = new System.Windows.Forms.ToolStripDropDownButton();
this.toolStripMenuItemCorrectorModeLocateFiles = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItemCorrectorModeChangeExtension = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripDropDownButtonCorrectorFormat = new System.Windows.Forms.ToolStripDropDownButton();
this.tableLayoutPanelVerifyMode = new System.Windows.Forms.TableLayoutPanel();
this.checkBoxSkipRecent = new System.Windows.Forms.CheckBox();
this.checkBoxVerifyUseLocal = new System.Windows.Forms.CheckBox();
this.checkBoxCTDBVerify = new System.Windows.Forms.CheckBox();
this.grpAudioOutput = new System.Windows.Forms.GroupBox();
this.buttonEncoderSettings = new System.Windows.Forms.Button();
this.labelEncoderMaxMode = new System.Windows.Forms.Label();
@@ -139,8 +139,8 @@ namespace JDP {
this.tableLayoutPanel2.SuspendLayout();
this.groupBoxMode.SuspendLayout();
this.tableLayoutPanelCUEStyle.SuspendLayout();
this.tableLayoutPanelVerifyMode.SuspendLayout();
this.toolStripCorrectorFormat.SuspendLayout();
this.tableLayoutPanelVerifyMode.SuspendLayout();
this.grpAudioOutput.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.trackBarEncoderMode)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxMotd)).BeginInit();
@@ -375,38 +375,6 @@ namespace JDP {
this.toolTip1.SetToolTip(this.checkBoxCTDBVerifyOnEncode, resources.GetString("checkBoxCTDBVerifyOnEncode.ToolTip"));
this.checkBoxCTDBVerifyOnEncode.UseVisualStyleBackColor = true;
//
// tableLayoutPanelVerifyMode
//
resources.ApplyResources(this.tableLayoutPanelVerifyMode, "tableLayoutPanelVerifyMode");
this.tableLayoutPanelVerifyMode.Controls.Add(this.checkBoxSkipRecent, 2, 0);
this.tableLayoutPanelVerifyMode.Controls.Add(this.checkBoxVerifyUseLocal, 1, 0);
this.tableLayoutPanelVerifyMode.Controls.Add(this.checkBoxCTDBVerify, 0, 0);
this.tableLayoutPanelVerifyMode.Name = "tableLayoutPanelVerifyMode";
//
// checkBoxSkipRecent
//
resources.ApplyResources(this.checkBoxSkipRecent, "checkBoxSkipRecent");
this.checkBoxSkipRecent.Image = global::JDP.Properties.Resources.alarm_clock__minus;
this.checkBoxSkipRecent.Name = "checkBoxSkipRecent";
this.toolTip1.SetToolTip(this.checkBoxSkipRecent, resources.GetString("checkBoxSkipRecent.ToolTip"));
this.checkBoxSkipRecent.UseVisualStyleBackColor = true;
//
// checkBoxVerifyUseLocal
//
resources.ApplyResources(this.checkBoxVerifyUseLocal, "checkBoxVerifyUseLocal");
this.checkBoxVerifyUseLocal.Image = global::JDP.Properties.Resources.puzzle__arrow;
this.checkBoxVerifyUseLocal.Name = "checkBoxVerifyUseLocal";
this.toolTip1.SetToolTip(this.checkBoxVerifyUseLocal, resources.GetString("checkBoxVerifyUseLocal.ToolTip"));
this.checkBoxVerifyUseLocal.UseVisualStyleBackColor = true;
//
// checkBoxCTDBVerify
//
resources.ApplyResources(this.checkBoxCTDBVerify, "checkBoxCTDBVerify");
this.checkBoxCTDBVerify.Image = global::JDP.Properties.Resources.cdrepair1;
this.checkBoxCTDBVerify.Name = "checkBoxCTDBVerify";
this.toolTip1.SetToolTip(this.checkBoxCTDBVerify, resources.GetString("checkBoxCTDBVerify.ToolTip"));
this.checkBoxCTDBVerify.UseVisualStyleBackColor = true;
//
// toolStripCorrectorFormat
//
resources.ApplyResources(this.toolStripCorrectorFormat, "toolStripCorrectorFormat");
@@ -457,6 +425,38 @@ namespace JDP {
this.toolStripDropDownButtonCorrectorFormat.Name = "toolStripDropDownButtonCorrectorFormat";
this.toolStripDropDownButtonCorrectorFormat.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.toolStripDropDownButtonCorrectorFormat_DropDownItemClicked);
//
// tableLayoutPanelVerifyMode
//
resources.ApplyResources(this.tableLayoutPanelVerifyMode, "tableLayoutPanelVerifyMode");
this.tableLayoutPanelVerifyMode.Controls.Add(this.checkBoxSkipRecent, 2, 0);
this.tableLayoutPanelVerifyMode.Controls.Add(this.checkBoxVerifyUseLocal, 1, 0);
this.tableLayoutPanelVerifyMode.Controls.Add(this.checkBoxCTDBVerify, 0, 0);
this.tableLayoutPanelVerifyMode.Name = "tableLayoutPanelVerifyMode";
//
// checkBoxSkipRecent
//
resources.ApplyResources(this.checkBoxSkipRecent, "checkBoxSkipRecent");
this.checkBoxSkipRecent.Image = global::JDP.Properties.Resources.alarm_clock__minus;
this.checkBoxSkipRecent.Name = "checkBoxSkipRecent";
this.toolTip1.SetToolTip(this.checkBoxSkipRecent, resources.GetString("checkBoxSkipRecent.ToolTip"));
this.checkBoxSkipRecent.UseVisualStyleBackColor = true;
//
// checkBoxVerifyUseLocal
//
resources.ApplyResources(this.checkBoxVerifyUseLocal, "checkBoxVerifyUseLocal");
this.checkBoxVerifyUseLocal.Image = global::JDP.Properties.Resources.puzzle__arrow;
this.checkBoxVerifyUseLocal.Name = "checkBoxVerifyUseLocal";
this.toolTip1.SetToolTip(this.checkBoxVerifyUseLocal, resources.GetString("checkBoxVerifyUseLocal.ToolTip"));
this.checkBoxVerifyUseLocal.UseVisualStyleBackColor = true;
//
// checkBoxCTDBVerify
//
resources.ApplyResources(this.checkBoxCTDBVerify, "checkBoxCTDBVerify");
this.checkBoxCTDBVerify.Image = global::JDP.Properties.Resources.cdrepair1;
this.checkBoxCTDBVerify.Name = "checkBoxCTDBVerify";
this.toolTip1.SetToolTip(this.checkBoxCTDBVerify, resources.GetString("checkBoxCTDBVerify.ToolTip"));
this.checkBoxCTDBVerify.UseVisualStyleBackColor = true;
//
// grpAudioOutput
//
this.grpAudioOutput.Controls.Add(this.buttonEncoderSettings);
@@ -1083,10 +1083,10 @@ namespace JDP {
this.groupBoxMode.ResumeLayout(false);
this.tableLayoutPanelCUEStyle.ResumeLayout(false);
this.tableLayoutPanelCUEStyle.PerformLayout();
this.tableLayoutPanelVerifyMode.ResumeLayout(false);
this.tableLayoutPanelVerifyMode.PerformLayout();
this.toolStripCorrectorFormat.ResumeLayout(false);
this.toolStripCorrectorFormat.PerformLayout();
this.tableLayoutPanelVerifyMode.ResumeLayout(false);
this.tableLayoutPanelVerifyMode.PerformLayout();
this.grpAudioOutput.ResumeLayout(false);
this.grpAudioOutput.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.trackBarEncoderMode)).EndInit();

File diff suppressed because it is too large Load Diff