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

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: Switch codec_delay() to frames. 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') | media/filters/ffmpeg_audio_decoder.cc » ('J')
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..4c544fccfc05f5c22b8bbc13fa44db3aea80e283 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 samples.
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 samples the decoder should discard before
acolwell GONE FROM CHROMIUM 2014/04/17 21:11:24 nit: s/samples/frames/ . I know there are mixed si
DaleCurtis 2014/04/17 21:42:49 Done.
+ // 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') | media/filters/ffmpeg_audio_decoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698