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

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: better comments 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
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. Must exist
89 AudioDeviceModule* audio_device_module = nullptr; 84 // for the lifetime of this Call.
90 AudioProcessing* audio_processing = nullptr; 85 // TODO(solenberg): Change this to a shared_ptr once we can use C++11.
tommi 2015/10/29 16:28:50 what about using scoped_refptr in the meantime? A
the sun 2015/10/30 12:19:01 Ah, nice, linked_ptr fits the bill (what I like ab
tommi 2015/11/02 13:46:53 Yes, I think we'll replace use of linked_ptr with
the sun 2015/11/03 12:41:07 Acknowledged.
91 VoiceEngineObserver* voice_engine_observer = nullptr; 86 AudioState* audio_state = nullptr;
92 } audio_config; 87
88 // Audio Processing Module to be used in this call.
89 // TODO(solenberg): Change this to a shared_ptr once we can use C++11.
90 AudioProcessing* audio_processing = nullptr;
93 }; 91 };
94 92
95 struct Stats { 93 struct Stats {
96 int send_bandwidth_bps = 0; 94 int send_bandwidth_bps = 0;
97 int recv_bandwidth_bps = 0; 95 int recv_bandwidth_bps = 0;
98 int64_t pacer_delay_ms = 0; 96 int64_t pacer_delay_ms = 0;
99 int64_t rtt_ms = -1; 97 int64_t rtt_ms = -1;
100 }; 98 };
101 99
102 static Call* Create(const Call::Config& config); 100 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; 137 virtual void SignalNetworkState(NetworkState state) = 0;
140 138
141 virtual void OnSentPacket(const rtc::SentPacket& sent_packet) = 0; 139 virtual void OnSentPacket(const rtc::SentPacket& sent_packet) = 0;
142 140
143 virtual ~Call() {} 141 virtual ~Call() {}
144 }; 142 };
145 143
146 } // namespace webrtc 144 } // namespace webrtc
147 145
148 #endif // WEBRTC_CALL_H_ 146 #endif // WEBRTC_CALL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698