mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25:34 +08:00
[feat] use encode thread to encode frame
This commit is contained in:
32
src/frame/raw_frame.h
Normal file
32
src/frame/raw_frame.h
Normal 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
|
||||
Reference in New Issue
Block a user