Index: webkit/media/crypto/ppapi/ffmpeg_cdm_audio_decoder.h |
diff --git a/webkit/media/crypto/ppapi/ffmpeg_cdm_audio_decoder.h b/webkit/media/crypto/ppapi/ffmpeg_cdm_audio_decoder.h |
index 51efb6b8185bb30215116d99c766030a66759a6a..e328ac2c470b999931c5b1908e4b6fb27bcbf8fe 100644 |
--- a/webkit/media/crypto/ppapi/ffmpeg_cdm_audio_decoder.h |
+++ b/webkit/media/crypto/ppapi/ffmpeg_cdm_audio_decoder.h |
@@ -8,6 +8,7 @@ |
#include <vector> |
#include "base/basictypes.h" |
+#include "base/memory/scoped_ptr.h" |
#include "base/time.h" |
#include "base/compiler_specific.h" |
#include "webkit/media/crypto/ppapi/cdm/content_decryption_module.h" |
@@ -15,6 +16,11 @@ |
struct AVCodecContext; |
struct AVFrame; |
+namespace media { |
+class AudioBus; |
+class AudioTimestampHelper; |
+} |
+ |
namespace webkit_media { |
class FFmpegCdmAudioDecoder { |
@@ -38,7 +44,7 @@ class FFmpegCdmAudioDecoder { |
cdm::AudioFrames* decoded_frames); |
private: |
- void ResetAudioTimingData(); |
+ void ResetTimestampState(); |
void ReleaseFFmpegResources(); |
base::TimeDelta GetNextOutputTimestamp() const; |
@@ -58,11 +64,14 @@ class FFmpegCdmAudioDecoder { |
int samples_per_second_; |
// Used for computing output timestamps. |
+ scoped_ptr<media::AudioTimestampHelper> output_timestamp_helper_; |
int bytes_per_frame_; |
- base::TimeDelta output_timestamp_base_; |
- int64_t total_frames_decoded_; |
base::TimeDelta last_input_timestamp_; |
+ // We may need to convert the audio data coming out of FFmpeg from planar |
+ // float to integer. |
+ scoped_ptr<media::AudioBus> converter_bus_; |
+ |
// Number of output sample bytes to drop before generating output buffers. |
// This is required for handling negative timestamps when decoding Vorbis |
// audio, for example. |