mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-21 07:15:40 -04:00
CDImage: Add Precache() method
This commit is contained in:
@ -324,6 +324,11 @@ std::string CDImage::GetSubImageMetadata(u32 index, const std::string_view& type
|
||||
return {};
|
||||
}
|
||||
|
||||
CDImage::PrecacheResult CDImage::Precache(ProgressCallback* progress /*= ProgressCallback::NullProgressCallback*/)
|
||||
{
|
||||
return PrecacheResult::Unsupported;
|
||||
}
|
||||
|
||||
void CDImage::ClearTOC()
|
||||
{
|
||||
m_lba_count = 0;
|
||||
|
@ -57,6 +57,13 @@ public:
|
||||
Mode2Raw // 2352 bytes per sector
|
||||
};
|
||||
|
||||
enum class PrecacheResult : u8
|
||||
{
|
||||
Unsupported,
|
||||
ReadError,
|
||||
Success,
|
||||
};
|
||||
|
||||
struct SectorHeader
|
||||
{
|
||||
u8 minute;
|
||||
@ -294,6 +301,9 @@ public:
|
||||
// Retrieve sub-image metadata.
|
||||
virtual std::string GetSubImageMetadata(u32 index, const std::string_view& type) const;
|
||||
|
||||
// Returns true if the source supports precaching, which may be more optimal than an in-memory copy.
|
||||
virtual PrecacheResult Precache(ProgressCallback* progress = ProgressCallback::NullProgressCallback);
|
||||
|
||||
protected:
|
||||
void ClearTOC();
|
||||
void CopyTOC(const CDImage* image);
|
||||
|
Reference in New Issue
Block a user