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

Side by Side Diff: webrtc/voice_engine/channel_proxy.h

Issue 2703373006: Injectable audio encoders: voice_engine/channel changes. (Closed)
Patch Set: Removed 'virtual' from Channel::SetEncoder. 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 | « webrtc/voice_engine/channel.cc ('k') | webrtc/voice_engine/channel_proxy.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 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ 11 #ifndef WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_
12 #define WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ 12 #define WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_
13 13
14 #include "webrtc/api/audio/audio_mixer.h" 14 #include "webrtc/api/audio/audio_mixer.h"
15 #include "webrtc/base/constructormagic.h" 15 #include "webrtc/base/constructormagic.h"
16 #include "webrtc/base/race_checker.h" 16 #include "webrtc/base/race_checker.h"
17 #include "webrtc/base/thread_checker.h" 17 #include "webrtc/base/thread_checker.h"
18 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
18 #include "webrtc/voice_engine/channel_manager.h" 19 #include "webrtc/voice_engine/channel_manager.h"
19 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" 20 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h"
20 21
21 #include <memory> 22 #include <memory>
22 #include <string> 23 #include <string>
23 #include <vector> 24 #include <vector>
24 25
25 namespace webrtc { 26 namespace webrtc {
26 27
27 class AudioSinkInterface; 28 class AudioSinkInterface;
(...skipping 19 matching lines...) Expand all
47 // 1. Allow mocking just the interfaces used, instead of the entire 48 // 1. Allow mocking just the interfaces used, instead of the entire
48 // voe::Channel class. 49 // voe::Channel class.
49 // 2. Provide a refined interface for the stream classes, including assumptions 50 // 2. Provide a refined interface for the stream classes, including assumptions
50 // on return values and input adaptation. 51 // on return values and input adaptation.
51 class ChannelProxy { 52 class ChannelProxy {
52 public: 53 public:
53 ChannelProxy(); 54 ChannelProxy();
54 explicit ChannelProxy(const ChannelOwner& channel_owner); 55 explicit ChannelProxy(const ChannelOwner& channel_owner);
55 virtual ~ChannelProxy(); 56 virtual ~ChannelProxy();
56 57
58 virtual bool SetEncoder(int payload_type,
59 std::unique_ptr<AudioEncoder> encoder);
60
57 virtual void SetRTCPStatus(bool enable); 61 virtual void SetRTCPStatus(bool enable);
58 virtual void SetLocalSSRC(uint32_t ssrc); 62 virtual void SetLocalSSRC(uint32_t ssrc);
59 virtual void SetRTCP_CNAME(const std::string& c_name); 63 virtual void SetRTCP_CNAME(const std::string& c_name);
60 virtual void SetNACKStatus(bool enable, int max_packets); 64 virtual void SetNACKStatus(bool enable, int max_packets);
61 virtual void SetSendAudioLevelIndicationStatus(bool enable, int id); 65 virtual void SetSendAudioLevelIndicationStatus(bool enable, int id);
62 virtual void SetReceiveAudioLevelIndicationStatus(bool enable, int id); 66 virtual void SetReceiveAudioLevelIndicationStatus(bool enable, int id);
63 virtual void EnableSendTransportSequenceNumber(int id); 67 virtual void EnableSendTransportSequenceNumber(int id);
64 virtual void EnableReceiveTransportSequenceNumber(int id); 68 virtual void EnableReceiveTransportSequenceNumber(int id);
65 virtual void RegisterSenderCongestionControlObjects( 69 virtual void RegisterSenderCongestionControlObjects(
66 RtpTransportControllerSendInterface* transport, 70 RtpTransportControllerSendInterface* transport,
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 rtc::RaceChecker audio_thread_race_checker_; 142 rtc::RaceChecker audio_thread_race_checker_;
139 rtc::RaceChecker video_capture_thread_race_checker_; 143 rtc::RaceChecker video_capture_thread_race_checker_;
140 ChannelOwner channel_owner_; 144 ChannelOwner channel_owner_;
141 145
142 RTC_DISALLOW_COPY_AND_ASSIGN(ChannelProxy); 146 RTC_DISALLOW_COPY_AND_ASSIGN(ChannelProxy);
143 }; 147 };
144 } // namespace voe 148 } // namespace voe
145 } // namespace webrtc 149 } // namespace webrtc
146 150
147 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ 151 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_
OLDNEW
« no previous file with comments | « webrtc/voice_engine/channel.cc ('k') | webrtc/voice_engine/channel_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698