| Index: webrtc/modules/rtp_rtcp/source/rtp_header_parser.cc
|
| diff --git a/webrtc/modules/rtp_rtcp/source/rtp_header_parser.cc b/webrtc/modules/rtp_rtcp/source/rtp_header_parser.cc
|
| index d4cbe544cc6c1c9aa4ea5dba9b15e51b590e887e..2cec8a3e0f6c8c17ec4495ba74de0d0e54a112a2 100644
|
| --- a/webrtc/modules/rtp_rtcp/source/rtp_header_parser.cc
|
| +++ b/webrtc/modules/rtp_rtcp/source/rtp_header_parser.cc
|
| @@ -9,10 +9,9 @@
|
| */
|
| #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
|
|
|
| -#include "webrtc/base/scoped_ptr.h"
|
| +#include "webrtc/base/criticalsection.h"
|
| #include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h"
|
| #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
|
| -#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
|
|
|
| namespace webrtc {
|
|
|
| @@ -30,7 +29,7 @@ class RtpHeaderParserImpl : public RtpHeaderParser {
|
| bool DeregisterRtpHeaderExtension(RTPExtensionType type) override;
|
|
|
| private:
|
| - rtc::scoped_ptr<CriticalSectionWrapper> critical_section_;
|
| + rtc::CriticalSection critical_section_;
|
| RtpHeaderExtensionMap rtp_header_extension_map_ GUARDED_BY(critical_section_);
|
| };
|
|
|
| @@ -38,8 +37,7 @@ RtpHeaderParser* RtpHeaderParser::Create() {
|
| return new RtpHeaderParserImpl;
|
| }
|
|
|
| -RtpHeaderParserImpl::RtpHeaderParserImpl()
|
| - : critical_section_(CriticalSectionWrapper::CreateCriticalSection()) {}
|
| +RtpHeaderParserImpl::RtpHeaderParserImpl() {}
|
|
|
| bool RtpHeaderParser::IsRtcp(const uint8_t* packet, size_t length) {
|
| RtpUtility::RtpHeaderParser rtp_parser(packet, length);
|
| @@ -54,7 +52,7 @@ bool RtpHeaderParserImpl::Parse(const uint8_t* packet,
|
|
|
| RtpHeaderExtensionMap map;
|
| {
|
| - CriticalSectionScoped cs(critical_section_.get());
|
| + rtc::CritScope cs(&critical_section_);
|
| rtp_header_extension_map_.GetCopy(&map);
|
| }
|
|
|
| @@ -67,12 +65,12 @@ bool RtpHeaderParserImpl::Parse(const uint8_t* packet,
|
|
|
| bool RtpHeaderParserImpl::RegisterRtpHeaderExtension(RTPExtensionType type,
|
| uint8_t id) {
|
| - CriticalSectionScoped cs(critical_section_.get());
|
| + rtc::CritScope cs(&critical_section_);
|
| return rtp_header_extension_map_.Register(type, id) == 0;
|
| }
|
|
|
| bool RtpHeaderParserImpl::DeregisterRtpHeaderExtension(RTPExtensionType type) {
|
| - CriticalSectionScoped cs(critical_section_.get());
|
| + rtc::CritScope cs(&critical_section_);
|
| return rtp_header_extension_map_.Deregister(type) == 0;
|
| }
|
| } // namespace webrtc
|
|
|