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

Side by Side Diff: media/mp4/mp4_stream_parser.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: Created 8 years, 4 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
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_MP4_STREAM_PARSER_H_ 5 #ifndef MEDIA_MP4_MP4_STREAM_PARSER_H_
6 #define MEDIA_MP4_MP4_STREAM_PARSER_H_ 6 #define MEDIA_MP4_MP4_STREAM_PARSER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 30 matching lines...) Expand all
41 kWaitingForInit, 41 kWaitingForInit,
42 kParsingBoxes, 42 kParsingBoxes,
43 kEmittingSamples, 43 kEmittingSamples,
44 kError 44 kError
45 }; 45 };
46 46
47 bool ParseBox(bool* err); 47 bool ParseBox(bool* err);
48 bool ParseMoov(mp4::BoxReader* reader); 48 bool ParseMoov(mp4::BoxReader* reader);
49 bool ParseMoof(mp4::BoxReader* reader); 49 bool ParseMoof(mp4::BoxReader* reader);
50 50
51 bool EmitKeyNeeded(const TrackEncryption& track_encryption); 51 bool EmitKeyNeeded(
52 const std::vector<ProtectionSystemSpecificHeader>& headers);
52 53
53 // To retain proper framing, each 'mdat' atom must be read; to limit memory 54 // To retain proper framing, each 'mdat' atom must be read; to limit memory
54 // usage, the atom's data needs to be discarded incrementally as frames are 55 // usage, the atom's data needs to be discarded incrementally as frames are
55 // extracted from the stream. This function discards data from the stream up 56 // extracted from the stream. This function discards data from the stream up
56 // to |offset|, updating the |mdat_tail_| value so that framing can be 57 // to |offset|, updating the |mdat_tail_| value so that framing can be
57 // retained after all 'mdat' information has been read. 58 // retained after all 'mdat' information has been read.
58 // Returns 'true' on success, 'false' if there was an error. 59 // Returns 'true' on success, 'false' if there was an error.
59 bool ReadAndDiscardMDATsUntil(const int64 offset); 60 bool ReadAndDiscardMDATsUntil(const int64 offset);
60 61
61 void ChangeState(State new_state); 62 void ChangeState(State new_state);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 uint32 video_track_id_; 103 uint32 video_track_id_;
103 bool has_sbr_; 104 bool has_sbr_;
104 105
105 DISALLOW_COPY_AND_ASSIGN(MP4StreamParser); 106 DISALLOW_COPY_AND_ASSIGN(MP4StreamParser);
106 }; 107 };
107 108
108 } // namespace mp4 109 } // namespace mp4
109 } // namespace media 110 } // namespace media
110 111
111 #endif // MEDIA_MP4_MP4_STREAM_PARSER_H_ 112 #endif // MEDIA_MP4_MP4_STREAM_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698