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

Unified Diff: media/formats/webm/opus_packet_builder.cc

Issue 2895573002: Reland of Remove ScopedVector from all other codes in media/ (Closed)
Patch Set: Fix the compile fails in build target "jpeg_decode_accelerator_unittest" Created 3 years, 7 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
« no previous file with comments | « media/formats/webm/opus_packet_builder.h ('k') | media/formats/webm/webm_cluster_parser_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/webm/opus_packet_builder.cc
diff --git a/media/formats/webm/opus_packet_builder.cc b/media/formats/webm/opus_packet_builder.cc
index bd85c3c5215afb084ef3bf9f85085688781ffa63..aa5fa7ad15a46cc868198a751e8752cf7f964d7e 100644
--- a/media/formats/webm/opus_packet_builder.cc
+++ b/media/formats/webm/opus_packet_builder.cc
@@ -2,8 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/logging.h"
#include "media/formats/webm/opus_packet_builder.h"
+
+#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "media/formats/webm/webm_cluster_parser.h"
namespace media {
@@ -62,8 +64,8 @@ double OpusPacket::duration_ms() const {
return duration_ms_;
}
-ScopedVector<OpusPacket> BuildAllOpusPackets() {
- ScopedVector<OpusPacket> opus_packets;
+std::vector<std::unique_ptr<OpusPacket>> BuildAllOpusPackets() {
+ std::vector<std::unique_ptr<OpusPacket>> opus_packets;
for (int frame_count = kMinOpusPacketFrameCount;
frame_count <= kMaxOpusPacketFrameCount; frame_count++) {
@@ -71,14 +73,14 @@ ScopedVector<OpusPacket> BuildAllOpusPackets() {
opus_config_num++) {
bool is_VBR = false;
opus_packets.push_back(
- new OpusPacket(opus_config_num, frame_count, is_VBR));
+ base::MakeUnique<OpusPacket>(opus_config_num, frame_count, is_VBR));
if (frame_count >= 2) {
// Add another packet with VBR flag toggled. For frame counts >= 2,
// VBR triggers changes to packet framing.
is_VBR = true;
opus_packets.push_back(
- new OpusPacket(opus_config_num, frame_count, is_VBR));
+ base::MakeUnique<OpusPacket>(opus_config_num, frame_count, is_VBR));
}
}
}
« no previous file with comments | « media/formats/webm/opus_packet_builder.h ('k') | media/formats/webm/webm_cluster_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698