FFmpegfs Fuse Multi Media Filesystem 2.16
|
Video CD and Super Video CD I/O class. More...
#include <vcdio.h>
Public Member Functions | |
VcdIO () | |
Create VcdIO object. More... | |
virtual | ~VcdIO () |
Free VcdIO object. More... | |
virtual VIRTUALTYPE | type () const override |
Get type of the virtual file. More... | |
virtual size_t | bufsize () const override |
Get the ideal buffer size. More... | |
virtual int | openio (LPVIRTUALFILE virtualfile) override |
Open a virtual file. More... | |
virtual size_t | readio (void *data, size_t size) override |
Read data from file. More... | |
virtual int | error () const override |
Get last error. More... | |
virtual int64_t | duration () const override |
Get the duration of the file, in AV_TIME_BASE fractional seconds. More... | |
virtual size_t | size () const override |
Get the file size. More... | |
virtual size_t | tell () const override |
Get current read position. More... | |
virtual int | seek (int64_t offset, int whence) override |
Seek to position in file. More... | |
virtual bool | eof () const override |
Check if at end of file. More... | |
virtual void | closeio () override |
Close virtual file. More... | |
Public Member Functions inherited from FileIO | |
FileIO () | |
Create FileIO object. More... | |
virtual | ~FileIO ()=default |
Free FileIO object. | |
virtual VIRTUALTYPE | type () const =0 |
Get type of the virtual file. More... | |
virtual size_t | bufsize () const =0 |
Get the ideal buffer size. More... | |
virtual int | openio (LPVIRTUALFILE virtualfile)=0 |
Open a virtual file. More... | |
virtual size_t | readio (void *data, size_t size)=0 |
Read data from a file. More... | |
virtual int | error () const =0 |
Get last error. More... | |
virtual int64_t | duration () const =0 |
Get the duration of the file, in AV_TIME_BASE fractional seconds. More... | |
virtual size_t | size () const =0 |
Get the file size. More... | |
virtual size_t | tell () const =0 |
Get current read position. More... | |
virtual int | seek (int64_t offset, int whence)=0 |
Seek to position in file. More... | |
virtual bool | eof () const =0 |
Check if at end of file. More... | |
virtual void | closeio ()=0 |
Close virtual file. More... | |
LPVIRTUALFILE | virtualfile () |
Get virtual file object. More... | |
const std::string & | filename () const |
Get source filename. More... | |
const std::string & | path () const |
Path to source file (without file name) More... | |
Protected Attributes | |
FILE * | m_fpi |
File pointer to source media. More... | |
bool | m_full_title |
If true, ignore m_chapter_no and provide full track. More... | |
int | m_track_no |
Track number (1..) More... | |
int | m_chapter_no |
Chapter number (1..) 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... | |
Private Member Functions | |
void | pvt_close () |
Close virtual file. Non-virtual version to be safely called from constructor/destructor. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from FileIO | |
static std::shared_ptr< FileIO > | alloc (VIRTUALTYPE type) |
Allocate the correct object for type(). More... | |
Protected Member Functions inherited from FileIO | |
void | set_virtualfile (LPVIRTUALFILE virtualfile) |
Set the virtual file object. More... | |
|
virtual |
Free VcdIO object.
Close file pointers
Definition at line 52 of file vcdio.cc.
References pvt_close().
|
overridevirtual |
|
overridevirtual |
Close virtual file.
Implements FileIO.
Definition at line 198 of file vcdio.cc.
References pvt_close().
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Open a virtual file.
[in] | virtualfile | - LPCVIRTUALFILE of file to open |
Implements FileIO.
Definition at line 67 of file vcdio.cc.
References Logging::info(), VCDUTILS::locate_video(), VIRTUALFILE::VCD_CHAPTER::m_chapter_no, m_chapter_no, VIRTUALFILE::VCD_CHAPTER::m_end_pos, m_end_pos, m_fpi, VIRTUALFILE::m_full_title, m_full_title, VIRTUALFILE::VCD_CHAPTER::m_start_pos, m_start_pos, VIRTUALFILE::VCD_CHAPTER::m_track_no, m_track_no, VIRTUALFILE::m_vcd, FileIO::path(), seek(), FileIO::set_virtualfile(), size(), and FileIO::virtualfile().
|
private |
|
overridevirtual |
Read data from file.
[out] | data | - buffer to store read bytes in. Must be large enough to hold up to size bytes. |
[in] | size | - number of bytes to read |
Implements FileIO.
|
overridevirtual |
Seek to position in file.
Repositions the offset of the open file to the argument offset according to the directive whence.
[in] | offset | - offset in bytes |
[in] | whence | - how to seek: SEEK_SET: The offset is set to offset bytes. SEEK_CUR: The offset is set to its current location plus offset bytes. SEEK_END: The offset is set to the size of the file plus offset bytes. |
Implements FileIO.
Definition at line 152 of file vcdio.cc.
References m_end_pos, m_fpi, and m_start_pos.
Referenced by openio().
|
overridevirtual |
|
overridevirtual |
Get current read position.
Implements FileIO.
Definition at line 147 of file vcdio.cc.
References m_fpi, and m_start_pos.
|
overridevirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |