Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(674)

Side by Side Diff: media/base/android/audio_decoder_job.h

Issue 805273007: Android: Propagate sample rate change to audio decoder job (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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() override;
52 53
53 // Helper method to set the audio output volume. 54 // Helper method to set the audio output volume.
54 void SetVolumeInternal(); 55 void SetVolumeInternal();
55 56
57 void ResetTimestampHelper();
58
56 // Audio configs from the demuxer. 59 // Audio configs from the demuxer.
57 AudioCodec audio_codec_; 60 AudioCodec audio_codec_;
58 int num_channels_; 61 int num_channels_;
59 int sampling_rate_; 62 int config_sampling_rate_;
60 std::vector<uint8> audio_extra_data_; 63 std::vector<uint8> audio_extra_data_;
61 double volume_; 64 double volume_;
62 int bytes_per_frame_; 65 int bytes_per_frame_;
63 66
67 // Audio output format
68 int output_sampling_rate_;
69
64 // Base timestamp for the |audio_timestamp_helper_|. 70 // Base timestamp for the |audio_timestamp_helper_|.
65 base::TimeDelta base_timestamp_; 71 base::TimeDelta base_timestamp_;
66 72
67 // Object to calculate the current audio timestamp for A/V sync. 73 // Object to calculate the current audio timestamp for A/V sync.
68 scoped_ptr<AudioTimestampHelper> audio_timestamp_helper_; 74 scoped_ptr<AudioTimestampHelper> audio_timestamp_helper_;
69 75
70 DISALLOW_COPY_AND_ASSIGN(AudioDecoderJob); 76 DISALLOW_COPY_AND_ASSIGN(AudioDecoderJob);
71 }; 77 };
72 78
73 } // namespace media 79 } // namespace media
74 80
75 #endif // MEDIA_BASE_ANDROID_AUDIO_DECODER_JOB_H_ 81 #endif // MEDIA_BASE_ANDROID_AUDIO_DECODER_JOB_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/android/audio_decoder_job.cc » ('j') | media/base/android/audio_decoder_job.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698