DumpDVD/DumpDVD/Dvd/TitleKey.hpp

28 lines
738 B
C++

#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);
static bool readDir(l9660_dir* dir, int depth);
static sectorInfo* getFile(uint32_t start, uint32_t sz);
static void addFileIfExist(sectorInfo* file);
public:
static bool FindTitleKeys(dvdcss_t drive);
static uint32_t GetDistanceToNextFile(uint32_t currentSector);
static bool IsSectorInFile(uint32_t currentSector);
static sectorInfo* GetSectorInfo(uint32_t currentSector);
static void FreeMemory();
};
}
#endif