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

Unified Diff: media/base/audio_decoder_config.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/base/audio_decoder_config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_decoder_config.h
diff --git a/media/base/audio_decoder_config.h b/media/base/audio_decoder_config.h
index c529909975c4a1d63458c859f8756702c67b95c6..c8c7b47d23dd795f2a952e8b45db5b81eb211223 100644
--- a/media/base/audio_decoder_config.h
+++ b/media/base/audio_decoder_config.h
@@ -63,13 +63,13 @@ class MEDIA_EXPORT AudioDecoderConfig {
~AudioDecoderConfig();
- // Resets the internal state of this object.
+ // Resets the internal state of this object. |codec_delay| is in frames.
void Initialize(AudioCodec codec, SampleFormat sample_format,
ChannelLayout channel_layout, int samples_per_second,
const uint8* extra_data, size_t extra_data_size,
bool is_encrypted, bool record_stats,
base::TimeDelta seek_preroll,
- base::TimeDelta codec_delay);
+ int codec_delay);
// Returns true if this object has appropriate configuration values, false
// otherwise.
@@ -91,7 +91,7 @@ class MEDIA_EXPORT AudioDecoderConfig {
SampleFormat sample_format() const { return sample_format_; }
int bytes_per_frame() const { return bytes_per_frame_; }
base::TimeDelta seek_preroll() const { return seek_preroll_; }
- base::TimeDelta codec_delay() const { return codec_delay_; }
+ int codec_delay() const { return codec_delay_; }
// Optional byte data required to initialize audio decoders such as Vorbis
// codebooks.
@@ -119,10 +119,10 @@ class MEDIA_EXPORT AudioDecoderConfig {
// before the decoded data is valid.
base::TimeDelta seek_preroll_;
- // |codec_delay_| is the overall delay overhead added by the codec while
- // encoding. This value should be subtracted from each block's timestamp to
- // get the actual timestamp.
- base::TimeDelta codec_delay_;
+ // |codec_delay_| is the number of frames the decoder should discard before
+ // returning decoded data. This value can include both decoder delay as well
+ // as padding added during encoding.
+ int codec_delay_;
// Not using DISALLOW_COPY_AND_ASSIGN here intentionally to allow the compiler
// generated copy constructor and assignment operator. Since the extra data is
« no previous file with comments | « no previous file | media/base/audio_decoder_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698