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

@@ -14,22 +14,7 @@ void RtpVideoSender::Enqueue(std::vector<RtpPacket>& rtp_packets) {
}
}
void RtpVideoSender::Start() {
std::lock_guard<std::mutex> lock_guard(mutex_);
stop_ = false;
}
void RtpVideoSender::Stop() {
std::lock_guard<std::mutex> lock_guard(mutex_);
stop_ = true;
}
bool RtpVideoSender::Process() {
std::lock_guard<std::mutex> lock_guard(mutex_);
if (stop_) {
return false;
}
for (size_t i = 0; i < 50; i++)
if (!rtp_packe_queue_.isEmpty()) {
RtpPacket rtp_packet;