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

Unified Diff: media/filters/ffmpeg_audio_decoder.h

Issue 10831020: Refactor FFmpegAudioDecoder output timestamp logic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/filters/ffmpeg_audio_decoder.cc » ('j') | media/filters/ffmpeg_audio_decoder.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_audio_decoder.h
diff --git a/media/filters/ffmpeg_audio_decoder.h b/media/filters/ffmpeg_audio_decoder.h
index 46af8f0b2340160d2378d512da9c8f2e6ae95522..26692f3e7fb2dadebc848ec3b28cbb54eb949e56 100644
--- a/media/filters/ffmpeg_audio_decoder.h
+++ b/media/filters/ffmpeg_audio_decoder.h
@@ -52,13 +52,7 @@ class MEDIA_EXPORT FFmpegAudioDecoder : public AudioDecoder {
void DecodeBuffer(DemuxerStream::Status status,
const scoped_refptr<DecoderBuffer>& buffer);
- // Updates the output buffer's duration and timestamp based on the input
- // buffer. Will fall back to an estimated timestamp if the input lacks a
- // valid timestamp.
- void UpdateDurationAndTimestamp(const Buffer* input, DataBuffer* output);
-
- // Calculates duration based on size of decoded audio bytes.
- base::TimeDelta CalculateDuration(int size);
+ base::TimeDelta GetNextOutputTimestamp() const;
scherkus (not reviewing) 2012/07/26 01:43:08 docs
acolwell GONE FROM CHROMIUM 2012/07/27 20:45:29 Done.
// This is !is_null() iff Initialize() hasn't been called.
base::Callback<MessageLoop*()> message_loop_factory_cb_;
@@ -73,7 +67,10 @@ class MEDIA_EXPORT FFmpegAudioDecoder : public AudioDecoder {
ChannelLayout channel_layout_;
int samples_per_second_;
- base::TimeDelta estimated_next_timestamp_;
+ int bytes_per_frame_;
scherkus (not reviewing) 2012/07/26 01:43:08 nit: I'd add one-liner comment describing what the
acolwell GONE FROM CHROMIUM 2012/07/27 20:45:29 Done.
+ base::TimeDelta total_frames_base_;
scherkus (not reviewing) 2012/07/26 01:43:08 when I read "total_frames_base_" I thought it had
acolwell GONE FROM CHROMIUM 2012/07/27 20:45:29 Done.
+ int64 total_frames_decoded_;
+ base::TimeDelta last_input_timestamp_;
// Holds decoded audio.
AVFrame* av_frame_;
« no previous file with comments | « no previous file | media/filters/ffmpeg_audio_decoder.cc » ('j') | media/filters/ffmpeg_audio_decoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698