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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user