Class Encoder

Class Documentation

class Encoder

Public Types

using Lock = std::unique_lock<std::recursive_mutex>
using Callback = std::function<void(const std::string &frame_id, const rclcpp::Time &stamp, const std::string &codec, uint32_t width, uint32_t height, uint64_t pts, uint8_t flags, uint8_t *data, size_t sz)>

Public Functions

Encoder()
~Encoder()
inline void setEncoder(const std::string &n)
inline void setProfile(const std::string &p)
inline void setPreset(const std::string &p)
inline void setTune(const std::string &p)
inline void setPixelFormat(const std::string &p)
inline void setDelay(const std::string &p)
inline void setQMax(int q)
inline void setBitRate(int r)
inline int getGOPSize() const
inline void setGOPSize(int g)
inline void setFrameRate(int frames, int second)
inline void setMeasurePerformance(bool p)
inline bool isInitialized() const
bool initialize(int width, int height, Callback callback)
inline void setLogger(rclcpp::Logger logger)
void reset()
void encodeImage(const cv::Mat &img, const Header &header, const rclcpp::Time &t0)
void encodeImage(const Image &msg)
void flush(const Header &header)
void printTimers(const std::string &prefix) const
void resetTimers()