Move optical disc exclusive methods to new interfaces.

This commit is contained in:
2019-01-20 20:11:10 +00:00
parent 287d761dff
commit 640c57b87a
144 changed files with 869 additions and 2708 deletions

View File

@@ -283,19 +283,28 @@ namespace DiscImageChef.Core.Devices.Dumping
double imageWriteDuration = 0;
if(opticalDisc)
outputPlugin.SetTracks(new List<Track>
{
new Track
{
if(outputPlugin is IWritableOpticalImage opticalPlugin)
opticalPlugin.SetTracks(new List<Track>
{
TrackBytesPerSector = (int)blockSize,
TrackEndSector = blocks - 1,
TrackSequence = 1,
TrackRawBytesPerSector = (int)blockSize,
TrackSubchannelType = TrackSubchannelType.None,
TrackSession = 1,
TrackType = TrackType.Data
}
});
new Track
{
TrackBytesPerSector = (int)blockSize,
TrackEndSector = blocks - 1,
TrackSequence = 1,
TrackRawBytesPerSector = (int)blockSize,
TrackSubchannelType = TrackSubchannelType.None,
TrackSession = 1,
TrackType = TrackType.Data
}
});
else
{
dumpLog.WriteLine("The specified plugin does not support storing optical disc images..");
DicConsole.ErrorWriteLine("The specified plugin does not support storing optical disc images.");
return;
}
}
else if(decMode.HasValue)
{
bool setGeometry = false;