88 return AV_NOPTS_VALUE;
100 fstat(fileno(
m_fpi), &stbuf);
101 return static_cast<size_t>(stbuf.st_size);
106 return static_cast<size_t>(ftell(
m_fpi));
111 return fseek(
m_fpi,
static_cast<long int>(offset), whence);
116 return feof(
m_fpi) ? true :
false;
virtual int openio(LPVIRTUALFILE virtualfile) override
Open a file.
virtual int seek(int64_t offset, int whence) override
Seek to position in file.
virtual int64_t duration() const override
Get the duration of the file, in AV_TIME_BASE fractional seconds.
virtual VIRTUALTYPE type() const override
Get type of the virtual file.
virtual bool eof() const override
Check if at end of file.
virtual int error() const override
Get last error.
virtual size_t bufsize() const override
Get the ideal buffer size.
virtual void closeio() override
Close virtual file.
virtual size_t readio(void *data, size_t size) override
Read data from file.
void pvt_close()
Close virtual file. Non-virtual version to be safely called from constructor/destructor.
FILE * m_fpi
File pointer to source media.
virtual size_t size() const override
Get the file size.
virtual size_t tell() const override
Get current read position.
LPVIRTUALFILE virtualfile()
Get virtual file object.
void set_virtualfile(LPVIRTUALFILE virtualfile)
Set the virtual file object.
static void debug(const T filename, const std::string &format_string, Args &&...args)
Write debug level log entry.
VIRTUALTYPE
Virtual file types enum.
@ DISK
Regular disk file to transcode.
Provide various log facilities to stderr, disk or syslog.
std::string m_origfile
Sanitised name and path of original file.