mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
Renamed CUETools.Codecs.BLDLPCM into CUETools.Codecs.MPEG
This commit is contained in:
@@ -2,8 +2,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using CUETools.Codecs.MPEG;
|
||||||
|
|
||||||
namespace CUETools.Codecs.BDLPCM
|
namespace CUETools.Codecs.MPEG.BDLPCM
|
||||||
{
|
{
|
||||||
public class AudioDecoder : IAudioSource
|
public class AudioDecoder : IAudioSource
|
||||||
{
|
{
|
||||||
@@ -4,7 +4,7 @@ using System.ComponentModel;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace CUETools.Codecs.BDLPCM
|
namespace CUETools.Codecs.MPEG.BDLPCM
|
||||||
{
|
{
|
||||||
[JsonObject(MemberSerialization.OptIn)]
|
[JsonObject(MemberSerialization.OptIn)]
|
||||||
public class DecoderSettings : IAudioDecoderSettings
|
public class DecoderSettings : IAudioDecoderSettings
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net40;net20;netstandard2.0</TargetFrameworks>
|
<TargetFrameworks>net40;net20;netstandard2.0</TargetFrameworks>
|
||||||
<Version>2.1.7.0</Version>
|
<Version>2.1.7.0</Version>
|
||||||
<AssemblyName>CUETools.Codecs.BDLPCM</AssemblyName>
|
<AssemblyName>CUETools.Codecs.MPEG</AssemblyName>
|
||||||
<RootNamespace>CUETools.Codecs</RootNamespace>
|
<RootNamespace>CUETools.Codecs.MPEG</RootNamespace>
|
||||||
<Product>CUETools</Product>
|
<Product>CUETools</Product>
|
||||||
<Description>A library for encoding and decoding BluRay Disc LPCM audio.</Description>
|
<Description>A library for encoding and decoding BluRay Disc LPCM audio.</Description>
|
||||||
<Copyright>Copyright (c) 2008-2018 Grigory Chudov</Copyright>
|
<Copyright>Copyright (c) 2008-2018 Grigory Chudov</Copyright>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace CUETools.Codecs.BDLPCM
|
namespace CUETools.Codecs.MPEG
|
||||||
{
|
{
|
||||||
internal unsafe class FrameReader
|
internal unsafe class FrameReader
|
||||||
{
|
{
|
||||||
@@ -1,19 +1,18 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
|
||||||
using System.IO;
|
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
namespace CUETools.Codecs.BDLPCM
|
namespace CUETools.Codecs.MPEG.MPLS
|
||||||
{
|
{
|
||||||
public class MPLSDecoder : IAudioSource
|
public class AudioDecoder : IAudioSource
|
||||||
{
|
{
|
||||||
public unsafe MPLSDecoder(string path, Stream IO, ushort pid)
|
public unsafe AudioDecoder(string path, Stream IO, ushort pid)
|
||||||
: this(new MPLS.DecoderSettings() { StreamId = pid }, path, IO)
|
: this(new DecoderSettings() { StreamId = pid }, path, IO)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public unsafe MPLSDecoder(MPLS.DecoderSettings settings, string path, Stream IO)
|
public unsafe AudioDecoder(DecoderSettings settings, string path, Stream IO)
|
||||||
{
|
{
|
||||||
m_settings = settings;
|
m_settings = settings;
|
||||||
_path = path;
|
_path = path;
|
||||||
@@ -23,7 +22,7 @@ namespace CUETools.Codecs.BDLPCM
|
|||||||
if (_IO.Read(contents, 0, length) != length) throw new Exception("");
|
if (_IO.Read(contents, 0, length) != length) throw new Exception("");
|
||||||
fixed (byte* ptr = &contents[0])
|
fixed (byte* ptr = &contents[0])
|
||||||
{
|
{
|
||||||
FrameReader fr = new FrameReader(ptr, length);
|
var fr = new FrameReader(ptr, length);
|
||||||
hdr_m = parseHeader(fr);
|
hdr_m = parseHeader(fr);
|
||||||
fr = new FrameReader(ptr + hdr_m.list_pos, length - hdr_m.list_pos);
|
fr = new FrameReader(ptr + hdr_m.list_pos, length - hdr_m.list_pos);
|
||||||
parsePlaylist(fr);
|
parsePlaylist(fr);
|
||||||
@@ -34,7 +33,7 @@ namespace CUETools.Codecs.BDLPCM
|
|||||||
|
|
||||||
void openEntries()
|
void openEntries()
|
||||||
{
|
{
|
||||||
readers = new List<AudioDecoder>();
|
readers = new List<BDLPCM.AudioDecoder>();
|
||||||
var pids = new List<int>();
|
var pids = new List<int>();
|
||||||
foreach (var item in hdr_m.play_item)
|
foreach (var item in hdr_m.play_item)
|
||||||
foreach (var audio in item.audio)
|
foreach (var audio in item.audio)
|
||||||
@@ -68,7 +67,7 @@ namespace CUETools.Codecs.BDLPCM
|
|||||||
var m2ts = System.IO.Path.Combine(
|
var m2ts = System.IO.Path.Combine(
|
||||||
System.IO.Path.Combine(parent.FullName, "STREAM"),
|
System.IO.Path.Combine(parent.FullName, "STREAM"),
|
||||||
item.clip_id + ".m2ts");
|
item.clip_id + ".m2ts");
|
||||||
var entry = new AudioDecoder(m2ts, null, chosenPid);
|
var entry = new BDLPCM.AudioDecoder(m2ts, null, chosenPid);
|
||||||
readers.Add(entry);
|
readers.Add(entry);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -97,7 +96,7 @@ namespace CUETools.Codecs.BDLPCM
|
|||||||
void parsePlaylist(FrameReader parentFr)
|
void parsePlaylist(FrameReader parentFr)
|
||||||
{
|
{
|
||||||
uint len = parentFr.read_uint();
|
uint len = parentFr.read_uint();
|
||||||
FrameReader fr = new FrameReader(parentFr, len);
|
var fr = new FrameReader(parentFr, len);
|
||||||
parentFr.skip(len);
|
parentFr.skip(len);
|
||||||
ushort reserved = fr.read_ushort();
|
ushort reserved = fr.read_ushort();
|
||||||
hdr_m.list_count = fr.read_ushort();
|
hdr_m.list_count = fr.read_ushort();
|
||||||
@@ -109,7 +108,7 @@ namespace CUETools.Codecs.BDLPCM
|
|||||||
void parsePlaylistMarks(FrameReader parentFr)
|
void parsePlaylistMarks(FrameReader parentFr)
|
||||||
{
|
{
|
||||||
uint len = parentFr.read_uint();
|
uint len = parentFr.read_uint();
|
||||||
FrameReader fr = new FrameReader(parentFr, len);
|
var fr = new FrameReader(parentFr, len);
|
||||||
parentFr.skip(len);
|
parentFr.skip(len);
|
||||||
hdr_m.mark_count = fr.read_ushort();
|
hdr_m.mark_count = fr.read_ushort();
|
||||||
for (int ii = 0; ii < hdr_m.mark_count; ii++)
|
for (int ii = 0; ii < hdr_m.mark_count; ii++)
|
||||||
@@ -125,7 +124,7 @@ namespace CUETools.Codecs.BDLPCM
|
|||||||
|
|
||||||
// PlayItem Length
|
// PlayItem Length
|
||||||
ushort len = parentFr.read_ushort();
|
ushort len = parentFr.read_ushort();
|
||||||
FrameReader fr = new FrameReader(parentFr, len);
|
var fr = new FrameReader(parentFr, len);
|
||||||
parentFr.skip(len);
|
parentFr.skip(len);
|
||||||
|
|
||||||
// Primary Clip identifer
|
// Primary Clip identifer
|
||||||
@@ -195,7 +194,7 @@ namespace CUETools.Codecs.BDLPCM
|
|||||||
MPLSStream s = new MPLSStream();
|
MPLSStream s = new MPLSStream();
|
||||||
|
|
||||||
byte len = parentFr.read_byte();
|
byte len = parentFr.read_byte();
|
||||||
FrameReader fr = new FrameReader(parentFr, len);
|
var fr = new FrameReader(parentFr, len);
|
||||||
parentFr.skip(len);
|
parentFr.skip(len);
|
||||||
|
|
||||||
s.stream_type = fr.read_byte();
|
s.stream_type = fr.read_byte();
|
||||||
@@ -435,10 +434,10 @@ namespace CUETools.Codecs.BDLPCM
|
|||||||
byte[] contents;
|
byte[] contents;
|
||||||
|
|
||||||
AudioPCMConfig pcm;
|
AudioPCMConfig pcm;
|
||||||
List<AudioDecoder> readers;
|
List<BDLPCM.AudioDecoder> readers;
|
||||||
AudioDecoder currentReader;
|
BDLPCM.AudioDecoder currentReader;
|
||||||
MPLSHeader hdr_m;
|
MPLSHeader hdr_m;
|
||||||
MPLS.DecoderSettings m_settings;
|
DecoderSettings m_settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct MPLSPlaylistMark
|
public struct MPLSPlaylistMark
|
||||||
@@ -4,7 +4,7 @@ using System.ComponentModel;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace CUETools.Codecs.MPLS
|
namespace CUETools.Codecs.MPEG.MPLS
|
||||||
{
|
{
|
||||||
[JsonObject(MemberSerialization.OptIn)]
|
[JsonObject(MemberSerialization.OptIn)]
|
||||||
public class DecoderSettings : IAudioDecoderSettings
|
public class DecoderSettings : IAudioDecoderSettings
|
||||||
@@ -17,7 +17,7 @@ namespace CUETools.Codecs.MPLS
|
|||||||
public string Name => "cuetools";
|
public string Name => "cuetools";
|
||||||
|
|
||||||
[Browsable(false)]
|
[Browsable(false)]
|
||||||
public Type DecoderType => typeof(BDLPCM.MPLSDecoder);
|
public Type DecoderType => typeof(AudioDecoder);
|
||||||
|
|
||||||
[Browsable(false)]
|
[Browsable(false)]
|
||||||
public int Priority => 2;
|
public int Priority => 2;
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace CUETools.Codecs.BDLPCM
|
namespace CUETools.Codecs.MPEG
|
||||||
{
|
{
|
||||||
internal class TsStream
|
internal class TsStream
|
||||||
{
|
{
|
||||||
@@ -111,4 +111,13 @@ namespace CUETools.Codecs.ffmpegdll
|
|||||||
this.Init();
|
this.Init();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public class MpegDecoderSettings : DecoderSettings, IAudioDecoderSettings
|
||||||
|
{
|
||||||
|
public override string Extension => "aob";
|
||||||
|
public override string Format => "mpeg";
|
||||||
|
public MpegDecoderSettings()
|
||||||
|
{
|
||||||
|
this.Init();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -88,6 +88,7 @@ namespace CUETools.Codecs
|
|||||||
formats.Add("ogg", new CUEToolsFormat("ogg", CUEToolsTagger.TagLibSharp, false, true, false, true, null, encodersViewModel.GetDefault("ogg", false), null));
|
formats.Add("ogg", new CUEToolsFormat("ogg", CUEToolsTagger.TagLibSharp, false, true, false, true, null, encodersViewModel.GetDefault("ogg", false), null));
|
||||||
formats.Add("opus", new CUEToolsFormat("opus", CUEToolsTagger.TagLibSharp, false, true, false, true, null, encodersViewModel.GetDefault("opus", false), null));
|
formats.Add("opus", new CUEToolsFormat("opus", CUEToolsTagger.TagLibSharp, false, true, false, true, null, encodersViewModel.GetDefault("opus", false), null));
|
||||||
formats.Add("mlp", new CUEToolsFormat("mlp", CUEToolsTagger.APEv2, true, false, false, false, null, null, decodersViewModel.GetDefault("mlp")));
|
formats.Add("mlp", new CUEToolsFormat("mlp", CUEToolsTagger.APEv2, true, false, false, false, null, null, decodersViewModel.GetDefault("mlp")));
|
||||||
|
formats.Add("aob", new CUEToolsFormat("aob", CUEToolsTagger.APEv2, true, false, false, false, null, null, decodersViewModel.GetDefault("aob")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<ProjectReference Include="..\CUETools.Codecs\CUETools.Codecs.csproj" />
|
<ProjectReference Include="..\CUETools.Codecs\CUETools.Codecs.csproj" />
|
||||||
<ProjectReference Include="..\CUETools.Processor\CUETools.Processor.csproj" />
|
<ProjectReference Include="..\CUETools.Processor\CUETools.Processor.csproj" />
|
||||||
<ProjectReference Include="..\CUETools.CTDB\CUETools.CTDB.csproj" />
|
<ProjectReference Include="..\CUETools.CTDB\CUETools.CTDB.csproj" />
|
||||||
<ProjectReference Include="..\CUETools.Codecs.BDLPCM\CUETools.Codecs.BDLPCM.csproj" />
|
<ProjectReference Include="..\CUETools.Codecs.MPEG\CUETools.Codecs.MPEG.csproj" />
|
||||||
<ProjectReference Include="..\CUETools.CDImage\CUETools.CDImage.csproj" />
|
<ProjectReference Include="..\CUETools.CDImage\CUETools.CDImage.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using CUETools.CDImage;
|
using CUETools.CDImage;
|
||||||
using CUETools.Codecs;
|
using CUETools.Codecs;
|
||||||
using CUETools.Codecs.BDLPCM;
|
|
||||||
using CUETools.CTDB;
|
using CUETools.CTDB;
|
||||||
using CUETools.Processor;
|
using CUETools.Processor;
|
||||||
using System;
|
using System;
|
||||||
@@ -124,8 +123,8 @@ namespace CUETools.eac3to
|
|||||||
{
|
{
|
||||||
IAudioSource audioSource = null;
|
IAudioSource audioSource = null;
|
||||||
IAudioDest audioDest = null;
|
IAudioDest audioDest = null;
|
||||||
var videos = new List<MPLSStream>();
|
var videos = new List<Codecs.MPEG.MPLS.MPLSStream>();
|
||||||
var audios = new List<MPLSStream>();
|
var audios = new List<Codecs.MPEG.MPLS.MPLSStream>();
|
||||||
List<uint> chapters;
|
List<uint> chapters;
|
||||||
TimeSpan duration;
|
TimeSpan duration;
|
||||||
TagLib.UserDefined.AdditionalFileTypes.Config = config;
|
TagLib.UserDefined.AdditionalFileTypes.Config = config;
|
||||||
@@ -136,7 +135,7 @@ namespace CUETools.eac3to
|
|||||||
{
|
{
|
||||||
if (true)
|
if (true)
|
||||||
{
|
{
|
||||||
var mpls = new MPLSDecoder(new Codecs.MPLS.DecoderSettings(), sourceFile, null);
|
var mpls = new Codecs.MPEG.MPLS.AudioDecoder(new Codecs.MPEG.MPLS.DecoderSettings(), sourceFile, null);
|
||||||
audioSource = mpls;
|
audioSource = mpls;
|
||||||
Console.ForegroundColor = ConsoleColor.White;
|
Console.ForegroundColor = ConsoleColor.White;
|
||||||
int frameRate = 0;
|
int frameRate = 0;
|
||||||
@@ -310,14 +309,14 @@ namespace CUETools.eac3to
|
|||||||
|
|
||||||
throw new Exception("Unknown encoder format: " + destFile);
|
throw new Exception("Unknown encoder format: " + destFile);
|
||||||
}
|
}
|
||||||
if (audioSource is MPLSDecoder)
|
if (audioSource is Codecs.MPEG.MPLS.AudioDecoder)
|
||||||
{
|
{
|
||||||
if (stream - chapterStreams <= videos.Count)
|
if (stream - chapterStreams <= videos.Count)
|
||||||
throw new Exception("Video extraction not supported.");
|
throw new Exception("Video extraction not supported.");
|
||||||
if (stream - chapterStreams - videos.Count > audios.Count)
|
if (stream - chapterStreams - videos.Count > audios.Count)
|
||||||
throw new Exception(string.Format("The source file doesn't contain a track with the number {0}.", stream));
|
throw new Exception(string.Format("The source file doesn't contain a track with the number {0}.", stream));
|
||||||
int pid = audios[stream - chapterStreams - videos.Count - 1].pid;
|
int pid = audios[stream - chapterStreams - videos.Count - 1].pid;
|
||||||
(audioSource.Settings as Codecs.MPLS.DecoderSettings).StreamId = pid;
|
(audioSource.Settings as Codecs.MPEG.MPLS.DecoderSettings).StreamId = pid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,9 +105,9 @@
|
|||||||
<Project>{1dd41038-d885-46c5-8dde-e0b82f066584}</Project>
|
<Project>{1dd41038-d885-46c5-8dde-e0b82f066584}</Project>
|
||||||
<Name>CUETools.CDImage</Name>
|
<Name>CUETools.CDImage</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\CUETools.Codecs.BDLPCM\CUETools.Codecs.BDLPCM.csproj">
|
<ProjectReference Include="..\CUETools.Codecs.MPEG\CUETools.Codecs.MPEG.csproj">
|
||||||
<Project>{e75f7ccd-4266-42e1-a039-dc7eb5edd8f6}</Project>
|
<Project>{e75f7ccd-4266-42e1-a039-dc7eb5edd8f6}</Project>
|
||||||
<Name>CUETools.Codecs.BDLPCM</Name>
|
<Name>CUETools.Codecs.MPEG</Name>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\CUETools.Codecs.Flake\CUETools.Codecs.Flake.csproj">
|
<ProjectReference Include="..\CUETools.Codecs.Flake\CUETools.Codecs.Flake.csproj">
|
||||||
|
|||||||
@@ -1,28 +1,17 @@
|
|||||||
using System;
|
using CUETools.CDImage;
|
||||||
using System.IO;
|
using CUETools.Codecs;
|
||||||
|
using CUETools.CTDB;
|
||||||
|
using CUETools.Processor;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Data;
|
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 System.ComponentModel;
|
|
||||||
using Krystalware.UploadHelper;
|
|
||||||
using CUETools.Codecs;
|
|
||||||
//using CUETools.Codecs.Flake;
|
|
||||||
using CUETools.Processor;
|
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
//using Microsoft.Win32;
|
|
||||||
|
|
||||||
namespace BluTools
|
namespace BluTools
|
||||||
{
|
{
|
||||||
@@ -75,7 +64,7 @@ namespace BluTools
|
|||||||
|
|
||||||
private void textBoxSource_TextChanged(object sender, TextChangedEventArgs e)
|
private void textBoxSource_TextChanged(object sender, TextChangedEventArgs e)
|
||||||
{
|
{
|
||||||
var titleSets = new List<MPLSDecoder>();
|
var titleSets = new List<CUETools.Codecs.MPEG.MPLS.AudioDecoder>();
|
||||||
IEnumerable<string> playlists = null;
|
IEnumerable<string> playlists = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -87,7 +76,7 @@ namespace BluTools
|
|||||||
if (playlists != null)
|
if (playlists != null)
|
||||||
foreach (var playlist in playlists)
|
foreach (var playlist in playlists)
|
||||||
{
|
{
|
||||||
var title = new MPLSDecoder(new CUETools.Codecs.MPLS.DecoderSettings(), playlist, null);
|
var title = new CUETools.Codecs.MPEG.MPLS.AudioDecoder(new CUETools.Codecs.MPEG.MPLS.DecoderSettings(), playlist, null);
|
||||||
if (filterDups)
|
if (filterDups)
|
||||||
{
|
{
|
||||||
if (titleSets.Exists(title2 =>
|
if (titleSets.Exists(title2 =>
|
||||||
@@ -125,10 +114,10 @@ namespace BluTools
|
|||||||
cmbMetadata.ItemsSource = new List<CTDBResponseMeta>();
|
cmbMetadata.ItemsSource = new List<CTDBResponseMeta>();
|
||||||
ctdb = null;
|
ctdb = null;
|
||||||
|
|
||||||
var audios = new List<MPLSStream>();
|
var audios = new List<CUETools.Codecs.MPEG.MPLS.MPLSStream>();
|
||||||
if (e.AddedItems.Count == 1)
|
if (e.AddedItems.Count == 1)
|
||||||
{
|
{
|
||||||
MPLSDecoder rdr = e.AddedItems[0] as MPLSDecoder;
|
var rdr = e.AddedItems[0] as CUETools.Codecs.MPEG.MPLS.AudioDecoder;
|
||||||
rdr.MPLSHeader.play_item.ForEach(i => i.audio.ForEach(v => { if (!audios.Exists(v1 => v1.pid == v.pid)) audios.Add(v); }));
|
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;
|
var chapters = rdr.Chapters;
|
||||||
@@ -190,7 +179,7 @@ namespace BluTools
|
|||||||
{
|
{
|
||||||
if (e.AddedItems.Count == 1)
|
if (e.AddedItems.Count == 1)
|
||||||
{
|
{
|
||||||
MPLSStream stream = (MPLSStream)(e.AddedItems[0]);
|
CUETools.Codecs.MPEG.MPLS.MPLSStream stream = (CUETools.Codecs.MPEG.MPLS.MPLSStream)(e.AddedItems[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,7 +189,7 @@ namespace BluTools
|
|||||||
BackgroundWorker workerExtract;
|
BackgroundWorker workerExtract;
|
||||||
CUEMetadataEntry metaresult;
|
CUEMetadataEntry metaresult;
|
||||||
ObservableCollection<CUEMetadataEntry> metaresults;
|
ObservableCollection<CUEMetadataEntry> metaresults;
|
||||||
MPLSDecoder chosenReader;
|
CUETools.Codecs.MPEG.MPLS.AudioDecoder chosenReader;
|
||||||
ushort pid;
|
ushort pid;
|
||||||
string outputFolderPath;
|
string outputFolderPath;
|
||||||
string outputAudioPath;
|
string outputAudioPath;
|
||||||
@@ -213,8 +202,8 @@ namespace BluTools
|
|||||||
private void buttonExtract_Click(object sender, RoutedEventArgs e)
|
private void buttonExtract_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (cmbTitleSet.SelectedItem == null) return;
|
if (cmbTitleSet.SelectedItem == null) return;
|
||||||
pid = ((MPLSStream)cmbAudioTrack.SelectedItem).pid;
|
pid = ((CUETools.Codecs.MPEG.MPLS.MPLSStream)cmbAudioTrack.SelectedItem).pid;
|
||||||
chosenReader = cmbTitleSet.SelectedItem as MPLSDecoder;
|
chosenReader = cmbTitleSet.SelectedItem as CUETools.Codecs.MPEG.MPLS.AudioDecoder;
|
||||||
metaresult = cmbMetadata.SelectedItem as CUEMetadataEntry;
|
metaresult = cmbMetadata.SelectedItem as CUEMetadataEntry;
|
||||||
outputFolderPath = Path.Combine(textBoxDestination.Text, metaresult != null ?
|
outputFolderPath = Path.Combine(textBoxDestination.Text, metaresult != null ?
|
||||||
metaresult.metadata.Artist + " - " + metaresult.metadata.Year + " - " + metaresult.metadata.Title :
|
metaresult.metadata.Artist + " - " + metaresult.metadata.Year + " - " + metaresult.metadata.Title :
|
||||||
@@ -239,10 +228,10 @@ namespace BluTools
|
|||||||
|
|
||||||
void workerExtract_DoWork(object sender, DoWorkEventArgs e)
|
void workerExtract_DoWork(object sender, DoWorkEventArgs e)
|
||||||
{
|
{
|
||||||
MPLSDecoder reader = null;
|
CUETools.Codecs.MPEG.MPLS.AudioDecoder reader = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
reader = new MPLSDecoder(chosenReader.Path, null, pid);
|
reader = new CUETools.Codecs.MPEG.MPLS.AudioDecoder(chosenReader.Path, null, pid);
|
||||||
Directory.CreateDirectory(outputFolderPath);
|
Directory.CreateDirectory(outputFolderPath);
|
||||||
if (File.Exists(outputCuePath)) throw new Exception(string.Format("File \"{0}\" already exists", outputCuePath));
|
if (File.Exists(outputCuePath)) throw new Exception(string.Format("File \"{0}\" already exists", outputCuePath));
|
||||||
if (File.Exists(outputAudioPath)) throw new Exception(string.Format("File \"{0}\" already exists", outputAudioPath));
|
if (File.Exists(outputAudioPath)) throw new Exception(string.Format("File \"{0}\" already exists", outputAudioPath));
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WindowsMediaLib", "..\Third
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CUETools.Codecs.WMA", "..\CUETools.Codecs.WMA\CUETools.Codecs.WMA.csproj", "{082D6B9E-326E-4D15-9798-DE70A6EDAE9E}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CUETools.Codecs.WMA", "..\CUETools.Codecs.WMA\CUETools.Codecs.WMA.csproj", "{082D6B9E-326E-4D15-9798-DE70A6EDAE9E}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CUETools.Codecs.BDLPCM", "..\CUETools.Codecs.BDLPCM\CUETools.Codecs.BDLPCM.csproj", "{E75F7CCD-4266-42E1-A039-DC7EB5EDD8F6}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CUETools.Codecs.BDLPCM", "..\CUETools.Codecs.MPEG\CUETools.Codecs.MPEG.csproj", "{E75F7CCD-4266-42E1-A039-DC7EB5EDD8F6}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CUETools.eac3to", "..\CUETools.eac3to\CUETools.eac3to.csproj", "{E3FF7539-6B22-4922-8FEF-6D26F2C2E3CE}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CUETools.eac3to", "..\CUETools.eac3to\CUETools.eac3to.csproj", "{E3FF7539-6B22-4922-8FEF-6D26F2C2E3CE}"
|
||||||
EndProject
|
EndProject
|
||||||
|
|||||||
Reference in New Issue
Block a user