diff --git a/CUETools.eac3ui/App.config b/CUETools.eac3ui/App.config
new file mode 100644
index 0000000..e0bccd9
--- /dev/null
+++ b/CUETools.eac3ui/App.config
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CUETools.eac3ui/App.xaml b/CUETools.eac3ui/App.xaml
new file mode 100644
index 0000000..4f11c27
--- /dev/null
+++ b/CUETools.eac3ui/App.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/CUETools.eac3ui/App.xaml.cs b/CUETools.eac3ui/App.xaml.cs
new file mode 100644
index 0000000..dbb0c4c
--- /dev/null
+++ b/CUETools.eac3ui/App.xaml.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace CUETools.eac3ui
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/CUETools.eac3ui/CUETools.eac3ui.csproj b/CUETools.eac3ui/CUETools.eac3ui.csproj
new file mode 100644
index 0000000..0358cf8
--- /dev/null
+++ b/CUETools.eac3ui/CUETools.eac3ui.csproj
@@ -0,0 +1,120 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}
+ WinExe
+ CUETools.eac3ui
+ CUETools.eac3ui
+ v4.6.1
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ App.xaml
+ Code
+
+
+ MainWindow.xaml
+ Code
+
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
+
+
+ {1dd41038-d885-46c5-8dde-e0b82f066584}
+ CUETools.CDImage
+
+
+ {e75f7ccd-4266-42e1-a039-dc7eb5edd8f6}
+ CUETools.Codecs.BDLPCM
+
+
+ {6458a13a-30ef-45a9-9d58-e5031b17bee2}
+ CUETools.Codecs
+
+
+ {aa2a9a7e-45fb-4632-ad85-85b0e556f818}
+ CUETools.CTDB
+
+
+ {4911bd82-49ef-4858-8b51-5394f86739a4}
+ CUETools.Processor
+
+
+
+
\ No newline at end of file
diff --git a/CUETools.eac3ui/MainWindow.xaml b/CUETools.eac3ui/MainWindow.xaml
new file mode 100644
index 0000000..948f4ad
--- /dev/null
+++ b/CUETools.eac3ui/MainWindow.xaml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CUETools.eac3ui/MainWindow.xaml.cs b/CUETools.eac3ui/MainWindow.xaml.cs
new file mode 100644
index 0000000..57ac067
--- /dev/null
+++ b/CUETools.eac3ui/MainWindow.xaml.cs
@@ -0,0 +1,122 @@
+using System;
+using System.IO;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+//using System.Windows.Shapes;
+using CUETools.Codecs.BDLPCM;
+using CUETools.CDImage;
+using CUETools.CTDB;
+//using Microsoft.Win32;
+
+namespace CUETools.eac3ui
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ textBoxSource.Text = Properties.Settings.Default.SourceFolder;
+ textBoxDestination.Text = Properties.Settings.Default.DestinationFolder;
+ }
+
+ private void ButtonBrowseSource_Click(object sender, RoutedEventArgs e)
+ {
+ using (var dialog = new System.Windows.Forms.FolderBrowserDialog())
+ {
+ dialog.SelectedPath = textBoxSource.Text;
+ dialog.ShowNewFolderButton = false;
+ System.Windows.Forms.DialogResult result = dialog.ShowDialog();
+ if (result == System.Windows.Forms.DialogResult.OK)
+ textBoxSource.Text = dialog.SelectedPath;
+ }
+ //OpenFileDialog openFileDialog = new OpenFileDialog();
+ //if (openFileDialog.ShowDialog() == true)
+ // textBoxSource.Text = openFileDialog.FileName;
+ }
+
+ private void buttonBrowseDestination_Click(object sender, RoutedEventArgs e)
+ {
+ using (var dialog = new System.Windows.Forms.FolderBrowserDialog())
+ {
+ dialog.SelectedPath = textBoxDestination.Text;
+ System.Windows.Forms.DialogResult result = dialog.ShowDialog();
+ if (result == System.Windows.Forms.DialogResult.OK)
+ textBoxDestination.Text = dialog.SelectedPath;
+ }
+ }
+
+ private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
+ {
+ Properties.Settings.Default.SourceFolder = textBoxSource.Text;
+ Properties.Settings.Default.DestinationFolder = textBoxDestination.Text;
+ Properties.Settings.Default.Save();
+ }
+
+ private void textBoxSource_TextChanged(object sender, TextChangedEventArgs e)
+ {
+ var titleSets = new List();
+ IEnumerable playlists = null;
+ try
+ {
+ playlists = Directory.EnumerateFiles(Path.Combine(Path.Combine(textBoxSource.Text, "BDMV"), "PLAYLIST"));
+ }
+ catch
+ {
+ }
+ if (playlists != null)
+ foreach (var playlist in playlists)
+ {
+ titleSets.Add(new MPLSReader(playlist, null));
+ }
+ cmbTitleSet.ItemsSource = titleSets;
+ cmbTitleSet.SelectedIndex = 0;
+ }
+
+ private void cmbTitleSet_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ cmbMetadata.ItemsSource = new List();
+
+ var audios = new List();
+ if (e.AddedItems.Count == 1)
+ {
+ MPLSReader rdr = e.AddedItems[0] as MPLSReader;
+ rdr.MPLSHeader.play_item.ForEach(i => i.audio.ForEach(v => { if (!audios.Exists(v1 => v1.pid == v.pid)) audios.Add(v); }));
+
+ var chapters = rdr.Chapters;
+ string strtoc = "";
+ for (int i = 0; i < chapters.Count; i++)
+ strtoc += string.Format(" {0}", chapters[i] / 600);
+ strtoc = strtoc.Substring(1);
+ CDImageLayout toc = new CDImageLayout(strtoc);
+ var ctdb = new CUEToolsDB(toc, null);
+ //Console.Error.WriteLine("Contacting CTDB...");
+ ctdb.ContactDB(null, "CUETools.eac3to 2.1.7", "", false, true, CTDBMetadataSearch.Extensive);
+ cmbMetadata.ItemsSource = ctdb.Metadata;
+ cmbMetadata.SelectedIndex = 0;
+ }
+ cmbAudioTrack.ItemsSource = audios;
+ cmbAudioTrack.SelectedIndex = 0;
+ }
+
+ private void cmbAudioTrack_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ if (e.AddedItems.Count == 1)
+ {
+ MPLSStream stream = (MPLSStream)(e.AddedItems[0]);
+ }
+ }
+ }
+}
diff --git a/CUETools.eac3ui/Properties/AssemblyInfo.cs b/CUETools.eac3ui/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..8b293f4
--- /dev/null
+++ b/CUETools.eac3ui/Properties/AssemblyInfo.cs
@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("CUETools.eac3ui")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("CUETools.eac3ui")]
+[assembly: AssemblyCopyright("Copyright © 2018")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+//In order to begin building localizable applications, set
+//CultureYouAreCodingWith in your .csproj file
+//inside a . For example, if you are using US english
+//in your source files, set the to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
+
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/CUETools.eac3ui/Properties/Resources.Designer.cs b/CUETools.eac3ui/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..880bc93
--- /dev/null
+++ b/CUETools.eac3ui/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace CUETools.eac3ui.Properties
+{
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CUETools.eac3ui.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/CUETools.eac3ui/Properties/Resources.resx b/CUETools.eac3ui/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/CUETools.eac3ui/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/CUETools.eac3ui/Properties/Settings.Designer.cs b/CUETools.eac3ui/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..b489b1f
--- /dev/null
+++ b/CUETools.eac3ui/Properties/Settings.Designer.cs
@@ -0,0 +1,50 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace CUETools.eac3ui.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.5.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("")]
+ public string SourceFolder {
+ get {
+ return ((string)(this["SourceFolder"]));
+ }
+ set {
+ this["SourceFolder"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("")]
+ public string DestinationFolder {
+ get {
+ return ((string)(this["DestinationFolder"]));
+ }
+ set {
+ this["DestinationFolder"] = value;
+ }
+ }
+ }
+}
diff --git a/CUETools.eac3ui/Properties/Settings.settings b/CUETools.eac3ui/Properties/Settings.settings
new file mode 100644
index 0000000..19c84e5
--- /dev/null
+++ b/CUETools.eac3ui/Properties/Settings.settings
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CUETools/CUETools.sln b/CUETools/CUETools.sln
index a84636d..07b8ad5 100644
--- a/CUETools/CUETools.sln
+++ b/CUETools/CUETools.sln
@@ -186,6 +186,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Codecs.BDLPCM", ".
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.eac3to", "..\CUETools.eac3to\CUETools.eac3to.csproj", "{E3FF7539-6B22-4922-8FEF-6D26F2C2E3CE}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GUI", "GUI", "{BC0C1801-0212-4ECC-92D5-8F2D6F69E888}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.eac3ui", "..\CUETools.eac3ui\CUETools.eac3ui.csproj", "{678875A6-6B3A-4AAC-83B6-D9A72D9016CF}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -1106,6 +1110,26 @@ Global
{E3FF7539-6B22-4922-8FEF-6D26F2C2E3CE}.Release|Win32.ActiveCfg = Release|Any CPU
{E3FF7539-6B22-4922-8FEF-6D26F2C2E3CE}.Release|x64.ActiveCfg = Release|Any CPU
{E3FF7539-6B22-4922-8FEF-6D26F2C2E3CE}.Release|x86.ActiveCfg = Release|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Debug|Win32.Build.0 = Debug|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Debug|x64.Build.0 = Debug|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Debug|x86.Build.0 = Debug|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Release|Win32.ActiveCfg = Release|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Release|Win32.Build.0 = Release|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Release|x64.ActiveCfg = Release|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Release|x64.Build.0 = Release|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Release|x86.ActiveCfg = Release|Any CPU
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1163,6 +1187,7 @@ Global
{082D6B9E-326E-4D15-9798-DE70A6EDAE9E} = {93B7AE1D-DEF6-4A04-A222-5CDE09DF262D}
{E75F7CCD-4266-42E1-A039-DC7EB5EDD8F6} = {93B7AE1D-DEF6-4A04-A222-5CDE09DF262D}
{E3FF7539-6B22-4922-8FEF-6D26F2C2E3CE} = {4B59E09C-A51F-4B80-91BE-987904DCEF7D}
+ {678875A6-6B3A-4AAC-83B6-D9A72D9016CF} = {BC0C1801-0212-4ECC-92D5-8F2D6F69E888}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C634D169-5814-4203-94B6-6A11371DDA95}