diff options
Diffstat (limited to 'DvdLib/Ifo')
| -rw-r--r-- | DvdLib/Ifo/AudioAttributes.cs | 36 | ||||
| -rw-r--r-- | DvdLib/Ifo/Dvd.cs | 16 | ||||
| -rw-r--r-- | DvdLib/Ifo/PgcCommandTable.cs | 17 | ||||
| -rw-r--r-- | DvdLib/Ifo/ProgramChain.cs | 4 | ||||
| -rw-r--r-- | DvdLib/Ifo/VideoAttributes.cs | 46 |
5 files changed, 8 insertions, 111 deletions
diff --git a/DvdLib/Ifo/AudioAttributes.cs b/DvdLib/Ifo/AudioAttributes.cs deleted file mode 100644 index b76f9fc05..000000000 --- a/DvdLib/Ifo/AudioAttributes.cs +++ /dev/null @@ -1,36 +0,0 @@ -namespace DvdLib.Ifo -{ - public enum AudioCodec - { - AC3 = 0, - MPEG1 = 2, - MPEG2ext = 3, - LPCM = 4, - DTS = 6, - } - - public enum ApplicationMode - { - Unspecified = 0, - Karaoke = 1, - Surround = 2, - } - - public class AudioAttributes - { - public readonly AudioCodec Codec; - public readonly bool MultichannelExtensionPresent; - public readonly ApplicationMode Mode; - public readonly byte QuantDRC; - public readonly byte SampleRate; - public readonly byte Channels; - public readonly ushort LanguageCode; - public readonly byte LanguageExtension; - public readonly byte CodeExtension; - } - - public class MultiChannelExtension - { - - } -} diff --git a/DvdLib/Ifo/Dvd.cs b/DvdLib/Ifo/Dvd.cs index f784be83e..90125fa3e 100644 --- a/DvdLib/Ifo/Dvd.cs +++ b/DvdLib/Ifo/Dvd.cs @@ -26,17 +26,17 @@ namespace DvdLib.Ifo if (vmgPath == null) { - var allIfos = allFiles.Where(i => string.Equals(i.Extension, ".ifo", StringComparison.OrdinalIgnoreCase)); - - foreach (var ifo in allIfos) + foreach (var ifo in allFiles) { - var num = ifo.Name.Split('_').ElementAtOrDefault(1); - var numbersRead = new List<ushort>(); + if (!string.Equals(ifo.Extension, ".ifo", StringComparison.OrdinalIgnoreCase)) + { + continue; + } - if (!string.IsNullOrEmpty(num) && ushort.TryParse(num, out var ifoNumber) && !numbersRead.Contains(ifoNumber)) + var nums = ifo.Name.Split(new [] { '_' }, StringSplitOptions.RemoveEmptyEntries); + if (nums.Length >= 2 && ushort.TryParse(nums[1], out var ifoNumber)) { ReadVTS(ifoNumber, ifo.FullName); - numbersRead.Add(ifoNumber); } } } @@ -76,7 +76,7 @@ namespace DvdLib.Ifo } } - private void ReadVTS(ushort vtsNum, List<FileSystemMetadata> allFiles) + private void ReadVTS(ushort vtsNum, IEnumerable<FileSystemMetadata> allFiles) { var filename = string.Format("VTS_{0:00}_0.IFO", vtsNum); diff --git a/DvdLib/Ifo/PgcCommandTable.cs b/DvdLib/Ifo/PgcCommandTable.cs deleted file mode 100644 index d329fcba2..000000000 --- a/DvdLib/Ifo/PgcCommandTable.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; - -namespace DvdLib.Ifo -{ - public class ProgramChainCommandTable - { - public readonly ushort LastByteAddress; - public readonly List<VirtualMachineCommand> PreCommands; - public readonly List<VirtualMachineCommand> PostCommands; - public readonly List<VirtualMachineCommand> CellCommands; - } - - public class VirtualMachineCommand - { - public readonly byte[] Command; - } -} diff --git a/DvdLib/Ifo/ProgramChain.cs b/DvdLib/Ifo/ProgramChain.cs index 80889738f..7b003005b 100644 --- a/DvdLib/Ifo/ProgramChain.cs +++ b/DvdLib/Ifo/ProgramChain.cs @@ -25,13 +25,10 @@ namespace DvdLib.Ifo public byte[] SubpictureStreamControl { get; private set; } // 32*4 entries private ushort _nextProgramNumber; - public readonly ProgramChain Next; private ushort _prevProgramNumber; - public readonly ProgramChain Previous; private ushort _goupProgramNumber; - public readonly ProgramChain Goup; // ?? maybe Group public ProgramPlaybackMode PlaybackMode { get; private set; } public uint ProgramCount { get; private set; } @@ -40,7 +37,6 @@ namespace DvdLib.Ifo public byte[] Palette { get; private set; } // 16*4 entries private ushort _commandTableOffset; - public readonly ProgramChainCommandTable CommandTable; private ushort _programMapOffset; private ushort _cellPlaybackOffset; diff --git a/DvdLib/Ifo/VideoAttributes.cs b/DvdLib/Ifo/VideoAttributes.cs deleted file mode 100644 index 8b3996715..000000000 --- a/DvdLib/Ifo/VideoAttributes.cs +++ /dev/null @@ -1,46 +0,0 @@ -namespace DvdLib.Ifo -{ - public enum VideoCodec - { - MPEG1 = 0, - MPEG2 = 1, - } - - public enum VideoFormat - { - NTSC = 0, - PAL = 1, - } - - public enum AspectRatio - { - ar4to3 = 0, - ar16to9 = 3 - } - - public enum FilmMode - { - None = -1, - Camera = 0, - Film = 1, - } - - public class VideoAttributes - { - public readonly VideoCodec Codec; - public readonly VideoFormat Format; - public readonly AspectRatio Aspect; - public readonly bool AutomaticPanScan; - public readonly bool AutomaticLetterBox; - public readonly bool Line21CCField1; - public readonly bool Line21CCField2; - public readonly int Width; - public readonly int Height; - public readonly bool Letterboxed; - public readonly FilmMode FilmMode; - - public VideoAttributes() - { - } - } -} |
