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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // Resets state for the coded frame processing algorithm as described in steps | 83 // Resets state for the coded frame processing algorithm as described in steps |
84 // 2-5 of the MSE Reset Parser State algorithm described at | 84 // 2-5 of the MSE Reset Parser State algorithm described at |
85 // http://www.w3.org/TR/media-source/#sourcebuffer-reset-parser-state | 85 // http://www.w3.org/TR/media-source/#sourcebuffer-reset-parser-state |
86 void Reset(); | 86 void Reset(); |
87 | 87 |
88 // Must be called when the audio config is updated. Used to manage when | 88 // Must be called when the audio config is updated. Used to manage when |
89 // the preroll buffer is cleared and the allowed "fudge" factor between | 89 // the preroll buffer is cleared and the allowed "fudge" factor between |
90 // preroll buffers. | 90 // preroll buffers. |
91 void OnPossibleAudioConfigUpdate(const AudioDecoderConfig& config); | 91 void OnPossibleAudioConfigUpdate(const AudioDecoderConfig& config); |
92 | 92 |
| 93 // Must be called when the range removal algorithm has removed frames from the |
| 94 // track associated with |track_id| in the inclusive range [|start_dts|, |
| 95 // |end_dts|]. |
| 96 // Used to detect a potentially introduced append discontinuity caused by |
| 97 // the range removal algorithm. |
| 98 // Returns false on error, such as if |track_id| is unknown. Otherwise returns |
| 99 // true. |
| 100 bool OnRangeRemoval(StreamParser::TrackId track_id, |
| 101 DecodeTimestamp start_dts, |
| 102 DecodeTimestamp end_dts); |
| 103 |
93 private: | 104 private: |
94 typedef std::map<StreamParser::TrackId, MseTrackBuffer*> TrackBufferMap; | 105 typedef std::map<StreamParser::TrackId, MseTrackBuffer*> TrackBufferMap; |
95 | 106 |
96 // If |track_buffers_| contains |id|, returns a pointer to the associated | 107 // If |track_buffers_| contains |id|, returns a pointer to the associated |
97 // MseTrackBuffer. Otherwise, returns NULL. | 108 // MseTrackBuffer. Otherwise, returns NULL. |
98 MseTrackBuffer* FindTrack(StreamParser::TrackId id); | 109 MseTrackBuffer* FindTrack(StreamParser::TrackId id); |
99 | 110 |
100 // Signals all track buffers' streams that a new media segment is starting | 111 // Signals all track buffers' streams that a new media segment is starting |
101 // with decode timestamp |segment_timestamp|. | 112 // with decode timestamp |segment_timestamp|. |
102 void NotifyNewMediaSegmentStarting(DecodeTimestamp segment_timestamp); | 113 void NotifyNewMediaSegmentStarting(DecodeTimestamp segment_timestamp); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 base::TimeDelta group_end_timestamp_; | 175 base::TimeDelta group_end_timestamp_; |
165 | 176 |
166 UpdateDurationCB update_duration_cb_; | 177 UpdateDurationCB update_duration_cb_; |
167 | 178 |
168 DISALLOW_COPY_AND_ASSIGN(FrameProcessor); | 179 DISALLOW_COPY_AND_ASSIGN(FrameProcessor); |
169 }; | 180 }; |
170 | 181 |
171 } // namespace media | 182 } // namespace media |
172 | 183 |
173 #endif // MEDIA_FILTERS_FRAME_PROCESSOR_H_ | 184 #endif // MEDIA_FILTERS_FRAME_PROCESSOR_H_ |
OLD | NEW |