mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 12:45:35 +08:00
Implementation for user data sending
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
#include "ringbuffer.h"
|
||||
#include "rtcp_sender_report.h"
|
||||
#include "rtp_packet.h"
|
||||
#include "rtp_video_send_statistics.h"
|
||||
#include "rtp_statistics.h"
|
||||
#include "thread_base.h"
|
||||
|
||||
class RtpVideoSender : public ThreadBase {
|
||||
@@ -16,10 +16,7 @@ class RtpVideoSender : public ThreadBase {
|
||||
|
||||
public:
|
||||
void Enqueue(std::vector<RtpPacket> &rtp_packets);
|
||||
|
||||
public:
|
||||
void SetUdpSender(
|
||||
std::function<int(const char *, size_t)> rtp_packet_send_func);
|
||||
void SetSendDataFunc(std::function<int(const char *, size_t)> data_send_func);
|
||||
|
||||
private:
|
||||
int SendRtpPacket(RtpPacket &rtp_packet);
|
||||
@@ -31,11 +28,11 @@ class RtpVideoSender : public ThreadBase {
|
||||
bool Process() override;
|
||||
|
||||
private:
|
||||
std::function<int(const char *, size_t)> udp_sender_ = nullptr;
|
||||
std::function<int(const char *, size_t)> data_send_func_ = nullptr;
|
||||
RingBuffer<RtpPacket> rtp_packe_queue_;
|
||||
|
||||
private:
|
||||
std::unique_ptr<RtpVideoSendStatistics> rtp_video_send_statistics_ = nullptr;
|
||||
std::unique_ptr<RtpStatistics> rtp_statistics_ = nullptr;
|
||||
uint32_t last_send_bytes_ = 0;
|
||||
uint32_t last_send_rtcp_sr_packet_ts_ = 0;
|
||||
uint32_t total_rtp_packets_sent_ = 0;
|
||||
|
||||
Reference in New Issue
Block a user