Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: media/filters/frame_processor.h

Issue 2035003002: MSE: Signal new coded frame group more aggressively (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | media/filters/frame_processor.cc » ('j') | media/filters/frame_processor.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 AudioDecoderConfig current_audio_config_; 145 AudioDecoderConfig current_audio_config_;
146 base::TimeDelta sample_duration_; 146 base::TimeDelta sample_duration_;
147 147
148 // The AppendMode of the associated SourceBuffer. 148 // The AppendMode of the associated SourceBuffer.
149 // See SetSequenceMode() for interpretation of |sequence_mode_|. 149 // See SetSequenceMode() for interpretation of |sequence_mode_|.
150 // Per http://www.w3.org/TR/media-source/#widl-SourceBuffer-mode: 150 // Per http://www.w3.org/TR/media-source/#widl-SourceBuffer-mode:
151 // Controls how a sequence of media segments are handled. This is initially 151 // Controls how a sequence of media segments are handled. This is initially
152 // set to false ("segments"). 152 // set to false ("segments").
153 bool sequence_mode_ = false; 153 bool sequence_mode_ = false;
154 154
155 // Flag to track whether or not the next processed frame is a continuation of 155 // Tracks whether or not the next processed frame is a continuation of
156 // a coded frame group. This flag resets to false upon detection of 156 // a coded frame group. Resets to kNoDecodeTimestamp() upon detection of
157 // discontinuity, and becomes true once a processed coded frame for the 157 // 'segments' mode discontinuity, parser reset during 'segments' mode, or
158 // current coded frame group is sent to its track buffer. 158 // switching from 'sequence' to 'segments' mode.
159 bool in_coded_frame_group_ = false; 159 // Once a processed coded frame is emitted for the current coded frame group,
160 // tracks the decode timestamp of the last frame emitted.
161 // Explicit setting of timestampOffset will trigger subsequent notification of
162 // a new coded frame start to the tracks' streams, even in 'sequence' mode, if
163 // the resulting frame has a DTS less than this.
164 DecodeTimestamp coded_frame_group_last_dts_ = kNoDecodeTimestamp();
160 165
161 // Tracks the MSE coded frame processing variable of same name. 166 // Tracks the MSE coded frame processing variable of same name.
162 // Initially kNoTimestamp(), meaning "unset". 167 // Initially kNoTimestamp(), meaning "unset".
163 base::TimeDelta group_start_timestamp_; 168 base::TimeDelta group_start_timestamp_;
164 169
165 // Tracks the MSE coded frame processing variable of same name. It stores the 170 // Tracks the MSE coded frame processing variable of same name. It stores the
166 // highest coded frame end timestamp across all coded frames in the current 171 // highest coded frame end timestamp across all coded frames in the current
167 // coded frame group. It is set to 0 when the SourceBuffer object is created 172 // coded frame group. It is set to 0 when the SourceBuffer object is created
168 // and gets updated by ProcessFrames(). 173 // and gets updated by ProcessFrames().
169 base::TimeDelta group_end_timestamp_; 174 base::TimeDelta group_end_timestamp_;
170 175
171 UpdateDurationCB update_duration_cb_; 176 UpdateDurationCB update_duration_cb_;
172 177
173 // MediaLog for reporting messages and properties to debug content and engine. 178 // MediaLog for reporting messages and properties to debug content and engine.
174 scoped_refptr<MediaLog> media_log_; 179 scoped_refptr<MediaLog> media_log_;
175 180
176 // Counters that limit spam to |media_log_| for frame processor warnings. 181 // Counters that limit spam to |media_log_| for frame processor warnings.
177 int num_dropped_preroll_warnings_ = 0; 182 int num_dropped_preroll_warnings_ = 0;
178 int num_dts_beyond_pts_warnings_ = 0; 183 int num_dts_beyond_pts_warnings_ = 0;
179 184
180 DISALLOW_COPY_AND_ASSIGN(FrameProcessor); 185 DISALLOW_COPY_AND_ASSIGN(FrameProcessor);
181 }; 186 };
182 187
183 } // namespace media 188 } // namespace media
184 189
185 #endif // MEDIA_FILTERS_FRAME_PROCESSOR_H_ 190 #endif // MEDIA_FILTERS_FRAME_PROCESSOR_H_
OLDNEW
« no previous file with comments | « no previous file | media/filters/frame_processor.cc » ('j') | media/filters/frame_processor.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698