FFmpegfs Fuse Multi Media Filesystem 2.16
|
Disk file I/O class. More...
#include <diskio.h>
Public Member Functions | |
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 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... | |
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... | |
|
overridevirtual |
|
overridevirtual |
Close virtual file.
Implements FileIO.
Definition at line 119 of file diskio.cc.
References pvt_close().
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Open a file.
[in] | virtualfile | - LPCVIRTUALFILE of file to open |
Implements FileIO.
Definition at line 58 of file diskio.cc.
References Logging::debug(), m_fpi, VIRTUALFILE::m_origfile, FileIO::set_virtualfile(), 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 109 of file diskio.cc.
References m_fpi.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
protected |