Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_AUDIO_E NCODER_H_ | |
| 6 #define EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_AUDIO_E NCODER_H_ | |
| 7 | |
| 8 #include "content/public/renderer/media_stream_audio_sink.h" | |
| 9 #include "extensions/renderer/api/display_source/wifi_display/wifi_display_media _encoder.h" | |
| 10 #include "third_party/wds/src/libwds/public/audio_codec.h" | |
| 11 | |
| 12 namespace extensions { | |
| 13 | |
| 14 // This interface is a base class for audio used by the Wi-Fi Display media | |
| 15 // pipeline. | |
| 16 // Threading: the client code should belong to a single thread. | |
| 17 class WiFiDisplayAudioEncoder : public WiFiDisplayMediaEncoder, | |
| 18 public content::MediaStreamAudioSink { | |
| 19 public: | |
| 20 using AudioEncoderCallback = | |
| 21 base::Callback<void(scoped_refptr<WiFiDisplayAudioEncoder>)>; | |
| 22 | |
| 23 static const size_t kInvalidCodecModeValue = ~static_cast<size_t>(0u); | |
|
Mikhail
2016/04/22 10:36:33
think it should be protected (same as GetAudioCode
e_hakkinen
2016/04/22 10:39:24
True.
| |
| 24 | |
| 25 static void Create(const wds::AudioCodec& audio_codec, | |
| 26 const AudioEncoderCallback& encoder_callback); | |
| 27 | |
| 28 protected: | |
| 29 explicit WiFiDisplayAudioEncoder(const wds::AudioCodec& audio_codec); | |
| 30 ~WiFiDisplayAudioEncoder() override; | |
| 31 | |
| 32 size_t GetAudioCodecMode() const; | |
| 33 | |
| 34 const wds::AudioCodec audio_codec_; | |
| 35 }; | |
| 36 | |
| 37 } // namespace extensions | |
| 38 | |
| 39 #endif // EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_AUDI O_ENCODER_H_ | |
| OLD | NEW |