DumpDVD/DumpDVD/Dvd/TitleKey.hpp

28 lines
738 B
C++
Raw Normal View History

2023-03-16 19:26:43 +00:00
#ifndef _LI_TITLEKEY
#define _LI_TITLEKEY 1
#include <dvdcss.h>
#include <lib9660.h>
#include <vector>
typedef struct sectorInfo {
uint32_t startSector;
uint32_t endSector;
} sectorInfo;
namespace Li::Dvd {
class TitleKey {
private:
static bool readSector(l9660_fs* fs, void* buf, uint32_t sector);
2023-03-17 08:23:19 +00:00
static bool readDir(l9660_dir* dir, int depth);
2023-03-27 15:57:30 +00:00
static sectorInfo* getFile(uint32_t start, uint32_t sz);
static void addFileIfExist(sectorInfo* file);
2023-03-16 19:26:43 +00:00
public:
2023-03-17 08:23:19 +00:00
static bool FindTitleKeys(dvdcss_t drive);
2023-03-16 19:26:43 +00:00
static uint32_t GetDistanceToNextFile(uint32_t currentSector);
static bool IsSectorInFile(uint32_t currentSector);
static sectorInfo* GetSectorInfo(uint32_t currentSector);
static void FreeMemory();
};
}
#endif