OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_FFMPEG_AUDIO_DECODER_H_ | 5 #ifndef MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ |
6 #define MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ | 6 #define MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 // Methods running on decoder thread. | 36 // Methods running on decoder thread. |
37 void DoInitialize(const scoped_refptr<DemuxerStream>& stream, | 37 void DoInitialize(const scoped_refptr<DemuxerStream>& stream, |
38 const base::Closure& callback, | 38 const base::Closure& callback, |
39 const StatisticsCallback& stats_callback); | 39 const StatisticsCallback& stats_callback); |
40 void DoFlush(const base::Closure& callback); | 40 void DoFlush(const base::Closure& callback); |
41 void DoProduceAudioSamples(const scoped_refptr<Buffer>& output); | 41 void DoProduceAudioSamples(const scoped_refptr<Buffer>& output); |
42 void DoDecodeBuffer(const scoped_refptr<Buffer>& input); | 42 void DoDecodeBuffer(const scoped_refptr<Buffer>& input); |
43 | 43 |
44 // Reads from the demuxer stream with corresponding callback method. | 44 // Reads from the demuxer stream with corresponding callback method. |
45 void ReadFromDemuxerStream(); | 45 void ReadFromDemuxerStream(); |
46 void DecodeBuffer(Buffer* buffer); | 46 void DecodeBuffer(const scoped_refptr<Buffer>& buffer); |
47 | 47 |
48 // Updates the output buffer's duration and timestamp based on the input | 48 // Updates the output buffer's duration and timestamp based on the input |
49 // buffer. Will fall back to an estimated timestamp if the input lacks a | 49 // buffer. Will fall back to an estimated timestamp if the input lacks a |
50 // valid timestamp. | 50 // valid timestamp. |
51 void UpdateDurationAndTimestamp(const Buffer* input, DataBuffer* output); | 51 void UpdateDurationAndTimestamp(const Buffer* input, DataBuffer* output); |
52 | 52 |
53 // Calculates duration based on size of decoded audio bytes. | 53 // Calculates duration based on size of decoded audio bytes. |
54 base::TimeDelta CalculateDuration(int size); | 54 base::TimeDelta CalculateDuration(int size); |
55 | 55 |
56 MessageLoop* message_loop_; | 56 MessageLoop* message_loop_; |
(...skipping 20 matching lines...) Expand all Loading... |
77 | 77 |
78 // Tracks reads issued for compressed data. | 78 // Tracks reads issued for compressed data. |
79 int pending_reads_; | 79 int pending_reads_; |
80 | 80 |
81 DISALLOW_IMPLICIT_CONSTRUCTORS(FFmpegAudioDecoder); | 81 DISALLOW_IMPLICIT_CONSTRUCTORS(FFmpegAudioDecoder); |
82 }; | 82 }; |
83 | 83 |
84 } // namespace media | 84 } // namespace media |
85 | 85 |
86 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ | 86 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ |
OLD | NEW |