OLD | NEW |
---|---|
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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(const TrackEncryption& track_encryption); |
52 | 52 |
53 bool ReadMDATsUntil(const int64 tgt_tail); | 53 // 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 // extracted from the stream. This function discards data from the stream up | |
56 // to |tgt_offset|, updating the |mdat_tail_| value so that framing can be | |
57 // retained after all 'mdat' information has been read. | |
58 // Returns 'true' on success, 'false' if there was an error. | |
59 bool ReadAndDiscardMDATsUntil(const int64 tgt_tail); | |
acolwell GONE FROM CHROMIUM
2012/08/01 16:39:02
nits: How about just using offset for the paramete
strobe_
2012/08/01 19:01:33
Done.
| |
54 | 60 |
55 void ChangeState(State new_state); | 61 void ChangeState(State new_state); |
56 | 62 |
57 bool EmitConfigs(); | 63 bool EmitConfigs(); |
58 bool PrepareAVCBuffer(const AVCDecoderConfigurationRecord& avc_config, | 64 bool PrepareAVCBuffer(const AVCDecoderConfigurationRecord& avc_config, |
59 std::vector<uint8>* frame_buf, | 65 std::vector<uint8>* frame_buf, |
60 std::vector<SubsampleEntry>* subsamples) const; | 66 std::vector<SubsampleEntry>* subsamples) const; |
61 bool EnqueueSample(BufferQueue* audio_buffers, | 67 bool EnqueueSample(BufferQueue* audio_buffers, |
62 BufferQueue* video_buffers, | 68 BufferQueue* video_buffers, |
63 bool* err); | 69 bool* err); |
(...skipping 30 matching lines...) Expand all Loading... | |
94 uint32 video_track_id_; | 100 uint32 video_track_id_; |
95 bool has_sbr_; | 101 bool has_sbr_; |
96 | 102 |
97 DISALLOW_COPY_AND_ASSIGN(MP4StreamParser); | 103 DISALLOW_COPY_AND_ASSIGN(MP4StreamParser); |
98 }; | 104 }; |
99 | 105 |
100 } // namespace mp4 | 106 } // namespace mp4 |
101 } // namespace media | 107 } // namespace media |
102 | 108 |
103 #endif // MEDIA_MP4_MP4_STREAM_PARSER_H_ | 109 #endif // MEDIA_MP4_MP4_STREAM_PARSER_H_ |
OLD | NEW |