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_FILTERS_FRAME_PROCESSOR_H_ | 5 #ifndef MEDIA_FILTERS_FRAME_PROCESSOR_H_ |
6 #define MEDIA_FILTERS_FRAME_PROCESSOR_H_ | 6 #define MEDIA_FILTERS_FRAME_PROCESSOR_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 bool FlushProcessedFrames(); | 107 bool FlushProcessedFrames(); |
108 | 108 |
109 // Handles partial append window trimming of |buffer|. Returns true if the | 109 // Handles partial append window trimming of |buffer|. Returns true if the |
110 // given |buffer| can be partially trimmed or have preroll added; otherwise, | 110 // given |buffer| can be partially trimmed or have preroll added; otherwise, |
111 // returns false. | 111 // returns false. |
112 // | 112 // |
113 // If |buffer| overlaps |append_window_start|, the portion of |buffer| before | 113 // If |buffer| overlaps |append_window_start|, the portion of |buffer| before |
114 // |append_window_start| will be marked for post-decode discard. Further, if | 114 // |append_window_start| will be marked for post-decode discard. Further, if |
115 // |audio_preroll_buffer_| exists and abuts |buffer|, it will be set as | 115 // |audio_preroll_buffer_| exists and abuts |buffer|, it will be set as |
116 // preroll on |buffer| and |audio_preroll_buffer_| will be cleared. If the | 116 // preroll on |buffer| and |audio_preroll_buffer_| will be cleared. If the |
117 // preroll buffer does not abut |buffer|, it will be discarded, but not used. | 117 // preroll buffer does not abut |buffer|, it will be discarded unused. |
| 118 // |
| 119 // Likewise, if |buffer| overlaps |append_window_end|, the portion of |buffer| |
| 120 // after |append_window_end| will be marked for post-decode discard. |
118 // | 121 // |
119 // If |buffer| lies entirely before |append_window_start|, and thus would | 122 // If |buffer| lies entirely before |append_window_start|, and thus would |
120 // normally be discarded, |audio_preroll_buffer_| will be set to |buffer| and | 123 // normally be discarded, |audio_preroll_buffer_| will be set to |buffer| and |
121 // the method will return false. | 124 // the method will return false. |
122 bool HandlePartialAppendWindowTrimming( | 125 bool HandlePartialAppendWindowTrimming( |
123 base::TimeDelta append_window_start, | 126 base::TimeDelta append_window_start, |
124 base::TimeDelta append_window_end, | 127 base::TimeDelta append_window_end, |
125 const scoped_refptr<StreamParserBuffer>& buffer); | 128 const scoped_refptr<StreamParserBuffer>& buffer); |
126 | 129 |
127 // Helper that processes one frame with the coded frame processing algorithm. | 130 // Helper that processes one frame with the coded frame processing algorithm. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 base::TimeDelta group_end_timestamp_; | 164 base::TimeDelta group_end_timestamp_; |
162 | 165 |
163 UpdateDurationCB update_duration_cb_; | 166 UpdateDurationCB update_duration_cb_; |
164 | 167 |
165 DISALLOW_COPY_AND_ASSIGN(FrameProcessor); | 168 DISALLOW_COPY_AND_ASSIGN(FrameProcessor); |
166 }; | 169 }; |
167 | 170 |
168 } // namespace media | 171 } // namespace media |
169 | 172 |
170 #endif // MEDIA_FILTERS_FRAME_PROCESSOR_H_ | 173 #endif // MEDIA_FILTERS_FRAME_PROCESSOR_H_ |
OLD | NEW |