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

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

Issue 239423005: Wire up codec_delay() to MP3StreamParser and FFmpegAudioDecoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ResetTimestampState() on config change. Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « media/filters/ffmpeg_audio_decoder.cc ('k') | media/filters/opus_audio_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 scoped_ptr<AudioTimestampHelper> output_timestamp_helper_; 59 scoped_ptr<AudioTimestampHelper> output_timestamp_helper_;
60 base::TimeDelta last_input_timestamp_; 60 base::TimeDelta last_input_timestamp_;
61 61
62 // Number of frames to be discarded from the start of the packet. This value 62 // Number of frames to be discarded from the start of the packet. This value
63 // is respected for all packets except for the first one in the stream. For 63 // is respected for all packets except for the first one in the stream. For
64 // the first packet in the stream, |frame_delay_at_start_| is used. This is 64 // the first packet in the stream, |frame_delay_at_start_| is used. This is
65 // usually set to the SeekPreRoll value from the container whenever a seek 65 // usually set to the SeekPreRoll value from the container whenever a seek
66 // happens. 66 // happens.
67 int frames_to_discard_; 67 int frames_to_discard_;
68 68
69 // Number of frames to be discarded at the start of the stream. This value 69 // When the input timestamp is |start_input_timestamp_| the decoder needs to
70 // is typically the CodecDelay value from the container. This value should 70 // drop |config_.codec_delay()| frames.
71 // only be applied when input timestamp is |start_input_timestamp_|.
72 int frame_delay_at_start_;
73 base::TimeDelta start_input_timestamp_; 71 base::TimeDelta start_input_timestamp_;
74 72
75 // Timestamp to be subtracted from all the frames. This is typically computed
76 // from the CodecDelay value in the container.
77 base::TimeDelta timestamp_offset_;
78
79 DISALLOW_IMPLICIT_CONSTRUCTORS(OpusAudioDecoder); 73 DISALLOW_IMPLICIT_CONSTRUCTORS(OpusAudioDecoder);
80 }; 74 };
81 75
82 } // namespace media 76 } // namespace media
83 77
84 #endif // MEDIA_FILTERS_OPUS_AUDIO_DECODER_H_ 78 #endif // MEDIA_FILTERS_OPUS_AUDIO_DECODER_H_
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_audio_decoder.cc ('k') | media/filters/opus_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698