mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
Implementation for jitter
This commit is contained in:
@@ -4,8 +4,10 @@
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <queue>
|
||||
#include <thread>
|
||||
|
||||
#include "frame.h"
|
||||
#include "ringbuffer.h"
|
||||
#include "rtp_video_session.h"
|
||||
|
||||
class RtpVideoReceiver {
|
||||
@@ -23,15 +25,20 @@ class RtpVideoReceiver {
|
||||
|
||||
private:
|
||||
bool CheckIsFrameCompleted(RtpPacket& rtp_packet);
|
||||
void Process();
|
||||
|
||||
// private:
|
||||
// void OnReceiveFrame(uint8_t* payload) {}
|
||||
|
||||
private:
|
||||
std::map<uint16_t, RtpPacket> incomplete_frame_list_;
|
||||
std::queue<VideoFrame> compelete_video_frame_queue_;
|
||||
uint8_t* nv12_data_ = nullptr;
|
||||
std::function<void(VideoFrame&)> on_receive_complete_frame_ = nullptr;
|
||||
uint32_t last_complete_frame_ts_ = 0;
|
||||
|
||||
RingBuffer<VideoFrame> compelete_video_frame_queue_;
|
||||
std::thread* jitter_thread_ = nullptr;
|
||||
bool start_ = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user