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

Side by Side Diff: media/formats/mp4/mp4_stream_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_MP4_MP4_STREAM_PARSER_H_ 5 #ifndef MEDIA_FORMATS_MP4_MP4_STREAM_PARSER_H_
6 #define MEDIA_FORMATS_MP4_MP4_STREAM_PARSER_H_ 6 #define MEDIA_FORMATS_MP4_MP4_STREAM_PARSER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
10 #include <set> 11 #include <set>
11 #include <vector> 12 #include <vector>
12 13
13 #include "base/callback.h" 14 #include "base/callback.h"
14 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
15 #include "base/macros.h" 16 #include "base/macros.h"
16 #include "base/memory/scoped_ptr.h"
17 #include "media/base/media_export.h" 17 #include "media/base/media_export.h"
18 #include "media/base/stream_parser.h" 18 #include "media/base/stream_parser.h"
19 #include "media/formats/common/offset_byte_queue.h" 19 #include "media/formats/common/offset_byte_queue.h"
20 #include "media/formats/mp4/track_run_iterator.h" 20 #include "media/formats/mp4/track_run_iterator.h"
21 21
22 namespace media { 22 namespace media {
23 namespace mp4 { 23 namespace mp4 {
24 24
25 struct Movie; 25 struct Movie;
26 class BoxReader; 26 class BoxReader;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 int64_t moof_head_; 109 int64_t moof_head_;
110 // |mdat_tail_| is the stream offset of the end of the current 'mdat' box. 110 // |mdat_tail_| is the stream offset of the end of the current 'mdat' box.
111 // Valid iff it is greater than the head of the queue. 111 // Valid iff it is greater than the head of the queue.
112 int64_t mdat_tail_; 112 int64_t mdat_tail_;
113 113
114 // The highest end offset in the current moof. This offset is 114 // The highest end offset in the current moof. This offset is
115 // relative to |moof_head_|. This value is used to make sure we have collected 115 // relative to |moof_head_|. This value is used to make sure we have collected
116 // enough bytes to parse all samples and aux_info in the current moof. 116 // enough bytes to parse all samples and aux_info in the current moof.
117 int64_t highest_end_offset_; 117 int64_t highest_end_offset_;
118 118
119 scoped_ptr<mp4::Movie> moov_; 119 std::unique_ptr<mp4::Movie> moov_;
120 scoped_ptr<mp4::TrackRunIterator> runs_; 120 std::unique_ptr<mp4::TrackRunIterator> runs_;
121 121
122 bool has_audio_; 122 bool has_audio_;
123 bool has_video_; 123 bool has_video_;
124 uint32_t audio_track_id_; 124 uint32_t audio_track_id_;
125 uint32_t video_track_id_; 125 uint32_t video_track_id_;
126 // The object types allowed for audio tracks. 126 // The object types allowed for audio tracks.
127 std::set<int> audio_object_types_; 127 std::set<int> audio_object_types_;
128 bool has_sbr_; 128 bool has_sbr_;
129 bool is_audio_track_encrypted_; 129 bool is_audio_track_encrypted_;
130 bool is_video_track_encrypted_; 130 bool is_video_track_encrypted_;
131 131
132 // Tracks the number of MEDIA_LOGs for skipping top level boxes. Useful to 132 // Tracks the number of MEDIA_LOGs for skipping top level boxes. Useful to
133 // prevent log spam. 133 // prevent log spam.
134 int num_top_level_box_skipped_; 134 int num_top_level_box_skipped_;
135 135
136 DISALLOW_COPY_AND_ASSIGN(MP4StreamParser); 136 DISALLOW_COPY_AND_ASSIGN(MP4StreamParser);
137 }; 137 };
138 138
139 } // namespace mp4 139 } // namespace mp4
140 } // namespace media 140 } // namespace media
141 141
142 #endif // MEDIA_FORMATS_MP4_MP4_STREAM_PARSER_H_ 142 #endif // MEDIA_FORMATS_MP4_MP4_STREAM_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698