Replaced CriticalSectionWrapper with rtc::CriticalSection in rtp_rtcp module
Review URL: https://codereview.webrtc.org/1877253002 Cr-Commit-Position: refs/heads/master@{#12359}
This commit is contained in:
@ -12,25 +12,22 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
RTPReceiverStrategy::RTPReceiverStrategy(RtpData* data_callback)
|
||||
: crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
|
||||
data_callback_(data_callback) {
|
||||
: data_callback_(data_callback) {
|
||||
memset(&last_payload_, 0, sizeof(last_payload_));
|
||||
}
|
||||
|
||||
void RTPReceiverStrategy::GetLastMediaSpecificPayload(
|
||||
PayloadUnion* payload) const {
|
||||
CriticalSectionScoped cs(crit_sect_.get());
|
||||
rtc::CritScope cs(&crit_sect_);
|
||||
memcpy(payload, &last_payload_, sizeof(*payload));
|
||||
}
|
||||
|
||||
void RTPReceiverStrategy::SetLastMediaSpecificPayload(
|
||||
const PayloadUnion& payload) {
|
||||
CriticalSectionScoped cs(crit_sect_.get());
|
||||
rtc::CritScope cs(&crit_sect_);
|
||||
memcpy(&last_payload_, &payload, sizeof(last_payload_));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user