mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Read disc information.
This commit is contained in:
@@ -165,6 +165,31 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
mediaTags.Add(MediaTagType.CD_ATIP, tmpBuf);
|
mediaTags.Add(MediaTagType.CD_ATIP, tmpBuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dumpLog.WriteLine("Reading Disc Information");
|
||||||
|
UpdateStatus?.Invoke("Reading Disc Information");
|
||||||
|
|
||||||
|
sense = dev.ReadDiscInformation(out cmdBuf, out senseBuf, MmcDiscInformationDataTypes.DiscInformation,
|
||||||
|
dev.Timeout, out _);
|
||||||
|
|
||||||
|
if(!sense)
|
||||||
|
{
|
||||||
|
DiscInformation.StandardDiscInformation? discInfo = DiscInformation.Decode000b(cmdBuf);
|
||||||
|
|
||||||
|
if(discInfo.HasValue &&
|
||||||
|
dskType == MediaType.CD)
|
||||||
|
switch(discInfo.Value.DiscType)
|
||||||
|
{
|
||||||
|
case 0x10:
|
||||||
|
dskType = MediaType.CDI;
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 0x20:
|
||||||
|
dskType = MediaType.CDROMXA;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Dumps a compact disc</summary>
|
/// <summary>Dumps a compact disc</summary>
|
||||||
@@ -190,32 +215,6 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
byte[] tmpBuf;
|
byte[] tmpBuf;
|
||||||
|
|
||||||
int sessions = 1;
|
int sessions = 1;
|
||||||
|
|
||||||
dumpLog.WriteLine("Reading Disc Information");
|
|
||||||
UpdateStatus?.Invoke("Reading Disc Information");
|
|
||||||
|
|
||||||
sense = dev.ReadDiscInformation(out cmdBuf, out senseBuf, MmcDiscInformationDataTypes.DiscInformation,
|
|
||||||
dev.Timeout, out _);
|
|
||||||
|
|
||||||
if(!sense)
|
|
||||||
{
|
|
||||||
DiscInformation.StandardDiscInformation? discInfo = DiscInformation.Decode000b(cmdBuf);
|
|
||||||
|
|
||||||
if(discInfo.HasValue)
|
|
||||||
if(dskType == MediaType.CD)
|
|
||||||
switch(discInfo.Value.DiscType)
|
|
||||||
{
|
|
||||||
case 0x10:
|
|
||||||
dskType = MediaType.CDI;
|
|
||||||
|
|
||||||
break;
|
|
||||||
case 0x20:
|
|
||||||
dskType = MediaType.CDROMXA;
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int firstTrackLastSession = 0;
|
int firstTrackLastSession = 0;
|
||||||
|
|
||||||
dumpLog.WriteLine("Reading Session Information");
|
dumpLog.WriteLine("Reading Session Information");
|
||||||
|
|||||||
Reference in New Issue
Block a user