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

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

Issue 2703373006: Injectable audio encoders: voice_engine/channel changes. (Closed)
Patch Set: Removed builtin_audio_encoder_factory from voice_engine/BUILD.gn. Size check using sizeof(). Fixed … Created 3 years, 10 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 /* 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_factory.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 17 matching lines...) Expand all
45 // 1. Allow mocking just the interfaces used, instead of the entire 46 // 1. Allow mocking just the interfaces used, instead of the entire
46 // voe::Channel class. 47 // voe::Channel class.
47 // 2. Provide a refined interface for the stream classes, including assumptions 48 // 2. Provide a refined interface for the stream classes, including assumptions
48 // on return values and input adaptation. 49 // on return values and input adaptation.
49 class ChannelProxy { 50 class ChannelProxy {
50 public: 51 public:
51 ChannelProxy(); 52 ChannelProxy();
52 explicit ChannelProxy(const ChannelOwner& channel_owner); 53 explicit ChannelProxy(const ChannelOwner& channel_owner);
53 virtual ~ChannelProxy(); 54 virtual ~ChannelProxy();
54 55
56 virtual bool SetSendFormat(int payload_type,
57 const SdpAudioFormat& format,
58 AudioEncoderFactory* factory);
the sun 2017/02/22 14:08:38 Why are we sending the factory all the way down he
ossu 2017/02/22 14:24:41 Ah, yes: since we need the information from SdpAud
59
55 virtual void SetRTCPStatus(bool enable); 60 virtual void SetRTCPStatus(bool enable);
56 virtual void SetLocalSSRC(uint32_t ssrc); 61 virtual void SetLocalSSRC(uint32_t ssrc);
57 virtual void SetRTCP_CNAME(const std::string& c_name); 62 virtual void SetRTCP_CNAME(const std::string& c_name);
58 virtual void SetNACKStatus(bool enable, int max_packets); 63 virtual void SetNACKStatus(bool enable, int max_packets);
59 virtual void SetSendAudioLevelIndicationStatus(bool enable, int id); 64 virtual void SetSendAudioLevelIndicationStatus(bool enable, int id);
60 virtual void SetReceiveAudioLevelIndicationStatus(bool enable, int id); 65 virtual void SetReceiveAudioLevelIndicationStatus(bool enable, int id);
61 virtual void EnableSendTransportSequenceNumber(int id); 66 virtual void EnableSendTransportSequenceNumber(int id);
62 virtual void EnableReceiveTransportSequenceNumber(int id); 67 virtual void EnableReceiveTransportSequenceNumber(int id);
63 virtual void RegisterSenderCongestionControlObjects( 68 virtual void RegisterSenderCongestionControlObjects(
64 RtpPacketSender* rtp_packet_sender, 69 RtpPacketSender* rtp_packet_sender,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 rtc::RaceChecker audio_thread_race_checker_; 138 rtc::RaceChecker audio_thread_race_checker_;
134 rtc::RaceChecker video_capture_thread_race_checker_; 139 rtc::RaceChecker video_capture_thread_race_checker_;
135 ChannelOwner channel_owner_; 140 ChannelOwner channel_owner_;
136 141
137 RTC_DISALLOW_COPY_AND_ASSIGN(ChannelProxy); 142 RTC_DISALLOW_COPY_AND_ASSIGN(ChannelProxy);
138 }; 143 };
139 } // namespace voe 144 } // namespace voe
140 } // namespace webrtc 145 } // namespace webrtc
141 146
142 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ 147 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698