110static_assert(
sizeof(
VCDINFO) == 128);
131 std::string fullname;
132 bool is_svcd =
false;
147 fpi = fopen(fullname.c_str(),
"rb");
155 if (fstat(fileno(fpi), &stbuf) != 0)
162 std::memset(&vi, 0,
sizeof(vi));
164 if (fread(
reinterpret_cast<char *
>(&vi), 1,
sizeof(vi), fpi) ==
sizeof(vi))
182 orgerrno = ferror(fpi);
int load_file(const std::string &path)
Load VCD from path.
VCDPROFILETAG m_profile_tag
System profile tag.
std::string get_type_str() const
Get disk type as string.
VcdInfo()
Construct VcdInfo object.
const std::string & get_id() const
Get disk ID.
int m_number_of_cds
Number of CDs in set.
VCDPROFILETAG get_profile_tag() const
Get disk profile tag.
VCDTYPE get_type() const
Get disk type.
std::string m_id
ID of this CD.
std::string m_album_id
Album ID.
int m_cd_number
Number of this CD in set.
void clear()
Reset this object.
VCDTYPE m_type
Type of CD.
const time_t & get_file_date() const
Date of disk (of INFO.VCD or SVD)
int get_cd_number() const
Get CD number in set.
time_t m_file_date
File date.
const std::string & get_album_id() const
Get album ID.
int get_number_of_cds() const
Get number of CDs in set.
std::string m_disk_path
Path to disk.
std::string get_profile_tag_str() const
Get disk profile tag as string.
Main include for FFmpegfs project.
bool locate_file(const std::string &path, const std::string &filename, std::string &fullname, bool &is_vcd)
Check if path is a S/VCD.
std::string convert_txt2string(const char *txt, int size, bool trimmed)
Non-zero terminated text is converted to std::string.
void get_directory(const std::string &fullname, std::string *directory)
Check if fullname is a directory. Remove the filename if necessary.
std::string get_type_str(VCDTYPE type)
Return disk type as a human readable string.
std::string get_profile_tag_str(VCDPROFILETAG tag)
Profile as a human readable string.
VCDINFO structure of INFO.VCD/SVD file.
std::array< char, 16 > m_albumid
16 Byte: Album ID
short m_cd_number
2 Byte: Number of this CD
std::array< char, 98 > m_palflags
98 Byte: PAL Flags
char m_profile_tag
1 Byte: System profile tag
char m_type
1 Byte: CD type
short m_numberof_cds
2 Byte: Number of CDs in set
std::array< char, 8 > m_ID
8 Byte: ID for this CD
@ UNKNOWN
unknown file tag
struct VCDINFO VCDINFO
VCDINFO structure of INFO.VCD/SVD file.
const VCDINFO * LPCVCDINFO
Pointer to const version of VCDINFO.
struct VCDINFO * LPVCDINFO
Pointer version of VCDINFO.