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

Side by Side Diff: media/mp4/box_reader.h

Issue 10837116: Update EME MediaKeyNeededEvent.initData for ISO BMFF to match current spec. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Overzealous statement terminator is overzealous Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « media/mp4/box_definitions.cc ('k') | media/mp4/mp4_stream_parser.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_MP4_BOX_READER_H_ 5 #ifndef MEDIA_MP4_BOX_READER_H_
6 #define MEDIA_MP4_BOX_READER_H_ 6 #define MEDIA_MP4_BOX_READER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 bool ReadVec(std::vector<uint8>* t, int count) WARN_UNUSED_RESULT; 47 bool ReadVec(std::vector<uint8>* t, int count) WARN_UNUSED_RESULT;
48 48
49 // These variants read a 4-byte integer of the corresponding signedness and 49 // These variants read a 4-byte integer of the corresponding signedness and
50 // store it in the 8-byte return type. 50 // store it in the 8-byte return type.
51 bool Read4Into8(uint64* v) WARN_UNUSED_RESULT; 51 bool Read4Into8(uint64* v) WARN_UNUSED_RESULT;
52 bool Read4sInto8s(int64* v) WARN_UNUSED_RESULT; 52 bool Read4sInto8s(int64* v) WARN_UNUSED_RESULT;
53 53
54 // Advance the stream by this many bytes. 54 // Advance the stream by this many bytes.
55 bool SkipBytes(int nbytes) WARN_UNUSED_RESULT; 55 bool SkipBytes(int nbytes) WARN_UNUSED_RESULT;
56 56
57 int size() { return size_; } 57 const uint8* data() const { return buf_; }
58 int pos() { return pos_; } 58 int size() const { return size_; }
59 int pos() const { return pos_; }
59 60
60 protected: 61 protected:
61 const uint8* buf_; 62 const uint8* buf_;
62 int size_; 63 int size_;
63 int pos_; 64 int pos_;
64 65
65 template<typename T> bool Read(T* t) WARN_UNUSED_RESULT; 66 template<typename T> bool Read(T* t) WARN_UNUSED_RESULT;
66 }; 67 };
67 68
68 class MEDIA_EXPORT BoxReader : public BufferReader { 69 class MEDIA_EXPORT BoxReader : public BufferReader {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 ++child_itr; 198 ++child_itr;
198 } 199 }
199 children_.clear(); 200 children_.clear();
200 return true; 201 return true;
201 } 202 }
202 203
203 } // namespace mp4 204 } // namespace mp4
204 } // namespace media 205 } // namespace media
205 206
206 #endif // MEDIA_MP4_BOX_READER_H_ 207 #endif // MEDIA_MP4_BOX_READER_H_
OLDNEW
« no previous file with comments | « media/mp4/box_definitions.cc ('k') | media/mp4/mp4_stream_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698