Tag Parser 12.3.1
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
The StreamDataBlock class is a reference to a certain data block of a stream. More...
#include <abstractattachment.h>
Public Member Functions | |
StreamDataBlock (const std::function< std::istream &()> &stream, uint64_t startOffset=0, std::ios_base::seekdir startDir=std::ios_base::beg, uint64_t endOffset=0, std::ios_base::seekdir endDir=std::ios_base::end) | |
virtual | ~StreamDataBlock () |
Discards buffered data. | |
std::istream & | stream () const |
Returns the associated stream. | |
std::uint64_t | startOffset () const |
Returns the absolute start offset of the data block in the stream. | |
std::uint64_t | endOffset () const |
Returns the absolute end offset of the data block in the stream. | |
std::uint64_t | size () const |
Returns the size of the data block. | |
const std::unique_ptr< char[]> & | buffer () const |
Returns the data buffered via makeBuffer(). | |
void | makeBuffer () const |
Buffers the data block. | |
void | discardBuffer () |
Discards buffered data. | |
void | copyTo (std::ostream &stream) const |
Copies the data to the specified stream. | |
Protected Member Functions | |
StreamDataBlock () | |
Constructs a new StreamDataBlock. | |
Protected Attributes | |
std::function< std::istream &()> | m_stream |
std::uint64_t | m_startOffset |
std::uint64_t | m_endOffset |
std::unique_ptr< char[]> | m_buffer |
The StreamDataBlock class is a reference to a certain data block of a stream.
TagParser::StreamDataBlock::StreamDataBlock | ( | const std::function< std::istream &()> & | stream, |
uint64_t | startOffset = 0, | ||
std::ios_base::seekdir | startDir = std::ios_base::beg, | ||
uint64_t | endOffset = 0, | ||
std::ios_base::seekdir | endDir = std::ios_base::end ) |
|
virtual |
Discards buffered data.
Definition at line 66 of file abstractattachment.cpp.
|
protected |
Constructs a new StreamDataBlock.
The derived is responsible for the prober initialization of the object.
Definition at line 30 of file abstractattachment.cpp.
|
inline |
Returns the data buffered via makeBuffer().
Definition at line 77 of file abstractattachment.h.
void TagParser::StreamDataBlock::copyTo | ( | std::ostream & | stream | ) | const |
Copies the data to the specified stream.
Definition at line 84 of file abstractattachment.cpp.
|
inline |
Discards buffered data.
Definition at line 85 of file abstractattachment.h.
|
inline |
Returns the absolute end offset of the data block in the stream.
Definition at line 61 of file abstractattachment.h.
void TagParser::StreamDataBlock::makeBuffer | ( | ) | const |
Buffers the data block.
Buffered data can be accessed via buffer().
Definition at line 73 of file abstractattachment.cpp.
|
inline |
Returns the size of the data block.
Definition at line 69 of file abstractattachment.h.
|
inline |
Returns the absolute start offset of the data block in the stream.
Definition at line 53 of file abstractattachment.h.
|
inline |
Returns the associated stream.
Calling this method on invalid objects causes undefined behaviour. See isValid().
Definition at line 45 of file abstractattachment.h.
|
mutableprotected |
Definition at line 37 of file abstractattachment.h.
|
protected |
Definition at line 36 of file abstractattachment.h.
|
protected |
Definition at line 35 of file abstractattachment.h.
|
protected |
Definition at line 34 of file abstractattachment.h.