mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Add DVD region report to device info
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2011-2021 Natalia Portillo
|
||||
// Copyright © 2021 Rebecca Wallander
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
@@ -36,7 +37,10 @@ using Aaru.CommonTypes.Enums;
|
||||
using Aaru.CommonTypes.Structs.Devices.SCSI;
|
||||
using Aaru.Console;
|
||||
using Aaru.Decoders.ATA;
|
||||
using Aaru.Decoders.DVD;
|
||||
using Aaru.Decoders.SCSI;
|
||||
using Aaru.Decryption;
|
||||
using DVDDecryption = Aaru.Decryption.DVD.Dump;
|
||||
using Aaru.Devices;
|
||||
using Aaru.Helpers;
|
||||
using Inquiry = Aaru.CommonTypes.Structs.Devices.SCSI.Inquiry;
|
||||
@@ -255,6 +259,20 @@ namespace Aaru.Core.Devices.Info
|
||||
if(!sense)
|
||||
MmcConfiguration = confBuf;
|
||||
|
||||
var dvdDecrypt = new DVDDecryption(dev);
|
||||
|
||||
sense = dvdDecrypt.ReadRpc(out byte[] cmdBuf, out _, DvdCssKeyClass.DvdCssCppmOrCprm,
|
||||
dev.Timeout, out _);
|
||||
|
||||
if(!sense)
|
||||
{
|
||||
CSS_CPRM.RegionalPlaybackControlState? rpc =
|
||||
CSS_CPRM.DecodeRegionalPlaybackControlState(cmdBuf);
|
||||
|
||||
if(rpc.HasValue)
|
||||
RPC = rpc;
|
||||
}
|
||||
|
||||
// TODO: DVD drives respond correctly to BD status.
|
||||
// While specification says if no medium is present
|
||||
// it should inform all possible capabilities,
|
||||
|
||||
@@ -34,6 +34,7 @@ using System.Collections.Generic;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.CommonTypes.Structs.Devices.SCSI;
|
||||
using Aaru.Decoders.ATA;
|
||||
using Aaru.Decoders.DVD;
|
||||
using Aaru.Decoders.SCSI;
|
||||
using Aaru.Decoders.SCSI.SSC;
|
||||
using Aaru.Devices;
|
||||
@@ -88,5 +89,6 @@ namespace Aaru.Core.Devices.Info
|
||||
public bool IsCompactFlash { get; }
|
||||
public bool IsPcmcia { get; }
|
||||
public byte[] Cis { get; }
|
||||
public CSS_CPRM.RegionalPlaybackControlState? RPC { get; }
|
||||
}
|
||||
}
|
||||
Submodule Aaru.Decoders updated: 9169073cc4...7e5997d010
@@ -28,6 +28,7 @@
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2011-2021 Natalia Portillo
|
||||
// Copyright © 2021 Rebecca Wallander
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
@@ -43,6 +44,7 @@ using Aaru.Console;
|
||||
using Aaru.Core;
|
||||
using Aaru.Database;
|
||||
using Aaru.Database.Models;
|
||||
using Aaru.Decoders.DVD;
|
||||
using Aaru.Decoders.PCMCIA;
|
||||
using Aaru.Decoders.SCSI;
|
||||
using Aaru.Decoders.SCSI.MMC;
|
||||
@@ -828,6 +830,9 @@ namespace Aaru.Commands.Device
|
||||
}
|
||||
}
|
||||
|
||||
if(devInfo.RPC != null)
|
||||
AaruConsole.WriteLine(CSS_CPRM.PrettifyRegionalPlaybackControlState(devInfo.RPC));
|
||||
|
||||
if(devInfo.PlextorFeatures?.Eeprom != null)
|
||||
{
|
||||
DataFile.WriteTo("Device-Info command", outputPrefix, "_plextor_eeprom.bin", "PLEXTOR READ EEPROM",
|
||||
@@ -1169,4 +1174,4 @@ namespace Aaru.Commands.Device
|
||||
return (int)ErrorNumber.NoError;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user