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

Side by Side Diff: media/base/media_tracks.h

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, 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 unified diff | Download patch
« no previous file with comments | « media/base/media_log_event.h ('k') | media/base/media_tracks.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef MEDIA_BASE_MEDIA_TRACKS_H_ 5 #ifndef MEDIA_BASE_MEDIA_TRACKS_H_
6 #define MEDIA_BASE_MEDIA_TRACKS_H_ 6 #define MEDIA_BASE_MEDIA_TRACKS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory>
9 #include <string> 10 #include <string>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "media/base/media_export.h" 14 #include "media/base/media_export.h"
15 #include "media/base/media_track.h" 15 #include "media/base/media_track.h"
16 16
17 namespace media { 17 namespace media {
18 18
19 class AudioDecoderConfig; 19 class AudioDecoderConfig;
20 class VideoDecoderConfig; 20 class VideoDecoderConfig;
21 21
22 class MEDIA_EXPORT MediaTracks { 22 class MEDIA_EXPORT MediaTracks {
23 public: 23 public:
24 typedef std::vector<scoped_ptr<MediaTrack>> MediaTracksCollection; 24 using MediaTracksCollection = std::vector<std::unique_ptr<MediaTrack>>;
25 25
26 MediaTracks(); 26 MediaTracks();
27 ~MediaTracks(); 27 ~MediaTracks();
28 28
29 // Callers need to ensure that track id is unique. 29 // Callers need to ensure that track id is unique.
30 void AddAudioTrack(const AudioDecoderConfig& config, 30 void AddAudioTrack(const AudioDecoderConfig& config,
31 const std::string& id, 31 const std::string& id,
32 const std::string& kind, 32 const std::string& kind,
33 const std::string& label, 33 const std::string& label,
34 const std::string& language); 34 const std::string& language);
(...skipping 18 matching lines...) Expand all
53 MediaTracksCollection tracks_; 53 MediaTracksCollection tracks_;
54 std::map<std::string, AudioDecoderConfig> audio_configs_; 54 std::map<std::string, AudioDecoderConfig> audio_configs_;
55 std::map<std::string, VideoDecoderConfig> video_configs_; 55 std::map<std::string, VideoDecoderConfig> video_configs_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(MediaTracks); 57 DISALLOW_COPY_AND_ASSIGN(MediaTracks);
58 }; 58 };
59 59
60 } // namespace media 60 } // namespace media
61 61
62 #endif // MEDIA_BASE_MEDIA_TRACKS_H_ 62 #endif // MEDIA_BASE_MEDIA_TRACKS_H_
OLDNEW
« no previous file with comments | « media/base/media_log_event.h ('k') | media/base/media_tracks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698