FFmpegfs Fuse Multi Media Filesystem 2.16
|
Video CD entries. More...
#include <vcdentries.h>
Public Types | |
enum class | SEEKRES { NOTFOUND , FOUND , ERROR } |
typedef SEEKRES * | LPSEEKRES |
Pointer to SEEKRES. More... | |
typedef const SEEKRES * | LPCSEEKRES |
Const pointer to SEEKRES. More... | |
Public Member Functions | |
VcdEntries () | |
Construct VcdEntries object. More... | |
virtual | ~VcdEntries ()=default |
Destroy VcdEntries object. | |
void | clear () |
Reset this object. More... | |
int | load_file (const std::string &path) |
Load VCD from path. More... | |
time_t | get_file_date () const |
Get date of disk (taken from INFO.VCD or SVD). More... | |
const std::string & | get_id () const |
Get disk ID. More... | |
VCDTYPE | get_type () const |
Get disk type. More... | |
std::string | get_type_str () const |
Get disk type as string. More... | |
VCDPROFILETAG | get_profile_tag () const |
Get disk profile tag. More... | |
std::string | get_profile_tag_str () const |
Get disk profile tag as string. More... | |
int | get_number_of_chapters () const |
Get number of chapters on this disk. More... | |
const VcdChapter * | get_chapter (int chapter_idx) const |
Get chapter object. More... | |
int64_t | get_duration () const |
Get the total disk duration in AV_TIME_BASE fractional seconds. More... | |
uint64_t | get_size () const |
Get disk size (DAT/MPEG only). More... | |
const std::string & | get_disk_path () const |
Get disk directory. More... | |
Protected Member Functions | |
int | scan_chapters () |
Scan the disk for chapters. More... | |
SEEKRES | seek_sync (FILE *fpi, const std::array< char, 12 > &sync) const |
Seek for sync bytes. More... | |
Protected Attributes | |
time_t | m_file_date |
File date. More... | |
std::string | m_id |
ID of CD. More... | |
VCDTYPE | m_type |
Type of CD. More... | |
VCDPROFILETAG | m_profile_tag |
System profile tag. More... | |
std::vector< VcdChapter > | m_chapters |
VCD chapters. More... | |
int64_t | m_duration |
Total disk duration, in AV_TIME_BASE fractional seconds. More... | |
std::string | m_disk_path |
Path to this disk. More... | |
Video CD entries.
Definition at line 40 of file vcdentries.h.
typedef const SEEKRES* VcdEntries::LPCSEEKRES |
Const pointer to SEEKRES.
Definition at line 53 of file vcdentries.h.
typedef SEEKRES* VcdEntries::LPSEEKRES |
Pointer to SEEKRES.
Definition at line 52 of file vcdentries.h.
|
strong |
Seek results
Enumerator | |
---|---|
NOTFOUND | Sync not found. |
FOUND | Sync found. |
ERROR | Seek error. |
Definition at line 46 of file vcdentries.h.
|
explicit |
Construct VcdEntries object.
Sync bytes for a Video CD picture start. Sync bytes for a Video CD video stream.
Definition at line 54 of file vcdentries.cc.
References clear().
void VcdEntries::clear | ( | ) |
Reset this object.
Definition at line 59 of file vcdentries.cc.
References m_chapters, m_disk_path, m_duration, m_file_date, m_id, m_profile_tag, m_type, and UNKNOWN.
Referenced by load_file(), and VcdEntries().
const VcdChapter * VcdEntries::get_chapter | ( | int | chapter_idx | ) | const |
Get chapter object.
[in] | chapter_idx | - 0..number of chapters - 1 |
Definition at line 389 of file vcdentries.cc.
References get_number_of_chapters(), and m_chapters.
Referenced by create_vcd_virtualfile().
const std::string & VcdEntries::get_disk_path | ( | ) | const |
Get disk directory.
Definition at line 415 of file vcdentries.cc.
References m_disk_path.
Referenced by create_vcd_virtualfile().
int64_t VcdEntries::get_duration | ( | ) | const |
Get the total disk duration in AV_TIME_BASE fractional seconds.
Definition at line 398 of file vcdentries.cc.
References m_duration.
Referenced by create_vcd_virtualfile().
time_t VcdEntries::get_file_date | ( | ) | const |
Get date of disk (taken from INFO.VCD or SVD).
Definition at line 354 of file vcdentries.cc.
References m_file_date.
const std::string & VcdEntries::get_id | ( | ) | const |
int VcdEntries::get_number_of_chapters | ( | ) | const |
Get number of chapters on this disk.
Definition at line 384 of file vcdentries.cc.
References m_chapters.
Referenced by get_chapter(), get_size(), and parse_vcd().
VCDPROFILETAG VcdEntries::get_profile_tag | ( | ) | const |
Get disk profile tag.
Definition at line 374 of file vcdentries.cc.
References m_profile_tag.
std::string VcdEntries::get_profile_tag_str | ( | ) | const |
Get disk profile tag as string.
Definition at line 379 of file vcdentries.cc.
References VCDUTILS::get_profile_tag_str(), and m_profile_tag.
uint64_t VcdEntries::get_size | ( | ) | const |
Get disk size (DAT/MPEG only).
Definition at line 403 of file vcdentries.cc.
References get_number_of_chapters(), and m_chapters.
Referenced by create_vcd_virtualfile().
VCDTYPE VcdEntries::get_type | ( | ) | const |
Get disk type.
Definition at line 364 of file vcdentries.cc.
References m_type.
std::string VcdEntries::get_type_str | ( | ) | const |
Get disk type as string.
Definition at line 369 of file vcdentries.cc.
References VCDUTILS::get_type_str(), and m_type.
int VcdEntries::load_file | ( | const std::string & | path | ) |
Load VCD from path.
[in] | path | - path to locate VCD in |
Definition at line 70 of file vcdentries.cc.
References BCD2DEC, clear(), VCDUTILS::convert_txt2string(), VCDUTILS::get_directory(), VcdChapter::get_start_time(), VCDUTILS::locate_file(), VCDENTRIES::m_chapter, m_chapters, m_disk_path, VcdChapter::m_duration, m_duration, m_file_date, m_id, VCDENTRIES::m_ID, VCDENTRIES::m_num_entries, m_profile_tag, VCDENTRIES::m_profile_tag, m_type, VCDENTRIES::m_type, and scan_chapters().
Referenced by parse_vcd().
|
protected |
Scan the disk for chapters.
Definition at line 160 of file vcdentries.cc.
References FOUND, VcdChapter::get_start_time(), VCDUTILS::locate_video(), m_chapters, m_disk_path, VcdChapter::m_duration, m_duration, VcdChapter::readio(), seek_sync(), SYNC, and VCD_SECTOR_SIZE.
Referenced by load_file().
|
protected |
Seek for sync bytes.
[in] | fpi | - file pointer of open file |
[in] | sync | - sync bytes |
Definition at line 315 of file vcdentries.cc.
References FOUND, and NOTFOUND.
Referenced by scan_chapters().
|
protected |
VCD chapters.
Definition at line 154 of file vcdentries.h.
Referenced by clear(), get_chapter(), get_number_of_chapters(), get_size(), load_file(), and scan_chapters().
|
protected |
Path to this disk.
Definition at line 158 of file vcdentries.h.
Referenced by clear(), get_disk_path(), load_file(), and scan_chapters().
|
protected |
Total disk duration, in AV_TIME_BASE fractional seconds.
Definition at line 155 of file vcdentries.h.
Referenced by clear(), get_duration(), load_file(), and scan_chapters().
|
protected |
File date.
Definition at line 149 of file vcdentries.h.
Referenced by clear(), get_file_date(), and load_file().
|
protected |
ID of CD.
Definition at line 150 of file vcdentries.h.
Referenced by clear(), get_id(), and load_file().
|
protected |
System profile tag.
Definition at line 152 of file vcdentries.h.
Referenced by clear(), get_profile_tag(), get_profile_tag_str(), and load_file().
|
protected |
Type of CD.
Definition at line 151 of file vcdentries.h.
Referenced by clear(), get_type(), get_type_str(), and load_file().