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 <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 virtual void ReleaseOutputBuffer( | 42 virtual void ReleaseOutputBuffer( |
43 int output_buffer_index, | 43 int output_buffer_index, |
44 size_t size, | 44 size_t size, |
45 bool render_output, | 45 bool render_output, |
46 base::TimeDelta current_presentation_timestamp, | 46 base::TimeDelta current_presentation_timestamp, |
47 const ReleaseOutputCompletionCallback& callback) override; | 47 const ReleaseOutputCompletionCallback& callback) override; |
48 virtual bool ComputeTimeToRender() const override; | 48 virtual bool ComputeTimeToRender() const override; |
49 virtual bool AreDemuxerConfigsChanged( | 49 virtual bool AreDemuxerConfigsChanged( |
50 const DemuxerConfigs& configs) const override; | 50 const DemuxerConfigs& configs) const override; |
51 virtual bool CreateMediaCodecBridgeInternal() override; | 51 virtual bool CreateMediaCodecBridgeInternal() override; |
52 virtual bool UpdateOutputFormat( | |
53 const base::Closure& config_changed_cb) override; | |
52 | 54 |
53 // Helper method to set the audio output volume. | 55 // Helper method to set the audio output volume. |
54 void SetVolumeInternal(); | 56 void SetVolumeInternal(); |
55 | 57 |
58 void ResetTimestampHelper(); | |
59 | |
56 // Audio configs from the demuxer. | 60 // Audio configs from the demuxer. |
57 AudioCodec audio_codec_; | 61 AudioCodec audio_codec_; |
58 int num_channels_; | 62 int num_channels_; |
59 int sampling_rate_; | 63 int config_sampling_rate_; |
60 std::vector<uint8> audio_extra_data_; | 64 std::vector<uint8> audio_extra_data_; |
61 double volume_; | 65 double volume_; |
62 int bytes_per_frame_; | 66 int bytes_per_frame_; |
63 | 67 |
68 // Audio output format | |
qinmin
2015/01/21 02:04:13
s/output format/output sample rate/
kjoswiak
2015/01/21 03:21:18
Done.
| |
69 int output_sampling_rate_; | |
70 | |
64 // Base timestamp for the |audio_timestamp_helper_|. | 71 // Base timestamp for the |audio_timestamp_helper_|. |
65 base::TimeDelta base_timestamp_; | 72 base::TimeDelta base_timestamp_; |
66 | 73 |
67 // Object to calculate the current audio timestamp for A/V sync. | 74 // Object to calculate the current audio timestamp for A/V sync. |
68 scoped_ptr<AudioTimestampHelper> audio_timestamp_helper_; | 75 scoped_ptr<AudioTimestampHelper> audio_timestamp_helper_; |
69 | 76 |
70 DISALLOW_COPY_AND_ASSIGN(AudioDecoderJob); | 77 DISALLOW_COPY_AND_ASSIGN(AudioDecoderJob); |
71 }; | 78 }; |
72 | 79 |
73 } // namespace media | 80 } // namespace media |
74 | 81 |
75 #endif // MEDIA_BASE_ANDROID_AUDIO_DECODER_JOB_H_ | 82 #endif // MEDIA_BASE_ANDROID_AUDIO_DECODER_JOB_H_ |
OLD | NEW |