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

Side by Side Diff: media/mp2t/es_parser_h264.h

Issue 136703005: Return an error on Multiple AUs in a PES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Documented return value of EmitFrameIfNeeded Created 6 years, 11 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 | « no previous file | media/mp2t/es_parser_h264.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_MP2T_ES_PARSER_H264_H_ 5 #ifndef MEDIA_MP2T_ES_PARSER_H264_H_
6 #define MEDIA_MP2T_ES_PARSER_H264_H_ 6 #define MEDIA_MP2T_ES_PARSER_H264_H_
7 7
8 #include <list> 8 #include <list>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 struct TimingDesc { 48 struct TimingDesc {
49 base::TimeDelta dts; 49 base::TimeDelta dts;
50 base::TimeDelta pts; 50 base::TimeDelta pts;
51 }; 51 };
52 52
53 // H264 parser. 53 // H264 parser.
54 // It resumes parsing from byte position |es_pos_|. 54 // It resumes parsing from byte position |es_pos_|.
55 bool ParseInternal(); 55 bool ParseInternal();
56 56
57 // Emit a frame if a frame has been started earlier. 57 // Emit a frame if a frame has been started earlier.
58 void EmitFrameIfNeeded(int next_aud_pos); 58 // Returns true if successful, false if no PTS is available for the frame.
59 bool EmitFrameIfNeeded(int next_aud_pos);
59 60
60 // Start a new frame. 61 // Start a new frame.
61 // Note: if aud_pos < 0, clear the current frame. 62 // Note: if aud_pos < 0, clear the current frame.
62 void StartFrame(int aud_pos); 63 void StartFrame(int aud_pos);
63 64
64 // Discard |nbytes| of ES from the ES byte queue. 65 // Discard |nbytes| of ES from the ES byte queue.
65 void DiscardEs(int nbytes); 66 void DiscardEs(int nbytes);
66 67
67 // Parse a NAL / SPS. 68 // Parse a NAL / SPS.
68 // Returns true if successful (compliant bitstream). 69 // Returns true if successful (compliant bitstream).
(...skipping 19 matching lines...) Expand all
88 89
89 // Last video decoder config. 90 // Last video decoder config.
90 VideoDecoderConfig last_video_decoder_config_; 91 VideoDecoderConfig last_video_decoder_config_;
91 }; 92 };
92 93
93 } // namespace mp2t 94 } // namespace mp2t
94 } // namespace media 95 } // namespace media
95 96
96 #endif 97 #endif
97 98
OLDNEW
« no previous file with comments | « no previous file | media/mp2t/es_parser_h264.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698