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

Side by Side Diff: media/formats/webm/webm_cluster_parser.h

Issue 1874413003: Convert media/formats to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_FORMATS_WEBM_WEBM_CLUSTER_PARSER_H_ 5 #ifndef MEDIA_FORMATS_WEBM_WEBM_CLUSTER_PARSER_H_
6 #define MEDIA_FORMATS_WEBM_WEBM_CLUSTER_PARSER_H_ 6 #define MEDIA_FORMATS_WEBM_WEBM_CLUSTER_PARSER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
11 #include <map> 11 #include <map>
12 #include <memory>
12 #include <set> 13 #include <set>
13 #include <string> 14 #include <string>
14 15
15 #include "base/macros.h" 16 #include "base/macros.h"
16 #include "base/memory/scoped_ptr.h"
17 #include "media/base/audio_decoder_config.h" 17 #include "media/base/audio_decoder_config.h"
18 #include "media/base/media_export.h" 18 #include "media/base/media_export.h"
19 #include "media/base/media_log.h" 19 #include "media/base/media_log.h"
20 #include "media/base/stream_parser.h" 20 #include "media/base/stream_parser.h"
21 #include "media/base/stream_parser_buffer.h" 21 #include "media/base/stream_parser_buffer.h"
22 #include "media/formats/webm/webm_parser.h" 22 #include "media/formats/webm/webm_parser.h"
23 #include "media/formats/webm/webm_tracks_parser.h" 23 #include "media/formats/webm/webm_tracks_parser.h"
24 24
25 namespace media { 25 namespace media {
26 26
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 double timecode_multiplier_; // Multiplier used to convert timecodes into 278 double timecode_multiplier_; // Multiplier used to convert timecodes into
279 // microseconds. 279 // microseconds.
280 std::set<int64_t> ignored_tracks_; 280 std::set<int64_t> ignored_tracks_;
281 std::string audio_encryption_key_id_; 281 std::string audio_encryption_key_id_;
282 std::string video_encryption_key_id_; 282 std::string video_encryption_key_id_;
283 const AudioCodec audio_codec_; 283 const AudioCodec audio_codec_;
284 284
285 WebMListParser parser_; 285 WebMListParser parser_;
286 286
287 int64_t last_block_timecode_ = -1; 287 int64_t last_block_timecode_ = -1;
288 scoped_ptr<uint8_t[]> block_data_; 288 std::unique_ptr<uint8_t[]> block_data_;
289 int block_data_size_ = -1; 289 int block_data_size_ = -1;
290 int64_t block_duration_ = -1; 290 int64_t block_duration_ = -1;
291 int64_t block_add_id_ = -1; 291 int64_t block_add_id_ = -1;
292 292
293 scoped_ptr<uint8_t[]> block_additional_data_; 293 std::unique_ptr<uint8_t[]> block_additional_data_;
294 // Must be 0 if |block_additional_data_| is null. Must be > 0 if 294 // Must be 0 if |block_additional_data_| is null. Must be > 0 if
295 // |block_additional_data_| is NOT null. 295 // |block_additional_data_| is NOT null.
296 int block_additional_data_size_ = 0; 296 int block_additional_data_size_ = 0;
297 297
298 int64_t discard_padding_ = -1; 298 int64_t discard_padding_ = -1;
299 bool discard_padding_set_ = false; 299 bool discard_padding_set_ = false;
300 300
301 int64_t cluster_timecode_ = -1; 301 int64_t cluster_timecode_ = -1;
302 base::TimeDelta cluster_start_time_; 302 base::TimeDelta cluster_start_time_;
303 bool cluster_ended_ = false; 303 bool cluster_ended_ = false;
(...skipping 16 matching lines...) Expand all
320 DecodeTimestamp ready_buffer_upper_bound_; 320 DecodeTimestamp ready_buffer_upper_bound_;
321 321
322 scoped_refptr<MediaLog> media_log_; 322 scoped_refptr<MediaLog> media_log_;
323 323
324 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMClusterParser); 324 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMClusterParser);
325 }; 325 };
326 326
327 } // namespace media 327 } // namespace media
328 328
329 #endif // MEDIA_FORMATS_WEBM_WEBM_CLUSTER_PARSER_H_ 329 #endif // MEDIA_FORMATS_WEBM_WEBM_CLUSTER_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698