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

Unified Diff: webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc

Issue 1697823002: Replace scoped_ptr with unique_ptr in webrtc/modules/audio_coding/neteq/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@up-codecs
Patch Set: Created 4 years, 10 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/audio_coding/neteq/tools/rtp_file_source.cc
diff --git a/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc b/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc
index b7a3109c01f0b33223f3bb46876d92f10910bde5..039e1fae2e57a9fd8f07ca96a13d234d14f81a90 100644
--- a/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc
+++ b/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc
@@ -18,6 +18,8 @@
#include <netinet/in.h>
#endif
+#include <memory>
+
#include "webrtc/base/checks.h"
#include "webrtc/modules/audio_coding/neteq/tools/packet.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
@@ -33,13 +35,13 @@ RtpFileSource* RtpFileSource::Create(const std::string& file_name) {
}
bool RtpFileSource::ValidRtpDump(const std::string& file_name) {
- rtc::scoped_ptr<RtpFileReader> temp_file(
+ std::unique_ptr<RtpFileReader> temp_file(
RtpFileReader::Create(RtpFileReader::kRtpDump, file_name));
return !!temp_file;
}
bool RtpFileSource::ValidPcap(const std::string& file_name) {
- rtc::scoped_ptr<RtpFileReader> temp_file(
+ std::unique_ptr<RtpFileReader> temp_file(
RtpFileReader::Create(RtpFileReader::kPcap, file_name));
return !!temp_file;
}
@@ -64,9 +66,9 @@ Packet* RtpFileSource::NextPacket() {
// Read the next one.
continue;
}
- rtc::scoped_ptr<uint8_t[]> packet_memory(new uint8_t[temp_packet.length]);
+ std::unique_ptr<uint8_t[]> packet_memory(new uint8_t[temp_packet.length]);
memcpy(packet_memory.get(), temp_packet.data, temp_packet.length);
- rtc::scoped_ptr<Packet> packet(new Packet(
+ std::unique_ptr<Packet> packet(new Packet(
packet_memory.release(), temp_packet.length,
temp_packet.original_length, temp_packet.time_ms, *parser_.get()));
if (!packet->valid_header()) {
« no previous file with comments | « webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h ('k') | webrtc/modules/audio_coding/neteq/tools/rtpcat.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698