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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 bool OnNewBuffer( | 55 bool OnNewBuffer( |
56 const scoped_refptr<StreamParserBuffer>& stream_parser_buffer); | 56 const scoped_refptr<StreamParserBuffer>& stream_parser_buffer); |
57 | 57 |
58 private: | 58 private: |
59 typedef std::deque<scoped_refptr<StreamParserBuffer> > BufferQueue; | 59 typedef std::deque<scoped_refptr<StreamParserBuffer> > BufferQueue; |
60 typedef std::pair<int64_t, VideoDecoderConfig> ConfigEntry; | 60 typedef std::pair<int64_t, VideoDecoderConfig> ConfigEntry; |
61 | 61 |
62 void ProcessPendingBuffers(bool flush); | 62 void ProcessPendingBuffers(bool flush); |
63 | 63 |
64 // Return the PTS of the frame that comes just after |current_pts| in | 64 // Return the PTS of the frame that comes just after |current_pts| in |
65 // presentation order. Return kNoTimestamp() if not found. | 65 // presentation order. Return kNoTimestamp if not found. |
66 base::TimeDelta GetNextFramePts(base::TimeDelta current_pts); | 66 base::TimeDelta GetNextFramePts(base::TimeDelta current_pts); |
67 | 67 |
68 // Replace the leading non key frames by |stream_parser_buffer| | 68 // Replace the leading non key frames by |stream_parser_buffer| |
69 // (this one must be a key frame). | 69 // (this one must be a key frame). |
70 void ReplaceDiscardedFrames( | 70 void ReplaceDiscardedFrames( |
71 const scoped_refptr<StreamParserBuffer>& stream_parser_buffer); | 71 const scoped_refptr<StreamParserBuffer>& stream_parser_buffer); |
72 | 72 |
73 NewVideoConfigCB new_video_config_cb_; | 73 NewVideoConfigCB new_video_config_cb_; |
74 EmitBufferCB emit_buffer_cb_; | 74 EmitBufferCB emit_buffer_cb_; |
75 | 75 |
(...skipping 21 matching lines...) Expand all Loading... |
97 // Number of frames to replace with the first valid key frame. | 97 // Number of frames to replace with the first valid key frame. |
98 int discarded_frame_count_; | 98 int discarded_frame_count_; |
99 | 99 |
100 DISALLOW_COPY_AND_ASSIGN(EsAdapterVideo); | 100 DISALLOW_COPY_AND_ASSIGN(EsAdapterVideo); |
101 }; | 101 }; |
102 | 102 |
103 } // namespace mp2t | 103 } // namespace mp2t |
104 } // namespace media | 104 } // namespace media |
105 | 105 |
106 #endif // MEDIA_FORMATS_MP2T_ES_ADAPTER_VIDEO_H_ | 106 #endif // MEDIA_FORMATS_MP2T_ES_ADAPTER_VIDEO_H_ |
OLD | NEW |