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

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

Issue 1235793005: Deprecate LogCB in favor of using MediaLog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and attempt to fix Android compilation Created 5 years, 5 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 <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 14 matching lines...) Expand all
25 DecodeTimestamp MEDIA_EXPORT DecodeTimestampFromRational(int64 numer, 25 DecodeTimestamp MEDIA_EXPORT DecodeTimestampFromRational(int64 numer,
26 int64 denom); 26 int64 denom);
27 27
28 struct SampleInfo; 28 struct SampleInfo;
29 struct TrackRunInfo; 29 struct TrackRunInfo;
30 30
31 class MEDIA_EXPORT TrackRunIterator { 31 class MEDIA_EXPORT TrackRunIterator {
32 public: 32 public:
33 // Create a new TrackRunIterator. A reference to |moov| will be retained for 33 // Create a new TrackRunIterator. A reference to |moov| will be retained for
34 // the lifetime of this object. 34 // the lifetime of this object.
35 TrackRunIterator(const Movie* moov, const LogCB& log_cb); 35 TrackRunIterator(const Movie* moov, const scoped_refptr<MediaLog>& media_log);
36 ~TrackRunIterator(); 36 ~TrackRunIterator();
37 37
38 // Sets up the iterator to handle all the runs from the current fragment. 38 // Sets up the iterator to handle all the runs from the current fragment.
39 bool Init(const MovieFragment& moof); 39 bool Init(const MovieFragment& moof);
40 40
41 // Returns true if the properties of the current run or sample are valid. 41 // Returns true if the properties of the current run or sample are valid.
42 bool IsRunValid() const; 42 bool IsRunValid() const;
43 bool IsSampleValid() const; 43 bool IsSampleValid() const;
44 44
45 // Advance the properties to refer to the next run or sample. Requires that 45 // 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
93 uint32 GetGroupDescriptionIndex(uint32 sample_index) const; 93 uint32 GetGroupDescriptionIndex(uint32 sample_index) const;
94 const CencSampleEncryptionInfoEntry& GetSampleEncryptionInfoEntry( 94 const CencSampleEncryptionInfoEntry& GetSampleEncryptionInfoEntry(
95 uint32 group_description_index) const; 95 uint32 group_description_index) const;
96 96
97 // Sample encryption information. 97 // Sample encryption information.
98 bool IsSampleEncrypted(size_t sample_index) const; 98 bool IsSampleEncrypted(size_t sample_index) const;
99 uint8 GetIvSize(size_t sample_index) const; 99 uint8 GetIvSize(size_t sample_index) const;
100 const std::vector<uint8>& GetKeyId(size_t sample_index) const; 100 const std::vector<uint8>& GetKeyId(size_t sample_index) const;
101 101
102 const Movie* moov_; 102 const Movie* moov_;
103 LogCB log_cb_; 103 scoped_refptr<MediaLog> media_log_;
104 104
105 std::vector<TrackRunInfo> runs_; 105 std::vector<TrackRunInfo> runs_;
106 std::vector<TrackRunInfo>::const_iterator run_itr_; 106 std::vector<TrackRunInfo>::const_iterator run_itr_;
107 std::vector<SampleInfo>::const_iterator sample_itr_; 107 std::vector<SampleInfo>::const_iterator sample_itr_;
108 108
109 std::vector<FrameCENCInfo> cenc_info_; 109 std::vector<FrameCENCInfo> cenc_info_;
110 110
111 int64 sample_dts_; 111 int64 sample_dts_;
112 int64 sample_offset_; 112 int64 sample_offset_;
113 113
114 DISALLOW_COPY_AND_ASSIGN(TrackRunIterator); 114 DISALLOW_COPY_AND_ASSIGN(TrackRunIterator);
115 }; 115 };
116 116
117 } // namespace mp4 117 } // namespace mp4
118 } // namespace media 118 } // namespace media
119 119
120 #endif // MEDIA_FORMATS_MP4_TRACK_RUN_ITERATOR_H_ 120 #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