mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Move subchannel generation and fixing to a separate class.
This commit is contained in:
596
.idea/.idea.Aaru/.idea/contentModel.xml
generated
596
.idea/.idea.Aaru/.idea/contentModel.xml
generated
File diff suppressed because it is too large
Load Diff
2
.idea/.idea.Aaru/riderModule.iml
generated
2
.idea/.idea.Aaru/riderModule.iml
generated
@@ -2,6 +2,8 @@
|
||||
<module type="RIDER_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$USER_HOME$/.nuget/packages/microsoft.net.test.sdk/16.4.0/build/netcoreapp2.1" />
|
||||
<content url="file://$USER_HOME$/.nuget/packages/microsoft.testplatform.testhost/16.4.0/build/netcoreapp2.1/x64/testhost.dll" />
|
||||
<content url="file://$USER_HOME$/.nuget/packages/microsoft.testplatform.testhost/16.4.0/build/netcoreapp2.1/x64/testhost.exe" />
|
||||
<content url="file://$USER_HOME$/.nuget/packages/nunit3testadapter/3.15.1/build/netcoreapp2.0/NUnit3.TestAdapter.dll" />
|
||||
<content url="file://$USER_HOME$/.nuget/packages/nunit3testadapter/3.15.1/build/netcoreapp2.0/NUnit3.TestAdapter.pdb" />
|
||||
<content url="file://$USER_HOME$/.nuget/packages/nunit3testadapter/3.15.1/build/netcoreapp2.0/nunit.engine.api.dll" />
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
<Compile Include="ImageInfo.cs" />
|
||||
<Compile Include="Logging\ErrorLog.cs" />
|
||||
<Compile Include="Logging\SubchannelLog.cs" />
|
||||
<Compile Include="Media\CompactDisc.cs" />
|
||||
<Compile Include="Media\Detection\MMC.cs" />
|
||||
<Compile Include="Media\Info\CompactDisc.cs" />
|
||||
<Compile Include="Media\Info\ScsiInfo.cs" />
|
||||
|
||||
@@ -269,9 +269,10 @@ namespace Aaru.Core.Devices.Dumping
|
||||
|
||||
_outputPlugin.WriteSectorsLong(data, i + r, 1);
|
||||
|
||||
bool indexesChanged =
|
||||
WriteSubchannelToImage(supportedSubchannel, desiredSubchannel, sub, i + r, 1,
|
||||
subLog, isrcs, 1, ref mcn, tracks, subchannelExtents);
|
||||
bool indexesChanged = Media.CompactDisc.WriteSubchannelToImage(supportedSubchannel,
|
||||
desiredSubchannel, sub, i + r, 1, subLog, isrcs, 1, ref mcn, tracks,
|
||||
subchannelExtents, _fixSubchannelPosition, _outputPlugin, _fixSubchannel,
|
||||
_fixSubchannelCrc, _dumpLog, UpdateStatus);
|
||||
|
||||
// Set tracks and go back
|
||||
if(indexesChanged)
|
||||
@@ -353,9 +354,10 @@ namespace Aaru.Core.Devices.Dumping
|
||||
|
||||
_outputPlugin.WriteSectorsLong(data, i, blocksToRead);
|
||||
|
||||
bool indexesChanged = WriteSubchannelToImage(supportedSubchannel, desiredSubchannel, sub, i,
|
||||
blocksToRead, subLog, isrcs, 1, ref mcn, tracks,
|
||||
subchannelExtents);
|
||||
bool indexesChanged = Media.CompactDisc.WriteSubchannelToImage(supportedSubchannel,
|
||||
desiredSubchannel, sub, i, blocksToRead, subLog, isrcs, 1, ref mcn, tracks,
|
||||
subchannelExtents, _fixSubchannelPosition, _outputPlugin, _fixSubchannel,
|
||||
_fixSubchannelCrc, _dumpLog, UpdateStatus);
|
||||
|
||||
// Set tracks and go back
|
||||
if(indexesChanged)
|
||||
|
||||
@@ -393,10 +393,10 @@ namespace Aaru.Core.Devices.Dumping
|
||||
|
||||
_outputPlugin.WriteSectorsLong(data, i + r, 1);
|
||||
|
||||
bool indexesChanged =
|
||||
WriteSubchannelToImage(supportedSubchannel, desiredSubchannel, sub, i + r, 1,
|
||||
subLog, isrcs, (byte)track.TrackSequence, ref mcn, tracks,
|
||||
subchannelExtents);
|
||||
bool indexesChanged = Media.CompactDisc.WriteSubchannelToImage(supportedSubchannel,
|
||||
desiredSubchannel, sub, i + r, 1, subLog, isrcs, (byte)track.TrackSequence,
|
||||
ref mcn, tracks, subchannelExtents, _fixSubchannelPosition, _outputPlugin,
|
||||
_fixSubchannel, _fixSubchannelCrc, _dumpLog, UpdateStatus);
|
||||
|
||||
// Set tracks and go back
|
||||
if(indexesChanged)
|
||||
@@ -526,10 +526,10 @@ namespace Aaru.Core.Devices.Dumping
|
||||
|
||||
_outputPlugin.WriteSectorsLong(data, i, blocksToRead);
|
||||
|
||||
bool indexesChanged = WriteSubchannelToImage(supportedSubchannel, desiredSubchannel, sub, i,
|
||||
blocksToRead, subLog, isrcs,
|
||||
(byte)track.TrackSequence, ref mcn, tracks,
|
||||
subchannelExtents);
|
||||
bool indexesChanged = Media.CompactDisc.WriteSubchannelToImage(supportedSubchannel,
|
||||
desiredSubchannel, sub, i, blocksToRead, subLog, isrcs, (byte)track.TrackSequence,
|
||||
ref mcn, tracks, subchannelExtents, _fixSubchannelPosition, _outputPlugin,
|
||||
_fixSubchannel, _fixSubchannelCrc, _dumpLog, UpdateStatus);
|
||||
|
||||
// Set tracks and go back
|
||||
if(indexesChanged)
|
||||
|
||||
@@ -1219,7 +1219,8 @@ namespace Aaru.Core.Devices.Dumping
|
||||
_resume.BadSubchannels.Sort();
|
||||
|
||||
if(_generateSubchannels && _outputPlugin.SupportedSectorTags.Contains(SectorTagType.CdSectorSubchannel))
|
||||
GenerateSubchannels(subchannelExtents, tracks, trackFlags, blocks, subLog);
|
||||
Media.CompactDisc.GenerateSubchannels(subchannelExtents, tracks, trackFlags, blocks, subLog, _dumpLog,
|
||||
InitProgress, UpdateProgress, EndProgress, _outputPlugin);
|
||||
|
||||
// TODO: Disc ID
|
||||
var metadata = new CommonTypes.Structs.ImageInfo
|
||||
|
||||
@@ -292,9 +292,10 @@ namespace Aaru.Core.Devices.Dumping
|
||||
Array.Copy(cmdBuf, sectorSize, sub, 0, subSize);
|
||||
_outputPlugin.WriteSectorLong(data, badSector);
|
||||
|
||||
bool indexesChanged = WriteSubchannelToImage(supportedSubchannel, desiredSubchannel, sub, badSector,
|
||||
1, subLog, isrcs, (byte)track.TrackSequence, ref mcn,
|
||||
tracks, subchannelExtents);
|
||||
bool indexesChanged = Media.CompactDisc.WriteSubchannelToImage(supportedSubchannel,
|
||||
desiredSubchannel, sub, badSector, 1, subLog, isrcs, (byte)track.TrackSequence, ref mcn,
|
||||
tracks, subchannelExtents, _fixSubchannelPosition, _outputPlugin, _fixSubchannel,
|
||||
_fixSubchannelCrc, _dumpLog, UpdateStatus);
|
||||
|
||||
// Set tracks and go back
|
||||
if(indexesChanged)
|
||||
@@ -410,10 +411,10 @@ namespace Aaru.Core.Devices.Dumping
|
||||
Array.Copy(cmdBuf, sectorSize, sub, 0, subSize);
|
||||
_outputPlugin.WriteSectorLong(data, badSector);
|
||||
|
||||
bool indexesChanged = WriteSubchannelToImage(supportedSubchannel, desiredSubchannel, sub,
|
||||
badSector, 1, subLog, isrcs,
|
||||
(byte)track.TrackSequence, ref mcn, tracks,
|
||||
subchannelExtents);
|
||||
bool indexesChanged = Media.CompactDisc.WriteSubchannelToImage(supportedSubchannel,
|
||||
desiredSubchannel, sub, badSector, 1, subLog, isrcs, (byte)track.TrackSequence,
|
||||
ref mcn, tracks, subchannelExtents, _fixSubchannelPosition, _outputPlugin,
|
||||
_fixSubchannel, _fixSubchannelCrc, _dumpLog, UpdateStatus);
|
||||
|
||||
// Set tracks and go back
|
||||
if(indexesChanged)
|
||||
@@ -555,8 +556,10 @@ namespace Aaru.Core.Devices.Dumping
|
||||
continue;
|
||||
}
|
||||
|
||||
WriteSubchannelToImage(supportedSubchannel, desiredSubchannel, cmdBuf, badSector, 5, subLog, isrcs,
|
||||
(byte)track.TrackSequence, ref mcn, tracks, subchannelExtents);
|
||||
Media.CompactDisc.WriteSubchannelToImage(supportedSubchannel, desiredSubchannel, cmdBuf, badSector, 5,
|
||||
subLog, isrcs, (byte)track.TrackSequence, ref mcn, tracks,
|
||||
subchannelExtents, _fixSubchannelPosition, _outputPlugin,
|
||||
_fixSubchannel, _fixSubchannelCrc, _dumpLog, UpdateStatus);
|
||||
|
||||
if(subchannelExtents.Contains(tmpArray[i]))
|
||||
continue;
|
||||
|
||||
@@ -160,9 +160,10 @@ namespace Aaru.Core.Devices.Dumping
|
||||
|
||||
_outputPlugin.WriteSectorsLong(data, i, _maximumReadable);
|
||||
|
||||
bool indexesChanged = WriteSubchannelToImage(supportedSubchannel, desiredSubchannel, sub, i,
|
||||
_maximumReadable, subLog, isrcs, 0xAA, ref mcn,
|
||||
tracks, subchannelExtents);
|
||||
bool indexesChanged = Media.CompactDisc.WriteSubchannelToImage(supportedSubchannel,
|
||||
desiredSubchannel, sub, i, _maximumReadable, subLog, isrcs, 0xAA, ref mcn, tracks,
|
||||
subchannelExtents, _fixSubchannelPosition, _outputPlugin, _fixSubchannel,
|
||||
_fixSubchannelCrc, _dumpLog, UpdateStatus);
|
||||
|
||||
// Set tracks and go back
|
||||
if(indexesChanged)
|
||||
@@ -328,9 +329,10 @@ namespace Aaru.Core.Devices.Dumping
|
||||
|
||||
_outputPlugin.WriteSectorsLong(data, i, _maximumReadable);
|
||||
|
||||
bool indexesChanged = WriteSubchannelToImage(supportedSubchannel, desiredSubchannel, sub, i,
|
||||
_maximumReadable, subLog, isrcs, 0xAA, ref mcn,
|
||||
tracks, subchannelExtents);
|
||||
bool indexesChanged = Media.CompactDisc.WriteSubchannelToImage(supportedSubchannel,
|
||||
desiredSubchannel, sub, i, _maximumReadable, subLog, isrcs, 0xAA, ref mcn, tracks,
|
||||
subchannelExtents, _fixSubchannelPosition, _outputPlugin, _fixSubchannel,
|
||||
_fixSubchannelCrc, _dumpLog, UpdateStatus);
|
||||
|
||||
// Set tracks and go back
|
||||
if(indexesChanged)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -193,9 +193,10 @@ namespace Aaru.Core.Devices.Dumping
|
||||
Array.Copy(cmdBuf, sectorSize, sub, 0, subSize);
|
||||
_outputPlugin.WriteSectorLong(data, badSector);
|
||||
|
||||
bool indexesChanged = WriteSubchannelToImage(supportedSubchannel, desiredSubchannel, sub, badSector,
|
||||
1, subLog, isrcs, (byte)track.TrackSequence, ref mcn,
|
||||
tracks, subchannelExtents);
|
||||
bool indexesChanged = Media.CompactDisc.WriteSubchannelToImage(supportedSubchannel,
|
||||
desiredSubchannel, sub, badSector, 1, subLog, isrcs, (byte)track.TrackSequence, ref mcn,
|
||||
tracks, subchannelExtents, _fixSubchannelPosition, _outputPlugin, _fixSubchannel,
|
||||
_fixSubchannelCrc, _dumpLog, UpdateStatus);
|
||||
|
||||
// Set tracks and go back
|
||||
if(!indexesChanged)
|
||||
|
||||
1441
Aaru.Core/Media/CompactDisc.cs
Normal file
1441
Aaru.Core/Media/CompactDisc.cs
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user