| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_DECODER_JOB_H_ | 5 #ifndef MEDIA_BASE_ANDROID_AUDIO_DECODER_JOB_H_ |
| 6 #define MEDIA_BASE_ANDROID_AUDIO_DECODER_JOB_H_ | 6 #define MEDIA_BASE_ANDROID_AUDIO_DECODER_JOB_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 void SetDemuxerConfigs(const DemuxerConfigs& configs) override; | 36 void SetDemuxerConfigs(const DemuxerConfigs& configs) override; |
| 37 | 37 |
| 38 // Sets the volume of the audio output. | 38 // Sets the volume of the audio output. |
| 39 void SetVolume(double volume); | 39 void SetVolume(double volume); |
| 40 | 40 |
| 41 // Sets the base timestamp for |audio_timestamp_helper_|. | 41 // Sets the base timestamp for |audio_timestamp_helper_|. |
| 42 void SetBaseTimestamp(base::TimeDelta base_timestamp); | 42 void SetBaseTimestamp(base::TimeDelta base_timestamp); |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 // MediaDecoderJob implementation. | 45 // MediaDecoderJob implementation. |
| 46 void ReleaseOutputBuffer( | 46 void ReleaseOutputBuffer(int output_buffer_index, |
| 47 int output_buffer_index, | 47 size_t offset, |
| 48 size_t offset, | 48 size_t size, |
| 49 size_t size, | 49 bool render_output, |
| 50 bool render_output, | 50 bool is_late_frame, |
| 51 bool is_late_frame, | 51 base::TimeDelta current_presentation_timestamp, |
| 52 base::TimeDelta current_presentation_timestamp, | 52 MediaCodecStatus status, |
| 53 const ReleaseOutputCompletionCallback& callback) override; | 53 const DecoderCallback& callback) override; |
| 54 bool ComputeTimeToRender() const override; | 54 bool ComputeTimeToRender() const override; |
| 55 bool AreDemuxerConfigsChanged(const DemuxerConfigs& configs) const override; | 55 bool AreDemuxerConfigsChanged(const DemuxerConfigs& configs) const override; |
| 56 MediaDecoderJobStatus CreateMediaCodecBridgeInternal() override; | 56 MediaDecoderJobStatus CreateMediaCodecBridgeInternal() override; |
| 57 bool OnOutputFormatChanged() override; | 57 bool OnOutputFormatChanged() override; |
| 58 | 58 |
| 59 // Helper method to set the audio output volume. | 59 // Helper method to set the audio output volume. |
| 60 void SetVolumeInternal(); | 60 void SetVolumeInternal(); |
| 61 | 61 |
| 62 void ResetTimestampHelper(); | 62 void ResetTimestampHelper(); |
| 63 | 63 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 87 | 87 |
| 88 // The time limit for the next frame to avoid underrun. | 88 // The time limit for the next frame to avoid underrun. |
| 89 base::TimeTicks next_frame_time_limit_; | 89 base::TimeTicks next_frame_time_limit_; |
| 90 | 90 |
| 91 DISALLOW_COPY_AND_ASSIGN(AudioDecoderJob); | 91 DISALLOW_COPY_AND_ASSIGN(AudioDecoderJob); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace media | 94 } // namespace media |
| 95 | 95 |
| 96 #endif // MEDIA_BASE_ANDROID_AUDIO_DECODER_JOB_H_ | 96 #endif // MEDIA_BASE_ANDROID_AUDIO_DECODER_JOB_H_ |
| OLD | NEW |