| 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_ADAPTER_VIDEO_H_ | 5 #ifndef MEDIA_FORMATS_MP2T_ES_ADAPTER_VIDEO_H_ |
| 6 #define MEDIA_FORMATS_MP2T_ES_ADAPTER_VIDEO_H_ | 6 #define MEDIA_FORMATS_MP2T_ES_ADAPTER_VIDEO_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "media/base/media_export.h" | 15 #include "media/base/media_export.h" |
| 16 #include "media/base/stream_parser_buffer.h" |
| 16 | 17 |
| 17 namespace media { | 18 namespace media { |
| 18 class StreamParserBuffer; | 19 |
| 19 class VideoDecoderConfig; | 20 class VideoDecoderConfig; |
| 20 | 21 |
| 21 namespace mp2t { | 22 namespace mp2t { |
| 22 | 23 |
| 23 // Some constraints of the MSE spec are not necessarily met by video streams | 24 // Some constraints of the MSE spec are not necessarily met by video streams |
| 24 // inside an Mpeg2 TS stream. | 25 // inside an Mpeg2 TS stream. |
| 25 // The goal of the ES adapter is to modify the incoming buffers to meet these | 26 // The goal of the ES adapter is to modify the incoming buffers to meet these |
| 26 // constraints, e.g. | 27 // constraints, e.g. |
| 27 // - get the frame duration, | 28 // - get the frame duration, |
| 28 // - replace the leading non-key frames by the first key frame to avoid | 29 // - replace the leading non-key frames by the first key frame to avoid |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // Global index of the first buffer in |buffer_list_|. | 81 // Global index of the first buffer in |buffer_list_|. |
| 81 int64 buffer_index_; | 82 int64 buffer_index_; |
| 82 | 83 |
| 83 // List of buffer to be emitted and PTS of frames already emitted. | 84 // List of buffer to be emitted and PTS of frames already emitted. |
| 84 BufferQueue buffer_list_; | 85 BufferQueue buffer_list_; |
| 85 std::list<base::TimeDelta> emitted_pts_; | 86 std::list<base::TimeDelta> emitted_pts_; |
| 86 | 87 |
| 87 // - Minimum PTS of discarded frames. | 88 // - Minimum PTS of discarded frames. |
| 88 // - DTS of discarded frames. | 89 // - DTS of discarded frames. |
| 89 base::TimeDelta discarded_frames_min_pts_; | 90 base::TimeDelta discarded_frames_min_pts_; |
| 90 std::list<base::TimeDelta> discarded_frames_dts_; | 91 std::list<DecodeTimestamp> discarded_frames_dts_; |
| 91 | 92 |
| 92 DISALLOW_COPY_AND_ASSIGN(EsAdapterVideo); | 93 DISALLOW_COPY_AND_ASSIGN(EsAdapterVideo); |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 } // namespace mp2t | 96 } // namespace mp2t |
| 96 } // namespace media | 97 } // namespace media |
| 97 | 98 |
| 98 #endif // MEDIA_FORMATS_MP2T_ES_ADAPTER_VIDEO_H_ | 99 #endif // MEDIA_FORMATS_MP2T_ES_ADAPTER_VIDEO_H_ |
| OLD | NEW |