From 39d11a44ca956bbcd168d69bf9734c9e598d0224 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Thu, 5 Oct 2023 01:52:47 +0100 Subject: [PATCH] Fix naming. --- DVD/CSS.cs | 8 ++++---- DVD/MPEG.cs | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/DVD/CSS.cs b/DVD/CSS.cs index 787eb9c..fd02048 100644 --- a/DVD/CSS.cs +++ b/DVD/CSS.cs @@ -721,7 +721,7 @@ public class CSS static bool IsEncrypted(byte? cmi, byte[]? key, IReadOnlyList sector) { // Only MPEG packets can be encrypted. - if(!MPEG.IsMpegPacket(sector)) + if(!Mpeg.IsMpegPacket(sector)) return false; // The CMI tells us the sector is not encrypted. @@ -733,9 +733,9 @@ public class CSS return false; // These packet types cannot be encrypted - if(sector[17] == (byte)MPEG.Mpeg2StreamId.SystemHeader || - sector[17] == (byte)MPEG.Mpeg2StreamId.PaddingStream || - sector[17] == (byte)MPEG.Mpeg2StreamId.PrivateStream2) + if(sector[17] == (byte)Mpeg.Mpeg2StreamId.SystemHeader || + sector[17] == (byte)Mpeg.Mpeg2StreamId.PaddingStream || + sector[17] == (byte)Mpeg.Mpeg2StreamId.PrivateStream2) return false; // MPEG Packetized Elementary Stream scrambling control value diff --git a/DVD/MPEG.cs b/DVD/MPEG.cs index 1650026..42320dd 100644 --- a/DVD/MPEG.cs +++ b/DVD/MPEG.cs @@ -46,7 +46,7 @@ using System.Runtime.InteropServices; namespace Aaru.Decryption.DVD; [SuppressMessage("ReSharper", "UnusedType.Global")] -public class MPEG +public class Mpeg { #region Mpeg2StreamId enum @@ -61,7 +61,7 @@ public class MPEG PrivateStream2 = 0xBF, EcmStream = 0xF0, EmmStream = 0xF1, - ItuTRecH222_0_or_IsoIec13818_1AnnexA_or_IsoIec13818_6DsmccStream = 0xF2, + ItuTRecH222_0_Or_IsoIec13818_1AnnexA_Or_IsoIec13818_6DsmccStream = 0xF2, IsoIec13522Stream = 0xF3, ItuTRecH222_1TypeA = 0xF4, ItuTRecH222_1TypeB = 0xF5, @@ -155,13 +155,13 @@ public class MPEG public struct MpegHeader { [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public byte[] startCode; - public byte packIdentifier; + public byte[] StartCode; + public byte PackIdentifier; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] - public byte[] scrBlock; + public byte[] SCRBlock; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public byte[] programMuxRateBlock; - byte packStuffingLengthBlock; + public byte[] ProgramMuxRateBlock; + byte _packStuffingLengthBlock; } #endregion