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

Side by Side Diff: chromecast/media/cma/backend/audio_pipeline_device.h

Issue 1074383002: Introduce VideoConfig/AudioConfig class for CMA backend (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODO comments and fix unit test Created 5 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_AUDIO_PIPELINE_DEVICE_H_ 5 #ifndef CHROMECAST_MEDIA_CMA_BACKEND_AUDIO_PIPELINE_DEVICE_H_
6 #define CHROMECAST_MEDIA_CMA_BACKEND_AUDIO_PIPELINE_DEVICE_H_ 6 #define CHROMECAST_MEDIA_CMA_BACKEND_AUDIO_PIPELINE_DEVICE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chromecast/media/cma/backend/media_component_device.h" 9 #include "chromecast/media/cma/backend/media_component_device.h"
10 10
11 namespace media {
12 class AudioDecoderConfig;
13 }
14
15 namespace chromecast { 11 namespace chromecast {
16 namespace media { 12 namespace media {
17 class AudioPipelineDeviceClient; 13 class AudioPipelineDeviceClient;
14 struct AudioConfig;
18 15
19 class AudioPipelineDevice : public MediaComponentDevice { 16 class AudioPipelineDevice : public MediaComponentDevice {
20 public: 17 public:
21 AudioPipelineDevice(); 18 AudioPipelineDevice();
22 ~AudioPipelineDevice() override; 19 ~AudioPipelineDevice() override;
23 20
24 // Provide the audio configuration. 21 // Provide the audio configuration.
25 // Must be called before switching from |kStateUninitialized| to |kStateIdle|. 22 // Must be called before switching from |kStateUninitialized| to |kStateIdle|.
26 // Afterwards, this can be invoked any time the configuration changes. 23 // Afterwards, this can be invoked any time the configuration changes.
27 // Returns true if the configuration is a supported configuration. 24 // Returns true if the configuration is a supported configuration.
28 virtual bool SetConfig(const ::media::AudioDecoderConfig& config) = 0; 25 virtual bool SetConfig(const AudioConfig& config) = 0;
29 26
30 // Sets the volume multiplier. 27 // Sets the volume multiplier.
31 // The multiplier must be in the range [0.0, 1.0]. 28 // The multiplier must be in the range [0.0, 1.0].
32 virtual void SetStreamVolumeMultiplier(float multiplier) = 0; 29 virtual void SetStreamVolumeMultiplier(float multiplier) = 0;
33 30
34 private: 31 private:
35 DISALLOW_COPY_AND_ASSIGN(AudioPipelineDevice); 32 DISALLOW_COPY_AND_ASSIGN(AudioPipelineDevice);
36 }; 33 };
37 34
38 } // namespace media 35 } // namespace media
39 } // namespace chromecast 36 } // namespace chromecast
40 37
41 #endif // CHROMECAST_MEDIA_CMA_BACKEND_AUDIO_PIPELINE_DEVICE_H_ 38 #endif // CHROMECAST_MEDIA_CMA_BACKEND_AUDIO_PIPELINE_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698