mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-10-20 11:06:46 +08:00
[fix] align MiniRtc media interfaces and timestamps
This commit is contained in:
@@ -116,7 +116,7 @@ CapturedNv12Frame::CapturedNv12Frame(
|
||||
width_(width),
|
||||
height_(height) {
|
||||
descriptor_.struct_size = sizeof(descriptor_);
|
||||
descriptor_.type = XNativeVideoFrameCpuNv12;
|
||||
descriptor_.type = MiniRtcNativeVideoFrameCpuNv12;
|
||||
descriptor_.width = width_;
|
||||
descriptor_.height = height_;
|
||||
descriptor_.payload.cpu_nv12 = {
|
||||
|
||||
@@ -46,7 +46,7 @@ class CapturedNv12FramePool final
|
||||
|
||||
class CapturedNv12Frame final {
|
||||
public:
|
||||
const XNativeVideoFrame* Descriptor() const { return &descriptor_; }
|
||||
const MiniRtcNativeVideoFrame* Descriptor() const { return &descriptor_; }
|
||||
size_t Size() const { return storage_.size(); }
|
||||
|
||||
void AddRef();
|
||||
@@ -70,7 +70,7 @@ class CapturedNv12Frame final {
|
||||
std::vector<uint8_t> storage_;
|
||||
uint32_t width_ = 0;
|
||||
uint32_t height_ = 0;
|
||||
XNativeVideoFrame descriptor_{};
|
||||
MiniRtcNativeVideoFrame descriptor_{};
|
||||
};
|
||||
|
||||
} // namespace crossdesk
|
||||
|
||||
@@ -21,7 +21,7 @@ class ScreenCapturer {
|
||||
// duration of the callback; retain its owner before using it asynchronously.
|
||||
typedef std::function<void(unsigned char* data, int size, int width,
|
||||
int height, const char* stream_id,
|
||||
const XNativeVideoFrame* native_frame)>
|
||||
const MiniRtcNativeVideoFrame* native_frame)>
|
||||
cb_desktop_data;
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user