mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Reformatted.
This commit is contained in:
@@ -126,7 +126,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
if(response == null)
|
||||
return null;
|
||||
|
||||
if (response.Length != 8)
|
||||
if(response.Length != 8)
|
||||
return null;
|
||||
|
||||
LeadInCopyright cmi = new LeadInCopyright();
|
||||
@@ -144,13 +144,13 @@ namespace DiscImageChef.Decoders.DVD
|
||||
|
||||
public static string PrettifyLeadInCopyright(LeadInCopyright? cmi)
|
||||
{
|
||||
if (cmi == null)
|
||||
if(cmi == null)
|
||||
return null;
|
||||
|
||||
LeadInCopyright decoded = cmi.Value;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
switch (decoded.CopyrightType)
|
||||
switch(decoded.CopyrightType)
|
||||
{
|
||||
case CopyrightType.NoProtection:
|
||||
sb.AppendLine("Disc has no encryption.");
|
||||
@@ -169,31 +169,31 @@ namespace DiscImageChef.Decoders.DVD
|
||||
break;
|
||||
}
|
||||
|
||||
if (decoded.CopyrightType == 0)
|
||||
if(decoded.CopyrightType == 0)
|
||||
return sb.ToString();
|
||||
|
||||
if (decoded.RegionInformation == 0xFF)
|
||||
if(decoded.RegionInformation == 0xFF)
|
||||
sb.AppendLine("Disc cannot be played in any region at all.");
|
||||
else if (decoded.RegionInformation == 0x00)
|
||||
else if(decoded.RegionInformation == 0x00)
|
||||
sb.AppendLine("Disc can be played in any region.");
|
||||
else
|
||||
{
|
||||
sb.Append("Disc can be played in the following regions:");
|
||||
if ((decoded.RegionInformation & 0x01) != 0x01)
|
||||
if((decoded.RegionInformation & 0x01) != 0x01)
|
||||
sb.Append(" 0");
|
||||
if ((decoded.RegionInformation & 0x02) != 0x02)
|
||||
if((decoded.RegionInformation & 0x02) != 0x02)
|
||||
sb.Append(" 1");
|
||||
if ((decoded.RegionInformation & 0x04) != 0x04)
|
||||
if((decoded.RegionInformation & 0x04) != 0x04)
|
||||
sb.Append(" 2");
|
||||
if ((decoded.RegionInformation & 0x08) != 0x08)
|
||||
if((decoded.RegionInformation & 0x08) != 0x08)
|
||||
sb.Append(" 3");
|
||||
if ((decoded.RegionInformation & 0x10) != 0x10)
|
||||
if((decoded.RegionInformation & 0x10) != 0x10)
|
||||
sb.Append(" 4");
|
||||
if ((decoded.RegionInformation & 0x20) != 0x20)
|
||||
if((decoded.RegionInformation & 0x20) != 0x20)
|
||||
sb.Append(" 5");
|
||||
if ((decoded.RegionInformation & 0x40) != 0x40)
|
||||
if((decoded.RegionInformation & 0x40) != 0x40)
|
||||
sb.Append(" 6");
|
||||
if ((decoded.RegionInformation & 0x80) != 0x80)
|
||||
if((decoded.RegionInformation & 0x80) != 0x80)
|
||||
sb.Append(" 7");
|
||||
}
|
||||
|
||||
|
||||
@@ -128,10 +128,10 @@ namespace DiscImageChef.Decoders.DVD
|
||||
|
||||
public static MediumStatus? Decode(byte[] response)
|
||||
{
|
||||
if (response == null)
|
||||
if(response == null)
|
||||
return null;
|
||||
|
||||
if (response.Length != 8)
|
||||
if(response.Length != 8)
|
||||
return null;
|
||||
|
||||
MediumStatus status = new MediumStatus();
|
||||
@@ -155,25 +155,25 @@ namespace DiscImageChef.Decoders.DVD
|
||||
|
||||
public static string Prettify(MediumStatus? status)
|
||||
{
|
||||
if (status == null)
|
||||
if(status == null)
|
||||
return null;
|
||||
|
||||
MediumStatus decoded = status.Value;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
if (decoded.PWP)
|
||||
if(decoded.PWP)
|
||||
sb.AppendLine("Disc surface is set to write protected status");
|
||||
|
||||
if (decoded.Cartridge)
|
||||
if(decoded.Cartridge)
|
||||
{
|
||||
sb.AppendLine("Disc comes in a cartridge");
|
||||
if (decoded.OUT)
|
||||
if(decoded.OUT)
|
||||
sb.AppendLine("Disc has been extracted from the cartridge");
|
||||
if (decoded.CWP)
|
||||
if(decoded.CWP)
|
||||
sb.AppendLine("Cartridge is set to write protected");
|
||||
}
|
||||
|
||||
switch (decoded.DiscType)
|
||||
switch(decoded.DiscType)
|
||||
{
|
||||
case 0:
|
||||
sb.AppendLine("Disc shall not be written without a cartridge");
|
||||
@@ -186,9 +186,9 @@ namespace DiscImageChef.Decoders.DVD
|
||||
break;
|
||||
}
|
||||
|
||||
if (decoded.MSWI)
|
||||
if(decoded.MSWI)
|
||||
{
|
||||
switch (decoded.RAMSWI)
|
||||
switch(decoded.RAMSWI)
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
|
||||
@@ -201,17 +201,17 @@ namespace DiscImageChef.Decoders.DVD
|
||||
|
||||
public static DiscDefinitionStructure? Decode(byte[] response)
|
||||
{
|
||||
if (response == null)
|
||||
if(response == null)
|
||||
return null;
|
||||
|
||||
if (response.Length != 2052)
|
||||
if(response.Length != 2052)
|
||||
return null;
|
||||
|
||||
DiscDefinitionStructure dds = new DiscDefinitionStructure();
|
||||
|
||||
dds.Identifier = (ushort)((response[4] << 8) + response[5]);
|
||||
|
||||
if (dds.Identifier != 0x0A0A)
|
||||
if(dds.Identifier != 0x0A0A)
|
||||
return null;
|
||||
|
||||
// Common to both DVD-RAM versions
|
||||
@@ -226,7 +226,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
dds.Groups = (ushort)((response[12] << 8) + response[13]);
|
||||
|
||||
// ECMA-272
|
||||
if (dds.Groups == 24)
|
||||
if(dds.Groups == 24)
|
||||
{
|
||||
dds.PartialCertification |= (response[7] & 0x40) == 0x40;
|
||||
dds.FormattingOnlyAGroup |= (response[7] & 0x20) == 0x20;
|
||||
@@ -234,7 +234,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
dds.Reserved = new byte[6];
|
||||
Array.Copy(response, 14, dds.Reserved, 0, 6);
|
||||
dds.GroupCertificationFlags = new GroupCertificationFlag[24];
|
||||
for (int i = 0; i < 24; i++)
|
||||
for(int i = 0; i < 24; i++)
|
||||
{
|
||||
dds.GroupCertificationFlags[i].InProcess |= (response[20 + i] & 0x80) == 0x80;
|
||||
dds.GroupCertificationFlags[i].PartialCertification |= (response[20 + i] & 0x40) == 0x40;
|
||||
@@ -245,7 +245,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
}
|
||||
|
||||
// ECMA-330
|
||||
if (dds.Groups == 1)
|
||||
if(dds.Groups == 1)
|
||||
{
|
||||
dds.Reserved4 = (byte)((response[7] & 0x7C) >> 2);
|
||||
dds.Reserved = new byte[68];
|
||||
@@ -256,7 +256,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
dds.LSN0Location = (uint)((response[93] << 16) + (response[94] << 8) + response[95]);
|
||||
dds.StartLSNForZone = new uint[dds.Zones];
|
||||
|
||||
for (int i = 0; i < dds.Zones; i++)
|
||||
for(int i = 0; i < dds.Zones; i++)
|
||||
dds.StartLSNForZone[i] = (uint)((response[260 + i * 4 + 1] << 16) + (response[260 + i * 4 + 2] << 8) + response[260 + i * 4 + 3]);
|
||||
}
|
||||
|
||||
@@ -265,53 +265,53 @@ namespace DiscImageChef.Decoders.DVD
|
||||
|
||||
public static string Prettify(DiscDefinitionStructure? dds)
|
||||
{
|
||||
if (dds == null)
|
||||
if(dds == null)
|
||||
return null;
|
||||
|
||||
DiscDefinitionStructure decoded = dds.Value;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
if (decoded.InProcess)
|
||||
if(decoded.InProcess)
|
||||
{
|
||||
sb.AppendLine("Formatting in progress.");
|
||||
if (decoded.Groups == 24)
|
||||
if(decoded.Groups == 24)
|
||||
{
|
||||
if (decoded.PartialCertification)
|
||||
if(decoded.PartialCertification)
|
||||
sb.AppendLine("Formatting is only using partial certification");
|
||||
if (decoded.FormattingOnlyAGroup)
|
||||
if(decoded.FormattingOnlyAGroup)
|
||||
sb.AppendLine("Only a group is being formatted");
|
||||
}
|
||||
}
|
||||
|
||||
if (decoded.UserCertification)
|
||||
if(decoded.UserCertification)
|
||||
sb.AppendLine("Disc has been certified by an user");
|
||||
if (decoded.ManufacturerCertification)
|
||||
if(decoded.ManufacturerCertification)
|
||||
sb.AppendLine("Disc has been certified by a manufacturer");
|
||||
|
||||
sb.AppendFormat("DDS has been updated {0} times", decoded.UpdateCount).AppendLine();
|
||||
|
||||
if (decoded.Groups == 24)
|
||||
if(decoded.Groups == 24)
|
||||
{
|
||||
for (int i = 0; i < decoded.GroupCertificationFlags.Length; i++)
|
||||
for(int i = 0; i < decoded.GroupCertificationFlags.Length; i++)
|
||||
{
|
||||
if(decoded.GroupCertificationFlags[i].InProcess)
|
||||
{
|
||||
sb.AppendFormat("Group {0} is being formatted", i).AppendLine();
|
||||
if (decoded.GroupCertificationFlags[i].PartialCertification)
|
||||
if(decoded.GroupCertificationFlags[i].PartialCertification)
|
||||
sb.AppendFormat("Group {0} is being certified partially", i).AppendLine();
|
||||
}
|
||||
if (decoded.GroupCertificationFlags[i].UserCertification)
|
||||
if(decoded.GroupCertificationFlags[i].UserCertification)
|
||||
sb.AppendFormat("Group {0} has been certified by an user", i).AppendLine();
|
||||
}
|
||||
}
|
||||
|
||||
if (decoded.Groups == 1)
|
||||
if(decoded.Groups == 1)
|
||||
{
|
||||
sb.AppendFormat("Disc has {0} zones", decoded.Zones).AppendLine();
|
||||
sb.AppendFormat("Primary Spare Area stats at PSN {0:X}h and ends at PSN {1:X}h, inclusively", decoded.SpareAreaFirstPSN, decoded.SpareAreaLastPSN).AppendLine();
|
||||
sb.AppendFormat("LSN 0 is at PSN {0:X}h", decoded.LSN0Location).AppendLine();
|
||||
|
||||
for (int i = 0; i < decoded.StartLSNForZone.Length; i++)
|
||||
for(int i = 0; i < decoded.StartLSNForZone.Length; i++)
|
||||
sb.AppendFormat("Zone {0} starts at LSN {1}", i, decoded.StartLSNForZone[i]).AppendLine();
|
||||
}
|
||||
|
||||
|
||||
@@ -1054,10 +1054,10 @@ namespace DiscImageChef.Decoders.DVD
|
||||
|
||||
public static PhysicalFormatInformation? Decode(byte[] response)
|
||||
{
|
||||
if (response == null)
|
||||
if(response == null)
|
||||
return null;
|
||||
|
||||
if (response.Length < 2052)
|
||||
if(response.Length < 2052)
|
||||
return null;
|
||||
|
||||
PhysicalFormatInformation pfi = new PhysicalFormatInformation();
|
||||
@@ -1084,17 +1084,17 @@ namespace DiscImageChef.Decoders.DVD
|
||||
pfi.BCA |= (response[20] & 0x80) == 0x80;
|
||||
|
||||
// UMD
|
||||
if (pfi.DiskCategory == DiskCategory.UMD)
|
||||
if(pfi.DiskCategory == DiskCategory.UMD)
|
||||
{
|
||||
pfi.MediaAttribute = (ushort)((response[21] << 8) + response[22]);
|
||||
}
|
||||
|
||||
// DVD-RAM
|
||||
if (pfi.DiskCategory == DiskCategory.DVDRAM)
|
||||
if(pfi.DiskCategory == DiskCategory.DVDRAM)
|
||||
{
|
||||
pfi.DiscType = (DVDRAMDiscType)response[36];
|
||||
|
||||
if (pfi.PartVersion == 1)
|
||||
if(pfi.PartVersion == 1)
|
||||
{
|
||||
pfi.Velocity = response[52];
|
||||
pfi.ReadPower = response[53];
|
||||
@@ -1115,7 +1115,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
pfi.LastPulseEndGroove = response[68];
|
||||
pfi.BiasPowerDurationGroove = response[69];
|
||||
}
|
||||
else if (pfi.PartVersion == 6)
|
||||
else if(pfi.PartVersion == 6)
|
||||
{
|
||||
pfi.Velocity = response[504];
|
||||
pfi.ReadPower = response[505];
|
||||
@@ -1187,8 +1187,8 @@ namespace DiscImageChef.Decoders.DVD
|
||||
}
|
||||
|
||||
// DVD-R and DVD-RW
|
||||
if ((pfi.DiskCategory == DiskCategory.DVDR &&
|
||||
pfi.PartVersion < 6) ||
|
||||
if((pfi.DiskCategory == DiskCategory.DVDR &&
|
||||
pfi.PartVersion < 6) ||
|
||||
(pfi.DiskCategory == DiskCategory.DVDRW &&
|
||||
pfi.PartVersion < 3))
|
||||
{
|
||||
@@ -1197,7 +1197,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
}
|
||||
|
||||
// DVD+RW
|
||||
if (pfi.DiskCategory == DiskCategory.DVDPRW)
|
||||
if(pfi.DiskCategory == DiskCategory.DVDPRW)
|
||||
{
|
||||
pfi.RecordingVelocity = response[36];
|
||||
pfi.ReadPowerMaxVelocity = response[37];
|
||||
@@ -1221,7 +1221,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
}
|
||||
|
||||
// DVD+R, DVD+RW, DVD+R DL and DVD+RW DL
|
||||
if (pfi.DiskCategory == DiskCategory.DVDPR ||
|
||||
if(pfi.DiskCategory == DiskCategory.DVDPR ||
|
||||
pfi.DiskCategory == DiskCategory.DVDPRW ||
|
||||
pfi.DiskCategory == DiskCategory.DVDPRDL ||
|
||||
pfi.DiskCategory == DiskCategory.DVDPRWDL)
|
||||
@@ -1240,7 +1240,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
}
|
||||
|
||||
// DVD+RW
|
||||
if (pfi.DiskCategory == DiskCategory.DVDPRW &&
|
||||
if(pfi.DiskCategory == DiskCategory.DVDPRW &&
|
||||
pfi.PartVersion == 2)
|
||||
{
|
||||
pfi.TopFirstPulseDuration = response[55];
|
||||
@@ -1251,7 +1251,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
}
|
||||
|
||||
// DVD+R and DVD+R DL
|
||||
if (pfi.DiskCategory == DiskCategory.DVDPR ||
|
||||
if(pfi.DiskCategory == DiskCategory.DVDPR ||
|
||||
pfi.DiskCategory == DiskCategory.DVDPRDL)
|
||||
{
|
||||
pfi.PrimaryVelocity = response[36];
|
||||
@@ -1281,13 +1281,13 @@ namespace DiscImageChef.Decoders.DVD
|
||||
}
|
||||
|
||||
// DVD+R DL
|
||||
if (pfi.DiskCategory == DiskCategory.DVDPRDL)
|
||||
if(pfi.DiskCategory == DiskCategory.DVDPRDL)
|
||||
{
|
||||
pfi.LayerStructure = (DVDLayerStructure)((response[34] & 0xC0) >> 6);
|
||||
}
|
||||
|
||||
// DVD+RW DL
|
||||
if (pfi.DiskCategory == DiskCategory.DVDPRWDL)
|
||||
if(pfi.DiskCategory == DiskCategory.DVDPRWDL)
|
||||
{
|
||||
pfi.BasicPrimaryVelocity = response[36];
|
||||
pfi.MaxReadPowerPrimaryVelocity = response[37];
|
||||
@@ -1310,8 +1310,8 @@ namespace DiscImageChef.Decoders.DVD
|
||||
}
|
||||
|
||||
// DVD-R DL and DVD-RW DL
|
||||
if ((pfi.DiskCategory == DiskCategory.DVDR &&
|
||||
pfi.PartVersion == 6) ||
|
||||
if((pfi.DiskCategory == DiskCategory.DVDR &&
|
||||
pfi.PartVersion == 6) ||
|
||||
(pfi.DiskCategory == DiskCategory.DVDRW &&
|
||||
pfi.PartVersion == 3))
|
||||
{
|
||||
@@ -1340,14 +1340,14 @@ namespace DiscImageChef.Decoders.DVD
|
||||
|
||||
public static string Prettify(PhysicalFormatInformation? pfi)
|
||||
{
|
||||
if (pfi == null)
|
||||
if(pfi == null)
|
||||
return null;
|
||||
|
||||
PhysicalFormatInformation decoded = pfi.Value;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
string sizeString;
|
||||
switch (decoded.DiscSize)
|
||||
switch(decoded.DiscSize)
|
||||
{
|
||||
case DVDSize.Eighty:
|
||||
sizeString = "80mm";
|
||||
@@ -1362,18 +1362,18 @@ namespace DiscImageChef.Decoders.DVD
|
||||
|
||||
string categorySentence = "Disc is a {0} {1} version {2}";
|
||||
|
||||
switch (decoded.DiskCategory)
|
||||
switch(decoded.DiskCategory)
|
||||
{
|
||||
case DiskCategory.DVDROM:
|
||||
sb.AppendFormat(categorySentence, sizeString, "DVD-ROM", decoded.PartVersion).AppendLine();
|
||||
if (decoded.DiscSize == DVDSize.OneTwenty && decoded.PartVersion == 1)
|
||||
if(decoded.DiscSize == DVDSize.OneTwenty && decoded.PartVersion == 1)
|
||||
sb.AppendLine("Disc claims conformation to ECMA-267");
|
||||
if (decoded.DiscSize == DVDSize.Eighty && decoded.PartVersion == 1)
|
||||
if(decoded.DiscSize == DVDSize.Eighty && decoded.PartVersion == 1)
|
||||
sb.AppendLine("Disc claims conformation to ECMA-268");
|
||||
break;
|
||||
case DiskCategory.DVDRAM:
|
||||
sb.AppendFormat(categorySentence, sizeString, "DVD-RAM", decoded.PartVersion).AppendLine();
|
||||
switch (decoded.PartVersion)
|
||||
switch(decoded.PartVersion)
|
||||
{
|
||||
case 1:
|
||||
sb.AppendLine("Disc claims conformation to ECMA-272");
|
||||
@@ -1388,7 +1388,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
sb.AppendFormat(categorySentence, sizeString, "DVD-R DL", decoded.PartVersion).AppendLine();
|
||||
else
|
||||
sb.AppendFormat(categorySentence, sizeString, "DVD-R", decoded.PartVersion).AppendLine();
|
||||
switch (decoded.PartVersion)
|
||||
switch(decoded.PartVersion)
|
||||
{
|
||||
case 1:
|
||||
sb.AppendLine("Disc claims conformation to ECMA-279");
|
||||
@@ -1406,7 +1406,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
sb.AppendFormat(categorySentence, sizeString, "DVD-RW DL", decoded.PartVersion).AppendLine();
|
||||
else
|
||||
sb.AppendFormat(categorySentence, sizeString, "DVD-RW", decoded.PartVersion).AppendLine();
|
||||
switch (decoded.PartVersion)
|
||||
switch(decoded.PartVersion)
|
||||
{
|
||||
case 2:
|
||||
sb.AppendLine("Disc claims conformation to ECMA-338");
|
||||
@@ -1421,7 +1421,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
sb.AppendFormat(categorySentence, "60mm", "UMD", decoded.PartVersion).AppendLine();
|
||||
else
|
||||
sb.AppendFormat(categorySentence, "invalid size", "UMD", decoded.PartVersion).AppendLine();
|
||||
switch (decoded.PartVersion)
|
||||
switch(decoded.PartVersion)
|
||||
{
|
||||
case 0:
|
||||
sb.AppendLine("Disc claims conformation to ECMA-365");
|
||||
@@ -1430,7 +1430,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
break;
|
||||
case DiskCategory.DVDPRW:
|
||||
sb.AppendFormat(categorySentence, sizeString, "DVD+RW", decoded.PartVersion).AppendLine();
|
||||
switch (decoded.PartVersion)
|
||||
switch(decoded.PartVersion)
|
||||
{
|
||||
case 1:
|
||||
sb.AppendLine("Disc claims conformation to ECMA-274");
|
||||
@@ -1445,7 +1445,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
break;
|
||||
case DiskCategory.DVDPR:
|
||||
sb.AppendFormat(categorySentence, sizeString, "DVD+R", decoded.PartVersion).AppendLine();
|
||||
switch (decoded.PartVersion)
|
||||
switch(decoded.PartVersion)
|
||||
{
|
||||
case 1:
|
||||
sb.AppendLine("Disc claims conformation to ECMA-349");
|
||||
@@ -1454,7 +1454,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
break;
|
||||
case DiskCategory.DVDPRWDL:
|
||||
sb.AppendFormat(categorySentence, sizeString, "DVD+RW DL", decoded.PartVersion).AppendLine();
|
||||
switch (decoded.PartVersion)
|
||||
switch(decoded.PartVersion)
|
||||
{
|
||||
case 1:
|
||||
sb.AppendLine("Disc claims conformation to ECMA-374");
|
||||
@@ -1463,7 +1463,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
break;
|
||||
case DiskCategory.DVDPRDL:
|
||||
sb.AppendFormat(categorySentence, sizeString, "DVD+R DL", decoded.PartVersion).AppendLine();
|
||||
switch (decoded.PartVersion)
|
||||
switch(decoded.PartVersion)
|
||||
{
|
||||
case 1:
|
||||
sb.AppendLine("Disc claims conformation to ECMA-364");
|
||||
@@ -1471,11 +1471,11 @@ namespace DiscImageChef.Decoders.DVD
|
||||
}
|
||||
break;
|
||||
case DiskCategory.Nintendo:
|
||||
if (decoded.PartVersion == 15)
|
||||
if(decoded.PartVersion == 15)
|
||||
{
|
||||
if (decoded.DiscSize == DVDSize.Eighty)
|
||||
if(decoded.DiscSize == DVDSize.Eighty)
|
||||
sb.AppendLine("Disc is a Nintendo Gamecube Optical Disc (GOD)");
|
||||
else if (decoded.DiscSize == DVDSize.OneTwenty)
|
||||
else if(decoded.DiscSize == DVDSize.OneTwenty)
|
||||
sb.AppendLine("Disc is a Nintendo Wii Optical Disc (WOD)");
|
||||
else
|
||||
goto default;
|
||||
@@ -1500,7 +1500,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
break;
|
||||
}
|
||||
|
||||
switch (decoded.MaximumRate)
|
||||
switch(decoded.MaximumRate)
|
||||
{
|
||||
case MaximumRateField.TwoMbps:
|
||||
sb.AppendLine("Disc maximum transfer rate is 2,52 Mbit/sec.");
|
||||
@@ -1526,12 +1526,12 @@ namespace DiscImageChef.Decoders.DVD
|
||||
}
|
||||
|
||||
sb.AppendFormat("Disc has {0} layers", decoded.Layers + 1).AppendLine();
|
||||
if (decoded.TrackPath && decoded.Layers == 1)
|
||||
if(decoded.TrackPath && decoded.Layers == 1)
|
||||
sb.AppendLine("Layers are in parallel track path");
|
||||
else if (!decoded.TrackPath && decoded.Layers == 1)
|
||||
else if(!decoded.TrackPath && decoded.Layers == 1)
|
||||
sb.AppendLine("Layers are in opposite track path");
|
||||
|
||||
switch (decoded.LinearDensity)
|
||||
switch(decoded.LinearDensity)
|
||||
{
|
||||
case LinearDensityField.TwoSix:
|
||||
sb.AppendLine("Pitch size is 0,267 μm/bit");
|
||||
@@ -1559,7 +1559,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
break;
|
||||
}
|
||||
|
||||
switch (decoded.TrackDensity)
|
||||
switch(decoded.TrackDensity)
|
||||
{
|
||||
case TrackDensityField.Seven:
|
||||
sb.AppendLine("Track size is 0,74 μm");
|
||||
@@ -1581,13 +1581,13 @@ namespace DiscImageChef.Decoders.DVD
|
||||
break;
|
||||
}
|
||||
|
||||
if (decoded.DataAreaStartPSN > 0)
|
||||
if(decoded.DataAreaStartPSN > 0)
|
||||
{
|
||||
if (decoded.DataAreaEndPSN > 0)
|
||||
if(decoded.DataAreaEndPSN > 0)
|
||||
{
|
||||
sb.AppendFormat("Data area starts at PSN {0:X}h", decoded.DataAreaStartPSN).AppendLine();
|
||||
sb.AppendFormat("Data area ends at PSN {0:X}h", decoded.DataAreaEndPSN).AppendLine();
|
||||
if (decoded.Layers == 1 && !decoded.TrackPath)
|
||||
if(decoded.Layers == 1 && !decoded.TrackPath)
|
||||
sb.AppendFormat("Layer 0 ends at PSN {0:X}h", decoded.Layer0EndPSN).AppendLine();
|
||||
}
|
||||
else
|
||||
@@ -1596,15 +1596,15 @@ namespace DiscImageChef.Decoders.DVD
|
||||
else
|
||||
sb.AppendLine("Disc is empty");
|
||||
|
||||
if (decoded.BCA)
|
||||
if(decoded.BCA)
|
||||
sb.AppendLine("Disc has a burst cutting area");
|
||||
|
||||
if (decoded.DiskCategory == DiskCategory.UMD)
|
||||
if(decoded.DiskCategory == DiskCategory.UMD)
|
||||
sb.AppendFormat("Media attribute is {0}", decoded.MediaAttribute).AppendLine();
|
||||
|
||||
if (decoded.DiskCategory == DiskCategory.DVDRAM)
|
||||
if(decoded.DiskCategory == DiskCategory.DVDRAM)
|
||||
{
|
||||
switch (decoded.DiscType)
|
||||
switch(decoded.DiscType)
|
||||
{
|
||||
case DVDRAMDiscType.Cased:
|
||||
sb.AppendLine("Disc shall be recorded with a case");
|
||||
@@ -1617,15 +1617,15 @@ namespace DiscImageChef.Decoders.DVD
|
||||
break;
|
||||
}
|
||||
|
||||
if (decoded.PartVersion == 6)
|
||||
if(decoded.PartVersion == 6)
|
||||
{
|
||||
sb.AppendFormat("Disc manufacturer is {0}", decoded.DiskManufacturer).AppendLine();
|
||||
sb.AppendFormat("Disc manufacturer supplementary information is {0}", decoded.DiskManufacturerSupplementary).AppendLine();
|
||||
}
|
||||
}
|
||||
|
||||
if ((decoded.DiskCategory == DiskCategory.DVDR &&
|
||||
decoded.PartVersion < 6) ||
|
||||
if((decoded.DiskCategory == DiskCategory.DVDR &&
|
||||
decoded.PartVersion < 6) ||
|
||||
(decoded.DiskCategory == DiskCategory.DVDRW &&
|
||||
decoded.PartVersion < 3))
|
||||
{
|
||||
@@ -1633,12 +1633,12 @@ namespace DiscImageChef.Decoders.DVD
|
||||
sb.AppendFormat("Next Border-In first sector is PSN {0:X}h", decoded.NextBorderInSector).AppendLine();
|
||||
}
|
||||
|
||||
if (decoded.DiskCategory == DiskCategory.DVDPR ||
|
||||
if(decoded.DiskCategory == DiskCategory.DVDPR ||
|
||||
decoded.DiskCategory == DiskCategory.DVDPRW ||
|
||||
decoded.DiskCategory == DiskCategory.DVDPRDL ||
|
||||
decoded.DiskCategory == DiskCategory.DVDPRWDL)
|
||||
{
|
||||
if (decoded.VCPS)
|
||||
if(decoded.VCPS)
|
||||
sb.AppendLine("Disc contains extended information for VCPS");
|
||||
sb.AppendFormat("Disc application code is {0}", decoded.ApplicationCode).AppendLine();
|
||||
sb.AppendFormat("Disc manufacturer is {0}", decoded.DiskManufacturerID).AppendLine();
|
||||
@@ -1646,18 +1646,18 @@ namespace DiscImageChef.Decoders.DVD
|
||||
sb.AppendFormat("Disc product revision is {0}", decoded.ProductRevision).AppendLine();
|
||||
}
|
||||
|
||||
if ((decoded.DiskCategory == DiskCategory.DVDR &&
|
||||
decoded.PartVersion >= 6) ||
|
||||
if((decoded.DiskCategory == DiskCategory.DVDR &&
|
||||
decoded.PartVersion >= 6) ||
|
||||
(decoded.DiskCategory == DiskCategory.DVDRW &&
|
||||
decoded.PartVersion >= 3))
|
||||
{
|
||||
sb.AppendFormat("Current RMD in extra Border zone starts at PSN {0:X}h", decoded.CurrentRMDExtraBorderPSN).AppendLine();
|
||||
sb.AppendFormat("PFI in extra Border zone starts at PSN {0:X}h", decoded.PFIExtraBorderPSN).AppendLine();
|
||||
if (!decoded.PreRecordedControlDataInv)
|
||||
if(!decoded.PreRecordedControlDataInv)
|
||||
sb.AppendLine("Control Data Zone is pre-recorded");
|
||||
if (decoded.PreRecordedLeadIn)
|
||||
if(decoded.PreRecordedLeadIn)
|
||||
sb.AppendLine("Lead-In is pre-recorded");
|
||||
if (decoded.PreRecordedLeadOut)
|
||||
if(decoded.PreRecordedLeadOut)
|
||||
sb.AppendLine("Lead-Out is pre-recorded");
|
||||
}
|
||||
|
||||
|
||||
@@ -93,10 +93,10 @@ namespace DiscImageChef.Decoders.DVD
|
||||
|
||||
public static SpareAreaInformation? Decode(byte[] response)
|
||||
{
|
||||
if (response == null)
|
||||
if(response == null)
|
||||
return null;
|
||||
|
||||
if (response.Length != 16)
|
||||
if(response.Length != 16)
|
||||
return null;
|
||||
|
||||
SpareAreaInformation sai = new SpareAreaInformation();
|
||||
@@ -113,7 +113,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
|
||||
public static string Prettify(SpareAreaInformation? sai)
|
||||
{
|
||||
if (sai == null)
|
||||
if(sai == null)
|
||||
return null;
|
||||
|
||||
SpareAreaInformation decoded = sai.Value;
|
||||
|
||||
Reference in New Issue
Block a user