| OLD | NEW |
| 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_MP2T_ES_PARSER_H264_H_ | 5 #ifndef MEDIA_FORMATS_MP2T_ES_PARSER_H264_H_ |
| 6 #define MEDIA_FORMATS_MP2T_ES_PARSER_H264_H_ | 6 #define MEDIA_FORMATS_MP2T_ES_PARSER_H264_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 public: | 36 public: |
| 37 typedef base::Callback<void(const VideoDecoderConfig&)> NewVideoConfigCB; | 37 typedef base::Callback<void(const VideoDecoderConfig&)> NewVideoConfigCB; |
| 38 | 38 |
| 39 EsParserH264(const NewVideoConfigCB& new_video_config_cb, | 39 EsParserH264(const NewVideoConfigCB& new_video_config_cb, |
| 40 const EmitBufferCB& emit_buffer_cb); | 40 const EmitBufferCB& emit_buffer_cb); |
| 41 virtual ~EsParserH264(); | 41 virtual ~EsParserH264(); |
| 42 | 42 |
| 43 // EsParser implementation. | 43 // EsParser implementation. |
| 44 virtual bool Parse(const uint8* buf, int size, | 44 virtual bool Parse(const uint8* buf, int size, |
| 45 base::TimeDelta pts, | 45 base::TimeDelta pts, |
| 46 base::TimeDelta dts) OVERRIDE; | 46 DecodeTimestamp dts) OVERRIDE; |
| 47 virtual void Flush() OVERRIDE; | 47 virtual void Flush() OVERRIDE; |
| 48 virtual void Reset() OVERRIDE; | 48 virtual void Reset() OVERRIDE; |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 struct TimingDesc { | 51 struct TimingDesc { |
| 52 base::TimeDelta dts; | 52 DecodeTimestamp dts; |
| 53 base::TimeDelta pts; | 53 base::TimeDelta pts; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 // Find the AUD located at or after |*stream_pos|. | 56 // Find the AUD located at or after |*stream_pos|. |
| 57 // Return true if an AUD is found. | 57 // Return true if an AUD is found. |
| 58 // If found, |*stream_pos| corresponds to the position of the AUD start code | 58 // If found, |*stream_pos| corresponds to the position of the AUD start code |
| 59 // in the stream. Otherwise, |*stream_pos| corresponds to the last position | 59 // in the stream. Otherwise, |*stream_pos| corresponds to the last position |
| 60 // of the start code parser. | 60 // of the start code parser. |
| 61 bool FindAUD(int64* stream_pos); | 61 bool FindAUD(int64* stream_pos); |
| 62 | 62 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 89 // Last video decoder config. | 89 // Last video decoder config. |
| 90 VideoDecoderConfig last_video_decoder_config_; | 90 VideoDecoderConfig last_video_decoder_config_; |
| 91 | 91 |
| 92 DISALLOW_COPY_AND_ASSIGN(EsParserH264); | 92 DISALLOW_COPY_AND_ASSIGN(EsParserH264); |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 } // namespace mp2t | 95 } // namespace mp2t |
| 96 } // namespace media | 96 } // namespace media |
| 97 | 97 |
| 98 #endif | 98 #endif |
| 99 | |
| OLD | NEW |