[feat] use encode thread to encode frame

This commit is contained in:
dijunkun
2025-03-25 17:18:52 +08:00
parent 160ee9feef
commit bcf01791f7
42 changed files with 269 additions and 492 deletions

32
src/frame/raw_frame.h Normal file
View File

@@ -0,0 +1,32 @@
/*
* @Author: DI JUNKUN
* @Date: 2025-03-25
* Copyright (c) 2025 by DI JUNKUN, All Rights Reserved.
*/
#ifndef _RAW_FRAME_H_
#define _RAW_FRAME_H_
#include "video_frame.h"
class RawFrame : public VideoFrame {
public:
RawFrame(const uint8_t *buffer, size_t size, uint32_t width, uint32_t height)
: VideoFrame(buffer, size, width, height) {}
RawFrame(size_t size, uint32_t width, uint32_t height)
: VideoFrame(size, width, height) {}
RawFrame(const uint8_t *buffer, size_t size) : VideoFrame(buffer, size) {}
RawFrame() = default;
~RawFrame() = default;
int64_t CapturedTimestamp() const { return captured_timestamp_us_; }
void SetCapturedTimestamp(int64_t captured_timestamp_us) {
captured_timestamp_us_ = captured_timestamp_us;
}
private:
int64_t captured_timestamp_us_ = 0;
};
#endif