| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BASE_ANDROID_AUDIO_MEDIA_CODEC_DECODER_H_ | 5 #ifndef MEDIA_BASE_ANDROID_AUDIO_MEDIA_CODEC_DECODER_H_ |
| 6 #define MEDIA_BASE_ANDROID_AUDIO_MEDIA_CODEC_DECODER_H_ | 6 #define MEDIA_BASE_ANDROID_AUDIO_MEDIA_CODEC_DECODER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <memory> |
| 10 | 11 |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "media/base/android/media_codec_decoder.h" | 13 #include "media/base/android/media_codec_decoder.h" |
| 13 | 14 |
| 14 namespace media { | 15 namespace media { |
| 15 | 16 |
| 16 class AudioTimestampHelper; | 17 class AudioTimestampHelper; |
| 17 | 18 |
| 18 // Audio decoder for MediaCodecPlayer | 19 // Audio decoder for MediaCodecPlayer |
| 19 class AudioMediaCodecDecoder : public MediaCodecDecoder { | 20 class AudioMediaCodecDecoder : public MediaCodecDecoder { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // The sampling rate received from decoder. | 81 // The sampling rate received from decoder. |
| 81 int output_sampling_rate_; | 82 int output_sampling_rate_; |
| 82 | 83 |
| 83 // Frame count to sync with audio codec output. | 84 // Frame count to sync with audio codec output. |
| 84 int64_t frame_count_; | 85 int64_t frame_count_; |
| 85 | 86 |
| 86 // Base timestamp for the |audio_timestamp_helper_|. | 87 // Base timestamp for the |audio_timestamp_helper_|. |
| 87 base::TimeDelta base_timestamp_; | 88 base::TimeDelta base_timestamp_; |
| 88 | 89 |
| 89 // Object to calculate the current audio timestamp for A/V sync. | 90 // Object to calculate the current audio timestamp for A/V sync. |
| 90 scoped_ptr<AudioTimestampHelper> audio_timestamp_helper_; | 91 std::unique_ptr<AudioTimestampHelper> audio_timestamp_helper_; |
| 91 | 92 |
| 92 // Reports current playback time to the callee. | 93 // Reports current playback time to the callee. |
| 93 SetTimeCallback update_current_time_cb_; | 94 SetTimeCallback update_current_time_cb_; |
| 94 | 95 |
| 95 // The time limit for the next frame to avoid underrun. | 96 // The time limit for the next frame to avoid underrun. |
| 96 base::TimeTicks next_frame_time_limit_; | 97 base::TimeTicks next_frame_time_limit_; |
| 97 | 98 |
| 98 DISALLOW_COPY_AND_ASSIGN(AudioMediaCodecDecoder); | 99 DISALLOW_COPY_AND_ASSIGN(AudioMediaCodecDecoder); |
| 99 }; | 100 }; |
| 100 | 101 |
| 101 } // namespace media | 102 } // namespace media |
| 102 | 103 |
| 103 #endif // MEDIA_BASE_ANDROID_AUDIO_MEDIA_CODEC_DECODER_H_ | 104 #endif // MEDIA_BASE_ANDROID_AUDIO_MEDIA_CODEC_DECODER_H_ |
| OLD | NEW |