OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |