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

Side by Side Diff: media/formats/mp4/track_run_iterator.h

Issue 2815303006: Convert MediaLog from being ref counted to owned by WebMediaPlayer. (Closed)
Patch Set: Rebase. Created 3 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_TRACK_RUN_ITERATOR_H_ 5 #ifndef MEDIA_FORMATS_MP4_TRACK_RUN_ITERATOR_H_
6 #define MEDIA_FORMATS_MP4_TRACK_RUN_ITERATOR_H_ 6 #define MEDIA_FORMATS_MP4_TRACK_RUN_ITERATOR_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 19 matching lines...) Expand all
30 DecodeTimestamp MEDIA_EXPORT DecodeTimestampFromRational(int64_t numer, 30 DecodeTimestamp MEDIA_EXPORT DecodeTimestampFromRational(int64_t numer,
31 int64_t denom); 31 int64_t denom);
32 32
33 struct SampleInfo; 33 struct SampleInfo;
34 struct TrackRunInfo; 34 struct TrackRunInfo;
35 35
36 class MEDIA_EXPORT TrackRunIterator { 36 class MEDIA_EXPORT TrackRunIterator {
37 public: 37 public:
38 // Create a new TrackRunIterator. A reference to |moov| will be retained for 38 // Create a new TrackRunIterator. A reference to |moov| will be retained for
39 // the lifetime of this object. 39 // the lifetime of this object.
40 TrackRunIterator(const Movie* moov, const scoped_refptr<MediaLog>& media_log); 40 TrackRunIterator(const Movie* moov, MediaLog* media_log);
41 ~TrackRunIterator(); 41 ~TrackRunIterator();
42 42
43 // Sets up the iterator to handle all the runs from the current fragment. 43 // Sets up the iterator to handle all the runs from the current fragment.
44 bool Init(const MovieFragment& moof); 44 bool Init(const MovieFragment& moof);
45 45
46 // Returns true if the properties of the current run or sample are valid. 46 // Returns true if the properties of the current run or sample are valid.
47 bool IsRunValid() const; 47 bool IsRunValid() const;
48 bool IsSampleValid() const; 48 bool IsSampleValid() const;
49 49
50 // Advance the properties to refer to the next run or sample. Requires that 50 // Advance the properties to refer to the next run or sample. Requires that
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 // Sample encryption information. 99 // Sample encryption information.
100 bool IsSampleEncrypted(size_t sample_index) const; 100 bool IsSampleEncrypted(size_t sample_index) const;
101 uint8_t GetIvSize(size_t sample_index) const; 101 uint8_t GetIvSize(size_t sample_index) const;
102 const std::vector<uint8_t>& GetKeyId(size_t sample_index) const; 102 const std::vector<uint8_t>& GetKeyId(size_t sample_index) const;
103 #if BUILDFLAG(ENABLE_CBCS_ENCRYPTION_SCHEME) 103 #if BUILDFLAG(ENABLE_CBCS_ENCRYPTION_SCHEME)
104 bool ApplyConstantIv(size_t sample_index, SampleEncryptionEntry* entry) const; 104 bool ApplyConstantIv(size_t sample_index, SampleEncryptionEntry* entry) const;
105 #endif 105 #endif
106 106
107 const Movie* moov_; 107 const Movie* moov_;
108 scoped_refptr<MediaLog> media_log_; 108 MediaLog* media_log_;
109 109
110 std::vector<TrackRunInfo> runs_; 110 std::vector<TrackRunInfo> runs_;
111 std::vector<TrackRunInfo>::const_iterator run_itr_; 111 std::vector<TrackRunInfo>::const_iterator run_itr_;
112 std::vector<SampleInfo>::const_iterator sample_itr_; 112 std::vector<SampleInfo>::const_iterator sample_itr_;
113 113
114 int64_t sample_dts_; 114 int64_t sample_dts_;
115 int64_t sample_offset_; 115 int64_t sample_offset_;
116 116
117 DISALLOW_COPY_AND_ASSIGN(TrackRunIterator); 117 DISALLOW_COPY_AND_ASSIGN(TrackRunIterator);
118 }; 118 };
119 119
120 } // namespace mp4 120 } // namespace mp4
121 } // namespace media 121 } // namespace media
122 122
123 #endif // MEDIA_FORMATS_MP4_TRACK_RUN_ITERATOR_H_ 123 #endif // MEDIA_FORMATS_MP4_TRACK_RUN_ITERATOR_H_
OLDNEW
« no previous file with comments | « media/formats/mp4/mp4_stream_parser_unittest.cc ('k') | media/formats/mp4/track_run_iterator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698