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

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

Issue 1260193005: Fix incorrect opus seek preroll and flaky pre-skip removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test cases. Created 5 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_OPUS_AUDIO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_OPUS_AUDIO_DECODER_H_
6 #define MEDIA_FILTERS_OPUS_AUDIO_DECODER_H_ 6 #define MEDIA_FILTERS_OPUS_AUDIO_DECODER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "media/base/audio_decoder.h" 10 #include "media/base/audio_decoder.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void ResetTimestampState(); 50 void ResetTimestampState();
51 bool Decode(const scoped_refptr<DecoderBuffer>& input, 51 bool Decode(const scoped_refptr<DecoderBuffer>& input,
52 scoped_refptr<AudioBuffer>* output_buffer); 52 scoped_refptr<AudioBuffer>* output_buffer);
53 53
54 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 54 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
55 55
56 AudioDecoderConfig config_; 56 AudioDecoderConfig config_;
57 OutputCB output_cb_; 57 OutputCB output_cb_;
58 OpusMSDecoder* opus_decoder_; 58 OpusMSDecoder* opus_decoder_;
59 59
60 // When the input timestamp is |start_input_timestamp_| the decoder needs to 60 // Hack to allow MSE to correctly support webm codec delay for opus; if an
61 // drop |config_.codec_delay()| frames. 61 // input buffer comes in with a timestamp less than this and no discard
62 base::TimeDelta start_input_timestamp_; 62 // padding, the buffer will be marked for discard up to |start_timestamp_|.
63 base::TimeDelta start_timestamp_;
63 64
64 scoped_ptr<AudioDiscardHelper> discard_helper_; 65 scoped_ptr<AudioDiscardHelper> discard_helper_;
65 66
66 DISALLOW_IMPLICIT_CONSTRUCTORS(OpusAudioDecoder); 67 DISALLOW_IMPLICIT_CONSTRUCTORS(OpusAudioDecoder);
67 }; 68 };
68 69
69 } // namespace media 70 } // namespace media
70 71
71 #endif // MEDIA_FILTERS_OPUS_AUDIO_DECODER_H_ 72 #endif // MEDIA_FILTERS_OPUS_AUDIO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698