Use factory to create encoder/decoder

This commit is contained in:
dijunkun
2023-09-20 17:44:29 +08:00
parent 3d4e1effe9
commit a794cd43b9
17 changed files with 173 additions and 57 deletions

View File

@@ -0,0 +1,16 @@
#ifndef _VIDEO_DECODER_H_
#define _VIDEO_DECODER_H_
#include <functional>
#include "frame.h"
class VideoDecoder {
public:
virtual int Init() = 0;
virtual int Decode(
const uint8_t *data, int size,
std::function<void(VideoFrame)> on_receive_decoded_frame) = 0;
};
#endif