OLD | NEW |
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_ALSA_WRAPPER_H_ | 5 #ifndef CHROMECAST_MEDIA_CMA_BACKEND_ALSA_ALSA_WRAPPER_H_ |
6 #define CHROMECAST_MEDIA_CMA_BACKEND_ALSA_ALSA_WRAPPER_H_ | 6 #define CHROMECAST_MEDIA_CMA_BACKEND_ALSA_ALSA_WRAPPER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "media/audio/alsa/alsa_wrapper.h" | 9 #include "media/audio/alsa/alsa_wrapper.h" |
10 | 10 |
11 namespace chromecast { | 11 namespace chromecast { |
12 namespace media { | 12 namespace media { |
13 | 13 |
14 extern const int kAlsaTstampTypeMonotonicRaw; | 14 extern const int kAlsaTstampTypeMonotonicRaw; |
15 | 15 |
16 // Extends the Chromium AlsaWrapper, adding additional functions that we use. | 16 // Extends the Chromium AlsaWrapper, adding additional functions that we use. |
17 class AlsaWrapper : public ::media::AlsaWrapper { | 17 class AlsaWrapper : public ::media::AlsaWrapper { |
18 public: | 18 public: |
19 AlsaWrapper(); | 19 AlsaWrapper(); |
20 ~AlsaWrapper() override; | 20 ~AlsaWrapper() override; |
21 | 21 |
22 virtual int PcmPause(snd_pcm_t* handle, int enable); | 22 virtual int PcmPause(snd_pcm_t* handle, int enable); |
23 | 23 |
24 virtual int PcmStatusMalloc(snd_pcm_status_t** ptr); | 24 virtual int PcmStatusMalloc(snd_pcm_status_t** ptr); |
25 virtual void PcmStatusFree(snd_pcm_status_t* obj); | 25 virtual void PcmStatusFree(snd_pcm_status_t* obj); |
26 virtual int PcmStatus(snd_pcm_t* handle, snd_pcm_status_t* status); | 26 virtual int PcmStatus(snd_pcm_t* handle, snd_pcm_status_t* status); |
27 virtual snd_pcm_sframes_t PcmStatusGetDelay(const snd_pcm_status_t* obj); | 27 virtual snd_pcm_sframes_t PcmStatusGetDelay(const snd_pcm_status_t* obj); |
28 virtual void PcmStatusGetHtstamp(const snd_pcm_status_t* obj, | 28 virtual void PcmStatusGetHtstamp(const snd_pcm_status_t* obj, |
29 snd_htimestamp_t* ptr); | 29 snd_htimestamp_t* ptr); |
| 30 virtual snd_pcm_state_t PcmStatusGetState(const snd_pcm_status_t* obj); |
30 virtual ssize_t PcmFormatSize(snd_pcm_format_t format, size_t samples); | 31 virtual ssize_t PcmFormatSize(snd_pcm_format_t format, size_t samples); |
31 virtual int PcmHwParamsMalloc(snd_pcm_hw_params_t** ptr); | 32 virtual int PcmHwParamsMalloc(snd_pcm_hw_params_t** ptr); |
32 virtual void PcmHwParamsFree(snd_pcm_hw_params_t* obj); | 33 virtual void PcmHwParamsFree(snd_pcm_hw_params_t* obj); |
33 virtual int PcmHwParamsCurrent(snd_pcm_t* handle, | 34 virtual int PcmHwParamsCurrent(snd_pcm_t* handle, |
34 snd_pcm_hw_params_t* params); | 35 snd_pcm_hw_params_t* params); |
35 virtual int PcmHwParamsCanPause(const snd_pcm_hw_params_t* params); | 36 virtual int PcmHwParamsCanPause(const snd_pcm_hw_params_t* params); |
36 virtual int PcmHwParamsAny(snd_pcm_t* handle, snd_pcm_hw_params_t* params); | 37 virtual int PcmHwParamsAny(snd_pcm_t* handle, snd_pcm_hw_params_t* params); |
37 virtual int PcmHwParamsSetRateResample(snd_pcm_t* handle, | 38 virtual int PcmHwParamsSetRateResample(snd_pcm_t* handle, |
38 snd_pcm_hw_params_t* params, | 39 snd_pcm_hw_params_t* params, |
39 bool val); | 40 bool val); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 virtual int PcmSwParams(snd_pcm_t* handle, snd_pcm_sw_params_t* obj); | 86 virtual int PcmSwParams(snd_pcm_t* handle, snd_pcm_sw_params_t* obj); |
86 | 87 |
87 private: | 88 private: |
88 DISALLOW_COPY_AND_ASSIGN(AlsaWrapper); | 89 DISALLOW_COPY_AND_ASSIGN(AlsaWrapper); |
89 }; | 90 }; |
90 | 91 |
91 } // namespace media | 92 } // namespace media |
92 } // namespace chromecast | 93 } // namespace chromecast |
93 | 94 |
94 #endif // CHROMECAST_MEDIA_CMA_BACKEND_ALSA_ALSA_WRAPPER_H_ | 95 #endif // CHROMECAST_MEDIA_CMA_BACKEND_ALSA_ALSA_WRAPPER_H_ |
OLD | NEW |