1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
From b127cb37c9624ffc48c9cbbf08271d3aca899f59 Mon Sep 17 00:00:00 2001
From: Zeno Albisser <zeno.albisser@digia.com>
Date: Wed, 16 Oct 2013 10:17:11 +0200
Subject: [PATCH] Do not forward declare WebRtcVoiceChannelInfo.
Clang / libc++ does not support incomplete types in
templates. See:
http://clang.llvm.org/compatibility.html#undep_incomplete
This fixes the fixes the "error: field has incomplete type" compiler error.
---
media/webrtc/webrtcvoiceengine.cc | 13 -------------
media/webrtc/webrtcvoiceengine.h | 13 ++++++++++++-
2 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/media/webrtc/webrtcvoiceengine.cc b/media/webrtc/webrtcvoiceengine.cc
index 855a9e4..4331385 100644
--- a/media/webrtc/webrtcvoiceengine.cc
+++ b/media/webrtc/webrtcvoiceengine.cc
@@ -1472,19 +1472,6 @@ void WebRtcVoiceEngine::StopAecDump() {
}
}
-// This struct relies on the generated copy constructor and assignment operator
-// since it is used in an stl::map.
-struct WebRtcVoiceMediaChannel::WebRtcVoiceChannelInfo {
- WebRtcVoiceChannelInfo() : channel(-1), renderer(NULL) {}
- WebRtcVoiceChannelInfo(int ch, AudioRenderer* r)
- : channel(ch),
- renderer(r) {}
- ~WebRtcVoiceChannelInfo() {}
-
- int channel;
- AudioRenderer* renderer;
-};
-
// WebRtcVoiceMediaChannel
WebRtcVoiceMediaChannel::WebRtcVoiceMediaChannel(WebRtcVoiceEngine *engine)
: WebRtcMediaChannel<VoiceMediaChannel, WebRtcVoiceEngine>(
diff --git a/media/webrtc/webrtcvoiceengine.h b/media/webrtc/webrtcvoiceengine.h
index 0c2b613..76f5be7 100644
--- a/media/webrtc/webrtcvoiceengine.h
+++ b/media/webrtc/webrtcvoiceengine.h
@@ -374,7 +374,18 @@ class WebRtcVoiceMediaChannel
static Error WebRtcErrorToChannelError(int err_code);
private:
- struct WebRtcVoiceChannelInfo;
+ // This struct relies on the generated copy constructor and assignment operator
+ // since it is used in an stl::map.
+ struct WebRtcVoiceChannelInfo {
+ WebRtcVoiceChannelInfo() : channel(-1), renderer(NULL) {}
+ WebRtcVoiceChannelInfo(int ch, AudioRenderer* r)
+ : channel(ch),
+ renderer(r) {}
+ ~WebRtcVoiceChannelInfo() {}
+
+ int channel;
+ AudioRenderer* renderer;
+ };
typedef std::map<uint32, WebRtcVoiceChannelInfo> ChannelMap;
void SetNack(uint32 ssrc, int channel, bool nack_enabled);
--
1.8.3.4
|