FFmpegfs Fuse Multi Media Filesystem 2.16
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
VcdChapter Class Reference

Video CD chapter. More...

#include <vcdchapter.h>

Public Member Functions

 VcdChapter (bool is_svcd)
 Construct VcdChapter object. More...
 
 VcdChapter (const VCDCHAPTER &VcdChapter, bool is_svcd)
 Construct VcdChapter object. More...
 
 VcdChapter (int track_no, int min, int sec, int frame, bool is_svcd, int64_t duration)
 Construct VcdChapter object. More...
 
virtual ~VcdChapter ()=default
 Destroy VcdChapter object.
 
bool get_is_svcd () const
 Check if this is a Super Video CD. More...
 
int get_track_no () const
 Get the track number of this chapter. More...
 
int get_min () const
 Get MSF (minutes, seconds, and fractional seconds/frames) minute. More...
 
int get_sec () const
 Get MSF (minutes, seconds, and fractional seconds/frames) second. More...
 
int get_frame () const
 Get MSF (minutes, seconds, and fractional seconds/frames) frame. More...
 
int64_t get_duration () const
 Get chapter duration, in AV_TIME_BASE fractional seconds. More...
 
std::string get_filename () const
 Get file name and path of source file (e.g. MPEG/AVSEQ##.MPG). More...
 
uint64_t get_start_pos () const
 Get file position of chapter in bytes. More...
 
uint64_t get_end_pos () const
 Get end position of chapter in bytes. More...
 
int64_t get_start_time () const
 Get start position of chapter in AV_TIME_BASE units. More...
 
uint64_t get_size () const
 Get the size of this chapter in bytes. More...
 
int get_lba () const
 Get LBA (large block address) of chapter. More...
 
VcdChapteroperator= (VcdChapter const &other)
 Assignment operator =. More...
 
int operator== (const VcdChapter &other) const
 Comparison operator ==. More...
 
int operator< (const VcdChapter &other) const
 Comparison operator <. More...
 
int operator<= (const VcdChapter &other) const
 Comparison operator <=. More...
 
int operator> (const VcdChapter &other) const
 Comparison operator > More...
 
int operator>= (const VcdChapter &other) const
 Comparison operator >=. More...
 
int operator!= (const VcdChapter &other) const
 Comparison operator !=. More...
 

Protected Member Functions

int readio (FILE *fpi, int track_no)
 Read file from disk. More...
 

Protected Attributes

bool m_is_svcd
 true for SVCD, false for VCD More...
 
int m_track_no
 Track no. More...
 
int m_min
 MSF minute. More...
 
int m_sec
 MSF second. More...
 
int m_frame
 MSF frame. More...
 
int64_t m_duration
 Chapter duration, in AV_TIME_BASE fractional seconds. More...
 
uint64_t m_start_pos
 Start offset in bytes. More...
 
uint64_t m_end_pos
 End offset in bytes (not including this byte) More...
 

Friends

class VcdEntries
 

Detailed Description

Video CD chapter.

Definition at line 61 of file vcdchapter.h.

Constructor & Destructor Documentation

◆ VcdChapter() [1/3]

VcdChapter::VcdChapter ( bool  is_svcd)
explicit

Construct VcdChapter object.

Parameters
[in]is_svcd- true for SVCD CD, false for VCD

Definition at line 37 of file vcdchapter.cc.

◆ VcdChapter() [2/3]

VcdChapter::VcdChapter ( const VCDCHAPTER VcdChapter,
bool  is_svcd 
)
explicit

Construct VcdChapter object.

Parameters
[in]VcdChapter- source object to copy from
[in]is_svcd- true for SVCD CD, false for VCD

Definition at line 50 of file vcdchapter.cc.

◆ VcdChapter() [3/3]

VcdChapter::VcdChapter ( int  track_no,
int  min,
int  sec,
int  frame,
bool  is_svcd,
int64_t  duration 
)
explicit

Construct VcdChapter object.

Parameters
[in]track_no- track number 1..
[in]min- Start minute
[in]sec- Start second
[in]frame- Start frame
[in]is_svcd- true for SVCD CD, false for VCD
[in]duration- Chapter duration, in AV_TIME_BASE fractional seconds

Definition at line 63 of file vcdchapter.cc.

Member Function Documentation

◆ get_duration()

int64_t VcdChapter::get_duration ( ) const

Get chapter duration, in AV_TIME_BASE fractional seconds.

Returns
Returns the chapter duration, in AV_TIME_BASE fractional seconds.

Definition at line 134 of file vcdchapter.cc.

References m_duration.

Referenced by create_vcd_virtualfile().

◆ get_end_pos()

uint64_t VcdChapter::get_end_pos ( ) const

Get end position of chapter in bytes.

Returns
Returns end position of chapter in bytes.

Definition at line 159 of file vcdchapter.cc.

References m_end_pos.

Referenced by create_vcd_virtualfile().

◆ get_filename()

std::string VcdChapter::get_filename ( ) const

Get file name and path of source file (e.g. MPEG/AVSEQ##.MPG).

Returns
Returns file name and path of source file.

Definition at line 139 of file vcdchapter.cc.

References m_is_svcd, m_track_no, and strsprintf().

◆ get_frame()

int VcdChapter::get_frame ( ) const

Get MSF (minutes, seconds, and fractional seconds/frames) frame.

Each timecode frame is one seventy-fifth of a second.

Returns
Returns MSF frame.

Definition at line 129 of file vcdchapter.cc.

References m_frame.

◆ get_is_svcd()

bool VcdChapter::get_is_svcd ( ) const

Check if this is a Super Video CD.

Returns
Returns true for SVCD, false for VCD.

Definition at line 109 of file vcdchapter.cc.

References m_is_svcd.

◆ get_lba()

int VcdChapter::get_lba ( ) const

Get LBA (large block address) of chapter.

Returns
Returns LBA of chapter.

Definition at line 188 of file vcdchapter.cc.

References m_frame, m_min, and m_sec.

◆ get_min()

int VcdChapter::get_min ( ) const

Get MSF (minutes, seconds, and fractional seconds/frames) minute.

Returns
Returns MSF minute.

Definition at line 119 of file vcdchapter.cc.

References m_min.

◆ get_sec()

int VcdChapter::get_sec ( ) const

Get MSF (minutes, seconds, and fractional seconds/frames) second.

Returns
Returns MSF second.

Definition at line 124 of file vcdchapter.cc.

References m_sec.

◆ get_size()

uint64_t VcdChapter::get_size ( ) const

Get the size of this chapter in bytes.

Returns
Returns chapter size in bytes.

Definition at line 164 of file vcdchapter.cc.

References m_end_pos, and m_start_pos.

Referenced by create_vcd_virtualfile().

◆ get_start_pos()

uint64_t VcdChapter::get_start_pos ( ) const

Get file position of chapter in bytes.

Returns
Returns file position of chapter in bytes.

Definition at line 154 of file vcdchapter.cc.

References m_start_pos.

Referenced by create_vcd_virtualfile().

◆ get_start_time()

int64_t VcdChapter::get_start_time ( ) const

Get start position of chapter in AV_TIME_BASE units.

Returns
Returns start position of chapter in AV_TIME_BASE units.

Definition at line 169 of file vcdchapter.cc.

References m_frame, m_min, and m_sec.

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

◆ get_track_no()

int VcdChapter::get_track_no ( ) const

Get the track number of this chapter.

Returns
Returns track number.

Definition at line 114 of file vcdchapter.cc.

References m_track_no.

Referenced by create_vcd_virtualfile().

◆ operator!=()

int VcdChapter::operator!= ( const VcdChapter other) const

Comparison operator !=.

Parameters
[in]other
Returns
Nonzero if this object is not equal, 0 if equal

Definition at line 338 of file vcdchapter.cc.

References m_frame, m_min, m_sec, and m_track_no.

◆ operator<()

int VcdChapter::operator< ( const VcdChapter other) const

Comparison operator <.

Parameters
[in]other
Returns
Nonzero if this object is smaller, 0 if not

Definition at line 218 of file vcdchapter.cc.

References m_frame, m_min, m_sec, and m_track_no.

◆ operator<=()

int VcdChapter::operator<= ( const VcdChapter other) const

Comparison operator <=.

Parameters
[in]other
Returns
Nonzero if this object is smaller or equal, 0 if not

Definition at line 268 of file vcdchapter.cc.

◆ operator=()

VcdChapter & VcdChapter::operator= ( VcdChapter const &  other)

Assignment operator =.

Parameters
[in]other
Returns
this

Definition at line 193 of file vcdchapter.cc.

References m_duration, m_end_pos, m_frame, m_is_svcd, m_min, m_sec, m_start_pos, and m_track_no.

◆ operator==()

int VcdChapter::operator== ( const VcdChapter other) const

Comparison operator ==.

Parameters
[in]other
Returns
Nonzero if equal, 0 if not

Definition at line 210 of file vcdchapter.cc.

References m_frame, m_min, m_sec, and m_track_no.

◆ operator>()

int VcdChapter::operator> ( const VcdChapter other) const

Comparison operator >

Parameters
[in]other
Returns
Nonzero if this object is greater, 0 if not

Definition at line 278 of file vcdchapter.cc.

References m_frame, m_min, m_sec, and m_track_no.

◆ operator>=()

int VcdChapter::operator>= ( const VcdChapter other) const

Comparison operator >=.

Parameters
[in]other
Returns
Nonzero if this object is greater or equal, 0 if not

Definition at line 328 of file vcdchapter.cc.

◆ readio()

int VcdChapter::readio ( FILE *  fpi,
int  track_no 
)
protected

Read file from disk.

Parameters
[in]fpi- Open file object to read from
[in]track_no- Track number 1...
Returns

Definition at line 76 of file vcdchapter.cc.

References BCD2DEC, m_frame, VCDMSF::m_frame, m_min, VCDMSF::m_min, m_sec, VCDMSF::m_sec, m_track_no, and SYNC.

Referenced by VcdEntries::scan_chapters().

Friends And Related Function Documentation

◆ VcdEntries

friend class VcdEntries
friend

Definition at line 63 of file vcdchapter.h.

Member Data Documentation

◆ m_duration

int64_t VcdChapter::m_duration
protected

Chapter duration, in AV_TIME_BASE fractional seconds.

Definition at line 216 of file vcdchapter.h.

Referenced by get_duration(), VcdEntries::load_file(), operator=(), and VcdEntries::scan_chapters().

◆ m_end_pos

uint64_t VcdChapter::m_end_pos
protected

End offset in bytes (not including this byte)

Definition at line 218 of file vcdchapter.h.

Referenced by get_end_pos(), get_size(), and operator=().

◆ m_frame

int VcdChapter::m_frame
protected

MSF frame.

Definition at line 215 of file vcdchapter.h.

Referenced by get_frame(), get_lba(), get_start_time(), operator!=(), operator<(), operator=(), operator==(), operator>(), and readio().

◆ m_is_svcd

bool VcdChapter::m_is_svcd
protected

true for SVCD, false for VCD

Definition at line 211 of file vcdchapter.h.

Referenced by get_filename(), get_is_svcd(), and operator=().

◆ m_min

int VcdChapter::m_min
protected

MSF minute.

Definition at line 213 of file vcdchapter.h.

Referenced by get_lba(), get_min(), get_start_time(), operator!=(), operator<(), operator=(), operator==(), operator>(), and readio().

◆ m_sec

int VcdChapter::m_sec
protected

MSF second.

Definition at line 214 of file vcdchapter.h.

Referenced by get_lba(), get_sec(), get_start_time(), operator!=(), operator<(), operator=(), operator==(), operator>(), and readio().

◆ m_start_pos

uint64_t VcdChapter::m_start_pos
protected

Start offset in bytes.

Definition at line 217 of file vcdchapter.h.

Referenced by get_size(), get_start_pos(), and operator=().

◆ m_track_no

int VcdChapter::m_track_no
protected

Track no.

Definition at line 212 of file vcdchapter.h.

Referenced by get_filename(), get_track_no(), operator!=(), operator<(), operator=(), operator==(), operator>(), and readio().


The documentation for this class was generated from the following files: