Start thread after created when use ThreadBase

This commit is contained in:
dijunkun
2023-09-11 15:15:59 +08:00
parent 0899fe2f1d
commit f52142fc00
7 changed files with 21 additions and 57 deletions

View File

@@ -2,8 +2,6 @@
#define _RTP_VIDEO_SENDER_H_
#include <functional>
#include <mutex>
#include <thread>
#include "ringbuffer.h"
#include "rtp_packet.h"
@@ -23,18 +21,12 @@ class RtpVideoSender : public ThreadBase {
rtp_packet_send_func_ = rtp_packet_send_func;
}
void Start();
void Stop();
private:
bool Process() override;
private:
std::function<void(RtpPacket &)> rtp_packet_send_func_ = nullptr;
RingBuffer<RtpPacket> rtp_packe_queue_;
bool stop_ = true;
std::mutex mutex_;
};
#endif