40#define BCD2DEC(hex) (((hex & 0xF0) >> 4) * 10 + (hex & 0x0F))
44#define VCD_MAX_CHAPTERS 500
113extern const std::array<char, 12>
SYNC;
136bool locate_file(
const std::string & path,
const std::string & filename, std::string & fullname,
bool & is_vcd);
144int locate_video(
const std::string & path,
int track_no, std::string & fullname);
163void get_directory(
const std::string & fullname, std::string * directory);
Video CD utility functions.
bool locate_file(const std::string &path, const std::string &filename, std::string &fullname, bool &is_vcd)
Check if path is a S/VCD.
int locate_video(const std::string &path, int track_no, std::string &fullname)
Locate AVSEQ*DAT/MPEG video file for track_no.
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.
uint8_t m_track_no
Track number.
VCDMSF m_msf
MSF position of chapter in file.
uint16_t m_num_entries
2 Bytes: 1 <= tracks <= 500
std::array< VCDCHAPTER, VCD_MAX_CHAPTERS > m_chapter
Chapters.
uint8_t m_type
1 Byte: CD type
std::array< char, 8 > m_ID
8 Bytes: ID "ENTRYVCD" or "ENTRYSVD"
std::array< uint8_t, 36 > reserved
RESERVED, must be 0x00.
uint8_t m_profile_tag
1 Byte: System Profile Tag.
Video CD MSF time format.
uint8_t m_min
Minute in BCD code.
uint8_t m_frame
Number of frames, for a 25 frames per second movie 0...24.
uint8_t m_sec
Second in BCD code.
struct VCDENTRIES * LPVCDENTRIES
Pointer version of VCDENTRY.
const std::array< char, 12 > SYNC
Chapter synchronisation in S/VCD mpeg/dat files (12 byte: 0x00FFFFFFFFFFFFFFFFFFFF00)
struct VCDCHAPTER * LPVCDCHAPTER
Pointer version of VCDCHAPTER.
struct VCDCHAPTER VCDCHAPTER
Video CD chapter.
struct VCDENTRIES VCDENTRY
Video CD entry.
struct VCDMSF * LPVCDMSF
Pointer version of VCDMSF.
const VCDMSF * LPCVCDMSF
Pointer to const version of VCDMSF.
const VCDENTRY * LPCVCDENTRIES
Pointer to const version of VCDENTRY.
struct VCDMSF VCDMSF
Video CD MSF time format.
const VCDCHAPTER * LPCVCDCHAPTER
Pointer to const version of VCDCHAPTER.