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

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

Issue 1954633002: MEDIA_LOG for large encoded timestamp gaps in decoder stream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: New AudioTimestampValidator class and tests 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
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_DECODER_STREAM_H_ 5 #ifndef MEDIA_FILTERS_DECODER_STREAM_H_
6 #define MEDIA_FILTERS_DECODER_STREAM_H_ 6 #define MEDIA_FILTERS_DECODER_STREAM_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory>
9 10
10 #include "base/callback.h" 11 #include "base/callback.h"
11 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
12 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_vector.h" 14 #include "base/memory/scoped_vector.h"
14 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
15 #include "media/base/audio_decoder.h" 16 #include "media/base/audio_decoder.h"
17 #include "media/base/audio_timestamp_helper.h"
16 #include "media/base/demuxer_stream.h" 18 #include "media/base/demuxer_stream.h"
17 #include "media/base/media_export.h" 19 #include "media/base/media_export.h"
18 #include "media/base/media_log.h" 20 #include "media/base/media_log.h"
19 #include "media/base/moving_average.h" 21 #include "media/base/moving_average.h"
20 #include "media/base/pipeline_status.h" 22 #include "media/base/pipeline_status.h"
21 #include "media/base/timestamp_constants.h" 23 #include "media/base/timestamp_constants.h"
24 #include "media/filters/audio_timestamp_validator.h"
22 #include "media/filters/decoder_selector.h" 25 #include "media/filters/decoder_selector.h"
23 #include "media/filters/decoder_stream_traits.h" 26 #include "media/filters/decoder_stream_traits.h"
24 27
25 namespace base { 28 namespace base {
26 class SingleThreadTaskRunner; 29 class SingleThreadTaskRunner;
27 } 30 }
28 31
29 namespace media { 32 namespace media {
30 33
31 class CdmContext; 34 class CdmContext;
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 std::deque<scoped_refptr<DecoderBuffer>> fallback_buffers_; 252 std::deque<scoped_refptr<DecoderBuffer>> fallback_buffers_;
250 253
251 // TODO(tguilbert): support config changes during decoder fallback, see 254 // TODO(tguilbert): support config changes during decoder fallback, see
252 // crbug.com/603713 255 // crbug.com/603713
253 bool received_config_change_during_reinit_; 256 bool received_config_change_during_reinit_;
254 257
255 // Used to track read requests in case the STATE_PENDIND_DEMUXER_READ get 258 // Used to track read requests in case the STATE_PENDIND_DEMUXER_READ get
256 // overwritten by an error. 259 // overwritten by an error.
257 bool pending_demuxer_read_; 260 bool pending_demuxer_read_;
258 261
262 std::unique_ptr<AudioTimestampValidator> audio_ts_validator_;
263
259 // NOTE: Weak pointers must be invalidated before all other member variables. 264 // NOTE: Weak pointers must be invalidated before all other member variables.
260 base::WeakPtrFactory<DecoderStream<StreamType>> weak_factory_; 265 base::WeakPtrFactory<DecoderStream<StreamType>> weak_factory_;
261 266
262 // Used to invalidate pending decode requests and output callbacks when 267 // Used to invalidate pending decode requests and output callbacks when
263 // falling back to a new decoder (on first decode error). 268 // falling back to a new decoder (on first decode error).
264 base::WeakPtrFactory<DecoderStream<StreamType>> fallback_weak_factory_; 269 base::WeakPtrFactory<DecoderStream<StreamType>> fallback_weak_factory_;
265 }; 270 };
266 271
267 template <> 272 template <>
268 bool DecoderStream<DemuxerStream::AUDIO>::CanReadWithoutStalling() const; 273 bool DecoderStream<DemuxerStream::AUDIO>::CanReadWithoutStalling() const;
269 274
270 template <> 275 template <>
271 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const; 276 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const;
272 277
273 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; 278 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream;
274 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream; 279 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream;
275 280
276 } // namespace media 281 } // namespace media
277 282
278 #endif // MEDIA_FILTERS_DECODER_STREAM_H_ 283 #endif // MEDIA_FILTERS_DECODER_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698