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

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

Issue 1289923003: Refactor AnnexB bitstream conversion for AVC/H.264 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@annexb-avc-fix
Patch Set: Added a few comments Created 5 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
« no previous file with comments | « media/formats/mp4/box_definitions.cc ('k') | media/formats/mp4/mp4_stream_parser.cc » ('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 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 <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // to |max_clear_offset|, updating the |mdat_tail_| value so that framing can 61 // to |max_clear_offset|, updating the |mdat_tail_| value so that framing can
62 // be retained after all 'mdat' information has been read. |max_clear_offset| 62 // be retained after all 'mdat' information has been read. |max_clear_offset|
63 // is the upper bound on what can be removed from |queue_|. Anything below 63 // is the upper bound on what can be removed from |queue_|. Anything below
64 // this offset is no longer needed by the parser. 64 // this offset is no longer needed by the parser.
65 // Returns 'true' on success, 'false' if there was an error. 65 // Returns 'true' on success, 'false' if there was an error.
66 bool ReadAndDiscardMDATsUntil(int64 max_clear_offset); 66 bool ReadAndDiscardMDATsUntil(int64 max_clear_offset);
67 67
68 void ChangeState(State new_state); 68 void ChangeState(State new_state);
69 69
70 bool EmitConfigs(); 70 bool EmitConfigs();
71 bool PrepareAVCBuffer(const AVCDecoderConfigurationRecord& avc_config,
72 std::vector<uint8>* frame_buf,
73 std::vector<SubsampleEntry>* subsamples) const;
74 bool PrepareAACBuffer(const AAC& aac_config, 71 bool PrepareAACBuffer(const AAC& aac_config,
75 std::vector<uint8>* frame_buf, 72 std::vector<uint8>* frame_buf,
76 std::vector<SubsampleEntry>* subsamples) const; 73 std::vector<SubsampleEntry>* subsamples) const;
77 bool EnqueueSample(BufferQueue* audio_buffers, 74 bool EnqueueSample(BufferQueue* audio_buffers,
78 BufferQueue* video_buffers, 75 BufferQueue* video_buffers,
79 bool* err); 76 bool* err);
80 bool SendAndFlushSamples(BufferQueue* audio_buffers, 77 bool SendAndFlushSamples(BufferQueue* audio_buffers,
81 BufferQueue* video_buffers); 78 BufferQueue* video_buffers);
82 79
83 void Reset(); 80 void Reset();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // prevent log spam. 131 // prevent log spam.
135 int num_top_level_box_skipped_; 132 int num_top_level_box_skipped_;
136 133
137 DISALLOW_COPY_AND_ASSIGN(MP4StreamParser); 134 DISALLOW_COPY_AND_ASSIGN(MP4StreamParser);
138 }; 135 };
139 136
140 } // namespace mp4 137 } // namespace mp4
141 } // namespace media 138 } // namespace media
142 139
143 #endif // MEDIA_FORMATS_MP4_MP4_STREAM_PARSER_H_ 140 #endif // MEDIA_FORMATS_MP4_MP4_STREAM_PARSER_H_
OLDNEW
« no previous file with comments | « media/formats/mp4/box_definitions.cc ('k') | media/formats/mp4/mp4_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698