mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
[feat] use VideoFrameWrapper to store frame info
This commit is contained in:
@@ -57,10 +57,12 @@ void VideoChannelSend::Destroy() {
|
||||
}
|
||||
}
|
||||
|
||||
int VideoChannelSend::SendVideo(char* data, size_t size) {
|
||||
int VideoChannelSend::SendVideo(
|
||||
std::shared_ptr<VideoFrameWrapper> encoded_frame) {
|
||||
if (rtp_video_sender_ && rtp_packetizer_) {
|
||||
std::vector<std::shared_ptr<RtpPacket>> rtp_packets =
|
||||
rtp_packetizer_->Build((uint8_t*)data, (uint32_t)size, true);
|
||||
rtp_packetizer_->Build((uint8_t*)encoded_frame->Buffer(),
|
||||
(uint32_t)encoded_frame->Size(), true);
|
||||
rtp_video_sender_->Enqueue(rtp_packets);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "rtp_packetizer.h"
|
||||
#include "rtp_video_sender.h"
|
||||
#include "transport_feedback_adapter.h"
|
||||
#include "video_frame_wrapper.h"
|
||||
|
||||
class VideoChannelSend {
|
||||
public:
|
||||
@@ -31,7 +32,7 @@ class VideoChannelSend {
|
||||
void Initialize(rtp::PAYLOAD_TYPE payload_type);
|
||||
void Destroy();
|
||||
|
||||
int SendVideo(char* data, size_t size);
|
||||
int SendVideo(std::shared_ptr<VideoFrameWrapper> encoded_frame);
|
||||
|
||||
void OnCongestionControlFeedback(
|
||||
Timestamp recv_ts,
|
||||
|
||||
Reference in New Issue
Block a user