diff --git a/components/codecs/include/ftl/codecs/reader.hpp b/components/codecs/include/ftl/codecs/reader.hpp new file mode 100644 index 0000000000000000000000000000000000000000..0b34af31fe25b872b4e634428b6b48bc81c72fcf --- /dev/null +++ b/components/codecs/include/ftl/codecs/reader.hpp @@ -0,0 +1,28 @@ +#ifndef _FTL_CODECS_READER_HPP_ +#define _FTL_CODECS_READER_HPP_ + +namespace ftl { +namespace codecs { + +class Reader { + public: + Reader(); + ~Reader(); + + bool open(const std::string &filename); + + bool start(const std::function<void(const ftl::codecs::StreamPacket &, const ftl::codecs::Packet &)> &); + void stop(); + void pause(bool); + bool paused(); + + void loop(bool); + bool looping(); + + +}; + +} +} + +#endif // _FTL_CODECS_READER_HPP_ diff --git a/components/codecs/include/ftl/codecs/writer.hpp b/components/codecs/include/ftl/codecs/writer.hpp new file mode 100644 index 0000000000000000000000000000000000000000..b45be7936792c40fc5e1cf00364dedd6cee21217 --- /dev/null +++ b/components/codecs/include/ftl/codecs/writer.hpp @@ -0,0 +1,26 @@ +#ifndef _FTL_CODECS_WRITER_HPP_ +#define _FTL_CODECS_WRITER_HPP_ + +namespace ftl { +namespace codecs { + +class Writer { + public: + Writer(); + ~Writer(); + + bool open(const std::string &filename); + + bool write(const ftl::codecs::StreamPacket &, const ftl::codecs::Packet &); + + bool write(const ftl::codecs::StreamPacket &, const std::string &json); + bool write(const ftl::codecs::StreamPacket &, const Eigen::Matrix4d &m); + + private: + std::ofstream file_; +}; + +} +} + +#endif // _FTL_CODECS_WRITER_HPP_