21#include "DataLayout.h"
22#include "DataLayoutConventions.h"
23#include "StreamPlayer.h"
30class RecordFormatStreamPlayer;
31struct RecordFormatReader;
47 static unique_ptr<ContentBlockReader>
48 build(
const RecordFormat& recordFormat,
size_t blockIndex, unique_ptr<DataLayout>&& blockLayout);
60 : recordFormat_(recordFormat), blockIndex_(blockIndex) {}
66 const size_t blockIndex_;
67 unique_ptr<datalayout_conventions::NextContentBlockSpec> contentBlockSpec_;
84 unique_ptr<datalayout_conventions::VideoFrameSpec> videoFrameSpec_;
102 size_t indexUpperLimit,
103 size_t lastIndexToCheck,
104 bool& readNextBlock);
105 bool audioContentFromAudioSpec(
156 unique_ptr<DataLayout>&& blockLayout)
157 :
ContentBlockReader(recordFormat, blockIndex), blockLayout_{std::move(blockLayout)} {}
173 unique_ptr<DataLayout> blockLayout_;
Specialized version of ContentBlockReader to handle content blocks containing audio data.
Definition ContentBlockReader.h:89
bool readBlock(const CurrentRecord &, RecordFormatStreamPlayer &) override
Definition ContentBlockReader.cpp:204
Specification of a VRS record content block.
Definition RecordFormat.h:474
Abstract class to handle the interpretation of a record format's content block.
Definition ContentBlockReader.h:39
virtual ~ContentBlockReader()
Virtual destructor, since this is an abstract class.
virtual bool readBlock(const CurrentRecord &, RecordFormatStreamPlayer &)=0
static unique_ptr< ContentBlockReader > build(const RecordFormat &recordFormat, size_t blockIndex, unique_ptr< DataLayout > &&blockLayout)
Definition ContentBlockReader.cpp:87
Specialized version of ContentBlockReader to handle a content block containing custom data....
Definition ContentBlockReader.h:117
bool readBlock(const CurrentRecord &, RecordFormatStreamPlayer &) override
Definition ContentBlockReader.cpp:408
Specialized version of ContentBlockReader to handle DataLayout blocks.
Definition ContentBlockReader.h:151
bool mapToBlockLayout(DataLayout &desiredLayout)
Definition ContentBlockReader.h:164
bool readBlock(const CurrentRecord &, RecordFormatStreamPlayer &) override
Definition ContentBlockReader.cpp:430
The DataLayout class describes the data stored inside a DataLayoutContentBlock.
Definition DataLayout.h:191
bool mapLayout(DataLayout &targetLayout)
Definition DataLayout.cpp:126
Specialized version of ContentBlockReader to handle an empty content block.
Definition ContentBlockReader.h:141
bool readBlock(const CurrentRecord &, RecordFormatStreamPlayer &) override
Definition ContentBlockReader.cpp:472
Specialized version of ContentBlockReader to handle content blocks containing an image.
Definition ContentBlockReader.h:72
bool readBlock(const CurrentRecord &, RecordFormatStreamPlayer &) override
Definition ContentBlockReader.cpp:322
Specialized version of ContentBlockReader to handle data that could not be handled by another better ...
Definition ContentBlockReader.h:128
bool readBlock(const CurrentRecord &, RecordFormatStreamPlayer &) override
Definition ContentBlockReader.cpp:423
DataLayout definitions use to describe what's in an audio content block.
Definition DataLayoutConventions.h:137
DataLayout definitions use to describe what's in an image content block.
Definition DataLayoutConventions.h:63
Definition AsyncDiskFileChunk.hpp:49
Class describing which record is being read. Most fields are really self explanatory.
Definition StreamPlayer.h:27