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

Side by Side Diff: media/base/demuxer_perftest.cc

Issue 1906423005: Replace scoped_ptr with std::unique_ptr in //media/base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-media-base: android Created 4 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 unified diff | Download patch
« no previous file with comments | « media/base/demuxer.h ('k') | media/base/fake_demuxer_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <memory>
7 8
8 #include "base/at_exit.h" 9 #include "base/at_exit.h"
9 #include "base/bind.h" 10 #include "base/bind.h"
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
12 #include "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
13 #include "base/time/time.h" 14 #include "base/time/time.h"
14 #include "build/build_config.h" 15 #include "build/build_config.h"
15 #include "media/base/media.h" 16 #include "media/base/media.h"
16 #include "media/base/media_log.h" 17 #include "media/base/media_log.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 media::PipelineStatus status) { 49 media::PipelineStatus status) {
49 CHECK_EQ(status, media::PIPELINE_OK); 50 CHECK_EQ(status, media::PIPELINE_OK);
50 message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); 51 message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
51 } 52 }
52 53
53 static void OnEncryptedMediaInitData(EmeInitDataType init_data_type, 54 static void OnEncryptedMediaInitData(EmeInitDataType init_data_type,
54 const std::vector<uint8_t>& init_data) { 55 const std::vector<uint8_t>& init_data) {
55 VLOG(0) << "File is encrypted."; 56 VLOG(0) << "File is encrypted.";
56 } 57 }
57 58
58 static void OnMediaTracksUpdated(scoped_ptr<MediaTracks> tracks) { 59 static void OnMediaTracksUpdated(std::unique_ptr<MediaTracks> tracks) {
59 VLOG(0) << "Got media tracks info, tracks = " << tracks->tracks().size(); 60 VLOG(0) << "Got media tracks info, tracks = " << tracks->tracks().size();
60 } 61 }
61 62
62 typedef std::vector<media::DemuxerStream* > Streams; 63 typedef std::vector<media::DemuxerStream* > Streams;
63 64
64 // Simulates playback reading requirements by reading from each stream 65 // Simulates playback reading requirements by reading from each stream
65 // present in |demuxer| in as-close-to-monotonically-increasing timestamp order. 66 // present in |demuxer| in as-close-to-monotonically-increasing timestamp order.
66 class StreamReader { 67 class StreamReader {
67 public: 68 public:
68 StreamReader(media::Demuxer* demuxer, bool enable_bitstream_converter); 69 StreamReader(media::Demuxer* demuxer, bool enable_bitstream_converter);
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 #endif 237 #endif
237 #if defined(OS_CHROMEOS) 238 #if defined(OS_CHROMEOS)
238 RunDemuxerBenchmark("bear.flac"); 239 RunDemuxerBenchmark("bear.flac");
239 #endif 240 #endif
240 #if defined(USE_PROPRIETARY_CODECS) && defined(OS_CHROMEOS) 241 #if defined(USE_PROPRIETARY_CODECS) && defined(OS_CHROMEOS)
241 RunDemuxerBenchmark("bear.avi"); 242 RunDemuxerBenchmark("bear.avi");
242 #endif 243 #endif
243 } 244 }
244 245
245 } // namespace media 246 } // namespace media
OLDNEW
« no previous file with comments | « media/base/demuxer.h ('k') | media/base/fake_demuxer_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698