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

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

Issue 2254093002: Return buffers from StreamParsers in a single unified map (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restored calling GetBuffers after each Parse in WebM test Created 4 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
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_MP4_STREAM_PARSER_H_ 5 #ifndef MEDIA_FORMATS_MP4_MP4_STREAM_PARSER_H_
6 #define MEDIA_FORMATS_MP4_MP4_STREAM_PARSER_H_ 6 #define MEDIA_FORMATS_MP4_MP4_STREAM_PARSER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // this offset is no longer needed by the parser. 66 // this offset is no longer needed by the parser.
67 // Returns 'true' on success, 'false' if there was an error. 67 // Returns 'true' on success, 'false' if there was an error.
68 bool ReadAndDiscardMDATsUntil(int64_t max_clear_offset); 68 bool ReadAndDiscardMDATsUntil(int64_t max_clear_offset);
69 69
70 void ChangeState(State new_state); 70 void ChangeState(State new_state);
71 71
72 bool EmitConfigs(); 72 bool EmitConfigs();
73 bool PrepareAACBuffer(const AAC& aac_config, 73 bool PrepareAACBuffer(const AAC& aac_config,
74 std::vector<uint8_t>* frame_buf, 74 std::vector<uint8_t>* frame_buf,
75 std::vector<SubsampleEntry>* subsamples) const; 75 std::vector<SubsampleEntry>* subsamples) const;
76 bool EnqueueSample(BufferQueue* audio_buffers, 76 bool EnqueueSample(BufferQueueMap* buffers, bool* err);
77 BufferQueue* video_buffers, 77 bool SendAndFlushSamples(BufferQueueMap* buffers);
78 bool* err);
79 bool SendAndFlushSamples(BufferQueue* audio_buffers,
80 BufferQueue* video_buffers);
81 78
82 void Reset(); 79 void Reset();
83 80
84 // Checks to see if we have enough data in |queue_| to transition to 81 // Checks to see if we have enough data in |queue_| to transition to
85 // kEmittingSamples and start enqueuing samples. 82 // kEmittingSamples and start enqueuing samples.
86 bool HaveEnoughDataToEnqueueSamples(); 83 bool HaveEnoughDataToEnqueueSamples();
87 84
88 // Sets |highest_end_offset_| based on the data in |moov_| 85 // Sets |highest_end_offset_| based on the data in |moov_|
89 // and |moof|. Returns true if |highest_end_offset_| was successfully 86 // and |moof|. Returns true if |highest_end_offset_| was successfully
90 // computed. 87 // computed.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // prevent log spam. 130 // prevent log spam.
134 int num_top_level_box_skipped_; 131 int num_top_level_box_skipped_;
135 132
136 DISALLOW_COPY_AND_ASSIGN(MP4StreamParser); 133 DISALLOW_COPY_AND_ASSIGN(MP4StreamParser);
137 }; 134 };
138 135
139 } // namespace mp4 136 } // namespace mp4
140 } // namespace media 137 } // namespace media
141 138
142 #endif // MEDIA_FORMATS_MP4_MP4_STREAM_PARSER_H_ 139 #endif // MEDIA_FORMATS_MP4_MP4_STREAM_PARSER_H_
OLDNEW
« no previous file with comments | « media/formats/mp2t/mp2t_stream_parser_unittest.cc ('k') | media/formats/mp4/mp4_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698