xcal
基于 C++23 的现代图形渲染引擎
载入中...
搜索中...
未找到
abs_videocodec.hpp
浏览该文件的文档.
1#include <xcal/public.h>
2
3#include <vector>
4namespace xcal::render::codec {
6 private:
7 std::string filename_;
8 int width_ = 0;
9 int height_ = 0;
10 int frame_rate_ = 0;
11
12 public:
13 AbsVideoCodec(std::string_view filename, int width, int height,
14 int frame_rate)
15 : filename_(filename),
16 width_(width),
17 height_(height),
18 frame_rate_(frame_rate) {}
19 virtual ~AbsVideoCodec() = default;
20 virtual bool_t open() = 0;
21 virtual bool_t append_frame(const std::vector<char>&) = 0;
22 virtual bool_t finish() = 0;
23 const std::string& filename() const { return filename_; }
24 int width() const { return width_; }
25 int height() const { return height_; }
26 int frame_rate() const { return frame_rate_; }
27 virtual std::string name() { return ""; }
28};
29} // namespace xcal::render::codec
AbsVideoCodec(std::string_view filename, int width, int height, int frame_rate)
virtual bool_t append_frame(const std::vector< char > &)=0
const std::string & filename() const
bool bool_t
Definition public.h:28
#define XCAL_CODEC_API
Definition public.h:78