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

Side by Side Diff: webrtc/call.h

Issue 1403363003: Move VoiceEngineObserver into AudioSendStream so that we detect typing noises and return properly i… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: that's all folks! (incl rebase), or is it? Created 5 years, 1 month 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/audio_state.h ('k') | webrtc/call/bitrate_estimator_tests.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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 #ifndef WEBRTC_CALL_H_ 10 #ifndef WEBRTC_CALL_H_
11 #define WEBRTC_CALL_H_ 11 #define WEBRTC_CALL_H_
12 12
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "webrtc/common_types.h" 16 #include "webrtc/common_types.h"
17 #include "webrtc/audio_receive_stream.h" 17 #include "webrtc/audio_receive_stream.h"
18 #include "webrtc/audio_send_stream.h" 18 #include "webrtc/audio_send_stream.h"
19 #include "webrtc/audio_state.h"
19 #include "webrtc/base/socket.h" 20 #include "webrtc/base/socket.h"
20 #include "webrtc/video_receive_stream.h" 21 #include "webrtc/video_receive_stream.h"
21 #include "webrtc/video_send_stream.h" 22 #include "webrtc/video_send_stream.h"
22 23
23 namespace webrtc { 24 namespace webrtc {
24 25
25 class AudioDeviceModule;
26 class AudioProcessing; 26 class AudioProcessing;
27 class VoiceEngine;
28 class VoiceEngineObserver;
29 27
30 const char* Version(); 28 const char* Version();
31 29
32 enum class MediaType { 30 enum class MediaType {
33 ANY, 31 ANY,
34 AUDIO, 32 AUDIO,
35 VIDEO, 33 VIDEO,
36 DATA 34 DATA
37 }; 35 };
38 36
(...skipping 28 matching lines...) Expand all
67 }; 65 };
68 66
69 // A Call instance can contain several send and/or receive streams. All streams 67 // A Call instance can contain several send and/or receive streams. All streams
70 // are assumed to have the same remote endpoint and will share bitrate estimates 68 // are assumed to have the same remote endpoint and will share bitrate estimates
71 // etc. 69 // etc.
72 class Call { 70 class Call {
73 public: 71 public:
74 struct Config { 72 struct Config {
75 static const int kDefaultStartBitrateBps; 73 static const int kDefaultStartBitrateBps;
76 74
77 // VoiceEngine used for audio/video synchronization for this Call.
78 VoiceEngine* voice_engine = nullptr;
79
80 // Bitrate config used until valid bitrate estimates are calculated. Also 75 // Bitrate config used until valid bitrate estimates are calculated. Also
81 // used to cap total bitrate used. 76 // used to cap total bitrate used.
82 struct BitrateConfig { 77 struct BitrateConfig {
83 int min_bitrate_bps = 0; 78 int min_bitrate_bps = 0;
84 int start_bitrate_bps = kDefaultStartBitrateBps; 79 int start_bitrate_bps = kDefaultStartBitrateBps;
85 int max_bitrate_bps = -1; 80 int max_bitrate_bps = -1;
86 } bitrate_config; 81 } bitrate_config;
87 82
88 struct AudioConfig { 83 // AudioState which is possibly shared between multiple calls.
89 AudioDeviceModule* audio_device_module = nullptr; 84 // TODO(solenberg): Change this to a shared_ptr once we can use C++11.
90 AudioProcessing* audio_processing = nullptr; 85 rtc::scoped_refptr<AudioState> audio_state;
91 VoiceEngineObserver* voice_engine_observer = nullptr; 86
92 } audio_config; 87 // Audio Processing Module to be used in this call.
88 // TODO(solenberg): Change this to a shared_ptr once we can use C++11.
89 AudioProcessing* audio_processing = nullptr;
93 }; 90 };
94 91
95 struct Stats { 92 struct Stats {
96 int send_bandwidth_bps = 0; 93 int send_bandwidth_bps = 0;
97 int recv_bandwidth_bps = 0; 94 int recv_bandwidth_bps = 0;
98 int64_t pacer_delay_ms = 0; 95 int64_t pacer_delay_ms = 0;
99 int64_t rtt_ms = -1; 96 int64_t rtt_ms = -1;
100 }; 97 };
101 98
102 static Call* Create(const Call::Config& config); 99 static Call* Create(const Call::Config& config);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 virtual void SignalNetworkState(NetworkState state) = 0; 136 virtual void SignalNetworkState(NetworkState state) = 0;
140 137
141 virtual void OnSentPacket(const rtc::SentPacket& sent_packet) = 0; 138 virtual void OnSentPacket(const rtc::SentPacket& sent_packet) = 0;
142 139
143 virtual ~Call() {} 140 virtual ~Call() {}
144 }; 141 };
145 142
146 } // namespace webrtc 143 } // namespace webrtc
147 144
148 #endif // WEBRTC_CALL_H_ 145 #endif // WEBRTC_CALL_H_
OLDNEW
« no previous file with comments | « webrtc/audio_state.h ('k') | webrtc/call/bitrate_estimator_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698