[feat] support dynamic resolution codec

This commit is contained in:
dijunkun
2024-09-05 17:28:58 +08:00
parent c0c2b18b8b
commit c477643aed
25 changed files with 481 additions and 118 deletions

View File

@@ -12,6 +12,13 @@ VideoFrame::VideoFrame(size_t size) {
height_ = 0;
}
VideoFrame::VideoFrame(size_t size, size_t width, size_t height) {
buffer_ = new uint8_t[size];
size_ = size;
width_ = width;
height_ = height;
}
VideoFrame::VideoFrame(const uint8_t *buffer, size_t size) {
buffer_ = new uint8_t[size];
memcpy(buffer_, buffer, size);