FFmpegfs Fuse Multi Media Filesystem 2.16
Functions
VCDUTILS Namespace Reference

Video CD utility functions. More...

Functions

std::string convert_txt2string (const char *txt, int size, bool trimmed=true)
 Non-zero terminated text is converted to std::string. More...
 
bool locate_file (const std::string &path, const std::string &filename, std::string &fullname, bool &is_vcd)
 Check if path is a S/VCD. More...
 
int locate_video (const std::string &path, int track_no, std::string &fullname)
 Locate AVSEQ*DAT/MPEG video file for track_no. More...
 
std::string get_type_str (VCDTYPE type)
 Return disk type as a human readable string. More...
 
std::string get_profile_tag_str (VCDPROFILETAG tag)
 Profile as a human readable string. More...
 
void get_directory (const std::string &fullname, std::string *directory)
 Check if fullname is a directory. Remove the filename if necessary. More...
 

Detailed Description

Video CD utility functions.

Function Documentation

◆ convert_txt2string()

std::string VCDUTILS::convert_txt2string ( const char *  txt,
int  size,
bool  trimmed = true 
)

Non-zero terminated text is converted to std::string.

Parameters
[in]txt- Text for conversion (not zero-terminated).
[in]size- Length of string.
[in]trimmed- If true, trim trailing white spaces.
Returns
Converted text

Definition at line 41 of file vcdutils.cc.

References trim().

Referenced by VcdEntries::load_file(), and VcdInfo::load_file().

◆ get_directory()

void VCDUTILS::get_directory ( const std::string &  fullname,
std::string *  directory 
)

Check if fullname is a directory. Remove the filename if necessary.

Note
Really checks if fullname is a path even if the trailing slash is missing.
Parameters
[in]fullname- Path and optional filename.
[out]directory- Directory without a file name.

Definition at line 151 of file vcdutils.cc.

References append_sep(), and remove_filename().

Referenced by VcdEntries::load_file(), and VcdInfo::load_file().

◆ get_profile_tag_str()

std::string VCDUTILS::get_profile_tag_str ( VCDPROFILETAG  tag)

Profile as a human readable string.

Parameters
[in]tag- 1: VCD 1.0, VCD 2.0, SVCD, HQVCD, 2: VCD 1.1
Returns
Returns profile as a human readable string.

Definition at line 132 of file vcdutils.cc.

References VCD_10_20_SVCD_HQVCD, and VCD_11.

Referenced by VcdEntries::get_profile_tag_str(), and VcdInfo::get_profile_tag_str().

◆ get_type_str()

std::string VCDUTILS::get_type_str ( VCDTYPE  type)

Return disk type as a human readable string.

Parameters
[in]type- 1: VCD 1.0, VCD 1.1, SVCD 1.0, HQVCD, 2: VCD 2.0
Returns
Disk type as a human readable string.

Definition at line 111 of file vcdutils.cc.

References VCD_10_11_SVCD_10_HQVCD, and VCD_20.

Referenced by VcdEntries::get_type_str(), and VcdInfo::get_type_str().

◆ locate_file()

bool VCDUTILS::locate_file ( const std::string &  path,
const std::string &  filename,
std::string &  fullname,
bool &  is_vcd 
)

Check if path is a S/VCD.

Parameters
[in]path- Path to check
[in]filename- File name to check, can be done per ENTRIES or INFO (extension .SVD or .VCD will be added automatically).
[out]fullname- Path and filename of ENTRIES.SVC/VCD or INFO.SVC/VCD, if found.
[out]is_vcd- True if the directory contains a Super Video CD, false if it's a Video CD.
Returns
true if path contains a S/VCD, false if not.

Definition at line 64 of file vcdutils.cc.

Referenced by VcdEntries::load_file(), and VcdInfo::load_file().

◆ locate_video()

int VCDUTILS::locate_video ( const std::string &  path,
int  track_no,
std::string &  fullname 
)

Locate AVSEQ*DAT/MPEG video file for track_no.

Parameters
[in]path- path to search in.
[in]track_no- track number (1...n).
[out]fullname- name and path of file if found.
Returns
If successful, it returns 0 or errno if not.

Definition at line 88 of file vcdutils.cc.

References strsprintf().

Referenced by VcdIO::openio(), and VcdEntries::scan_chapters().