mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Add support for dumping the 2nd layer PFI of DVDs.
This commit is contained in:
@@ -420,6 +420,33 @@ partial class Dump
|
||||
DiskCategory.UMD => MediaType.UMD,
|
||||
_ => MediaType.DVDROM
|
||||
};
|
||||
|
||||
if(nullablePfi.Value.Layers > 1)
|
||||
{
|
||||
sense = _dev.ReadDiscStructure(out cmdBuf,
|
||||
out _,
|
||||
MmcDiscStructureMediaType.Dvd,
|
||||
0,
|
||||
1,
|
||||
MmcDiscStructureFormat.PhysicalInformation,
|
||||
0,
|
||||
_dev.Timeout,
|
||||
out _);
|
||||
|
||||
if(!sense)
|
||||
{
|
||||
PFI.PhysicalFormatInformation? layer2Pfi = PFI.Decode(cmdBuf, dskType);
|
||||
|
||||
if(layer2Pfi.HasValue)
|
||||
{
|
||||
tmpBuf = new byte[cmdBuf.Length - 4];
|
||||
Array.Copy(cmdBuf, 4, tmpBuf, 0, cmdBuf.Length - 4);
|
||||
mediaTags.Add(MediaTagType.DVD_PFI_2ndLayer, tmpBuf);
|
||||
|
||||
UpdateStatus?.Invoke("Layer 2 PFI:\n" + PFI.Prettify(layer2Pfi.Value));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -566,6 +566,20 @@ public static class ImageInfo
|
||||
}
|
||||
}
|
||||
|
||||
if(imageFormat.Info.ReadableMediaTags?.Contains(MediaTagType.DVD_PFI_2ndLayer) == true)
|
||||
{
|
||||
errno = imageFormat.ReadMediaTag(MediaTagType.DVD_PFI_2ndLayer, out byte[] pfi);
|
||||
|
||||
if(errno == ErrorNumber.NoError)
|
||||
{
|
||||
AaruLogging.WriteLine(Localization.Core
|
||||
.DVD_2nd_layer_Physical_Format_Information_contained_in_image_WithMarkup);
|
||||
|
||||
AaruLogging.Write(PFI.Prettify(pfi, imageFormat.Info.MediaType));
|
||||
AaruLogging.WriteLine();
|
||||
}
|
||||
}
|
||||
|
||||
if(imageFormat.Info.ReadableMediaTags?.Contains(MediaTagType.DVDRAM_DDS) == true)
|
||||
{
|
||||
errno = imageFormat.ReadMediaTag(MediaTagType.DVDRAM_DDS, out byte[] dds);
|
||||
|
||||
Reference in New Issue
Block a user