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

Side by Side Diff: chromecast/media/cma/backend/alsa/audio_decoder_alsa.h

Issue 2788483003: Introduce AudioBufferMemoryPool to avoid thrashing on audio buffers. (Closed)
Patch Set: Add class comments. Created 3 years, 8 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
« no previous file with comments | « no previous file | chromecast/media/cma/backend/alsa/audio_decoder_alsa.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 CHROMECAST_MEDIA_CMA_BACKEND_ALSA_AUDIO_DECODER_ALSA_H_ 5 #ifndef CHROMECAST_MEDIA_CMA_BACKEND_ALSA_AUDIO_DECODER_ALSA_H_
6 #define CHROMECAST_MEDIA_CMA_BACKEND_ALSA_AUDIO_DECODER_ALSA_H_ 6 #define CHROMECAST_MEDIA_CMA_BACKEND_ALSA_AUDIO_DECODER_ALSA_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <memory> 9 #include <memory>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/location.h" 12 #include "base/location.h"
13 #include "chromecast/media/cma/backend/alsa/stream_mixer_alsa_input.h" 13 #include "chromecast/media/cma/backend/alsa/stream_mixer_alsa_input.h"
14 #include "chromecast/media/cma/decoder/cast_audio_decoder.h" 14 #include "chromecast/media/cma/decoder/cast_audio_decoder.h"
15 #include "chromecast/public/media/decoder_config.h" 15 #include "chromecast/public/media/decoder_config.h"
16 #include "chromecast/public/media/media_pipeline_backend.h" 16 #include "chromecast/public/media/media_pipeline_backend.h"
17 #include "chromecast/public/media/media_pipeline_device_params.h" 17 #include "chromecast/public/media/media_pipeline_device_params.h"
18 #include "media/base/audio_buffer.h"
18 19
19 namespace base { 20 namespace base {
20 class SingleThreadTaskRunner; 21 class SingleThreadTaskRunner;
21 } // namespace base 22 } // namespace base
22 23
23 namespace media { 24 namespace media {
24 class AudioBus; 25 class AudioBus;
25 class AudioRendererAlgorithm; 26 class AudioRendererAlgorithm;
26 } // namespace media 27 } // namespace media
27 28
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 std::deque<RateShifterInfo> rate_shifter_info_; 104 std::deque<RateShifterInfo> rate_shifter_info_;
104 std::unique_ptr<::media::AudioBus> rate_shifter_output_; 105 std::unique_ptr<::media::AudioBus> rate_shifter_output_;
105 106
106 int64_t current_pts_; 107 int64_t current_pts_;
107 108
108 std::unique_ptr<StreamMixerAlsaInput> mixer_input_; 109 std::unique_ptr<StreamMixerAlsaInput> mixer_input_;
109 RenderingDelay last_mixer_delay_; 110 RenderingDelay last_mixer_delay_;
110 int64_t pending_output_frames_; 111 int64_t pending_output_frames_;
111 float volume_multiplier_; 112 float volume_multiplier_;
112 113
114 scoped_refptr<::media::AudioBufferMemoryPool> pool_;
115
113 base::WeakPtrFactory<AudioDecoderAlsa> weak_factory_; 116 base::WeakPtrFactory<AudioDecoderAlsa> weak_factory_;
114 117
115 DISALLOW_COPY_AND_ASSIGN(AudioDecoderAlsa); 118 DISALLOW_COPY_AND_ASSIGN(AudioDecoderAlsa);
116 }; 119 };
117 120
118 } // namespace media 121 } // namespace media
119 } // namespace chromecast 122 } // namespace chromecast
120 123
121 #endif // CHROMECAST_MEDIA_CMA_BACKEND_ALSA_AUDIO_DECODER_ALSA_H_ 124 #endif // CHROMECAST_MEDIA_CMA_BACKEND_ALSA_AUDIO_DECODER_ALSA_H_
OLDNEW
« no previous file with comments | « no previous file | chromecast/media/cma/backend/alsa/audio_decoder_alsa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698