Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Unified Diff: webrtc/modules/rtp_rtcp/source/h264_bitstream_parser.cc

Issue 1921233002: Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/h264_bitstream_parser.cc
diff --git a/webrtc/modules/rtp_rtcp/source/h264_bitstream_parser.cc b/webrtc/modules/rtp_rtcp/source/h264_bitstream_parser.cc
index 6d8b4074598a1f803d68bf97c365b86e036a474b..e23a3fa629bf203961bc074f084ebd303a629189 100644
--- a/webrtc/modules/rtp_rtcp/source/h264_bitstream_parser.cc
+++ b/webrtc/modules/rtp_rtcp/source/h264_bitstream_parser.cc
@@ -9,13 +9,13 @@
*/
#include "webrtc/modules/rtp_rtcp/source/h264_bitstream_parser.h"
+#include <memory>
#include <vector>
#include "webrtc/base/bitbuffer.h"
#include "webrtc/base/bytebuffer.h"
#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
-#include "webrtc/base/scoped_ptr.h"
namespace webrtc {
namespace {
@@ -103,7 +103,7 @@ bool H264BitstreamParser::ParseSpsNalu(const uint8_t* sps, size_t length) {
sps_parsed_ = false;
// Parse out the SPS RBSP. It should be small, so it's ok that we create a
// copy. We'll eventually write this back.
- rtc::scoped_ptr<rtc::ByteBufferWriter> sps_rbsp(
+ std::unique_ptr<rtc::ByteBufferWriter> sps_rbsp(
ParseRbsp(sps + kNaluHeaderAndTypeSize, length - kNaluHeaderAndTypeSize));
rtc::BitBuffer sps_parser(reinterpret_cast<const uint8_t*>(sps_rbsp->Data()),
sps_rbsp->Length());
@@ -209,7 +209,7 @@ bool H264BitstreamParser::ParsePpsNalu(const uint8_t* pps, size_t length) {
// We're starting a new stream, so reset picture type rewriting values.
pps_ = PpsState();
pps_parsed_ = false;
- rtc::scoped_ptr<rtc::ByteBufferWriter> buffer(
+ std::unique_ptr<rtc::ByteBufferWriter> buffer(
ParseRbsp(pps + kNaluHeaderAndTypeSize, length - kNaluHeaderAndTypeSize));
rtc::BitBuffer parser(reinterpret_cast<const uint8_t*>(buffer->Data()),
buffer->Length());
@@ -317,7 +317,7 @@ bool H264BitstreamParser::ParseNonParameterSetNalu(const uint8_t* source,
RTC_CHECK(sps_parsed_);
RTC_CHECK(pps_parsed_);
last_slice_qp_delta_parsed_ = false;
- rtc::scoped_ptr<rtc::ByteBufferWriter> slice_rbsp(ParseRbsp(
+ std::unique_ptr<rtc::ByteBufferWriter> slice_rbsp(ParseRbsp(
source + kNaluHeaderAndTypeSize, source_length - kNaluHeaderAndTypeSize));
rtc::BitBuffer slice_reader(
reinterpret_cast<const uint8_t*>(slice_rbsp->Data()),
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/forward_error_correction.cc ('k') | webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698