71 virtual size_t bufsize()
const override;
89 virtual size_t readio(
void *data,
size_t size)
override;
94 virtual int error()
const override;
99 virtual int64_t
duration()
const override;
104 virtual size_t size()
const override;
109 virtual size_t tell()
const override;
124 virtual int seek(int64_t offset,
int whence)
override;
129 virtual bool eof()
const override;
133 virtual void closeio()
override;
struct bluray BLURAY
Forward declaration of libbluray handle.
virtual size_t readio(void *data, size_t size) override
Read data from file.
std::array< uint8_t, 192 *1024 > m_data
Buffer for readio() data.
int64_t m_cur_pos
Current position in virtual file.
size_t m_rest_pos
Position in buffer.
int64_t m_end_pos
End offset in bytes (not including this byte)
int64_t m_duration
Track/chapter duration, in AV_TIME_BASE fractional seconds.
virtual int seek(int64_t offset, int whence) override
Seek to position in file.
virtual int error() const override
Get last error.
BlurayIO()
Create BlurayIO object.
BLURAY * m_bd
Blu-ray disk handle.
virtual ~BlurayIO()
Free BlurayIO object.
unsigned m_angle_idx
Selected angle index (angle number -1)
uint32_t m_title_idx
Track index (track number - 1)
bool m_full_title
If true, ignore m_chapter_no and provide full track.
virtual int openio(LPVIRTUALFILE virtualfile) override
Open a virtual file.
size_t m_rest_size
Rest bytes in buffer.
virtual size_t bufsize() const override
Get the ideal buffer size.
unsigned m_chapter_idx
Chapter index (chapter number - 1)
virtual size_t size() const override
Get the file size.
void pvt_close()
Close virtual file. Non-virtual version to be safely called from constructor/destructor.
virtual bool eof() const override
Check if at end of file.
virtual void closeio() override
Close virtual file.
int64_t m_start_pos
Start offset in bytes.
virtual int64_t duration() const override
Get the duration of the file, in AV_TIME_BASE fractional seconds.
virtual size_t tell() const override
Get current read position.
bool m_is_eof
true if at end of virtual file
virtual VIRTUALTYPE type() const override
Get type of the virtual file.
LPVIRTUALFILE virtualfile()
Get virtual file object.
VIRTUALTYPE
Virtual file types enum.