Files
fluxengine/lib/encoders/encoders.h
2023-05-12 23:28:25 +00:00

38 lines
935 B
C++

#ifndef ENCODERS_H
#define ENCODERS_H
class EncoderProto;
class Fluxmap;
class Image;
class Layout;
class Sector;
class TrackInfo;
class Encoder
{
public:
Encoder(const EncoderProto& config) {}
virtual ~Encoder() {}
static std::unique_ptr<Encoder> create(const EncoderProto& config);
public:
virtual std::shared_ptr<const Sector> getSector(
std::shared_ptr<const TrackInfo>&,
const Image& image,
unsigned sectorId);
virtual std::vector<std::shared_ptr<const Sector>> collectSectors(
std::shared_ptr<const TrackInfo>&, const Image& image);
virtual std::unique_ptr<Fluxmap> encode(
std::shared_ptr<const TrackInfo>& trackInfo,
const std::vector<std::shared_ptr<const Sector>>& sectors,
const Image& image) = 0;
nanoseconds_t calculatePhysicalClockPeriod(
nanoseconds_t targetClockPeriod, nanoseconds_t targetRotationalPeriod);
};
#endif