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

Side by Side Diff: webrtc/pc/srtpfilter.h

Issue 2345753002: Update WebRTC to build against libsrtp 2.0 (Closed)
Patch Set: Rebase Created 4 years, 2 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/pc/externalhmac.cc ('k') | webrtc/pc/srtpfilter.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 2009 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2009 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
(...skipping 10 matching lines...) Expand all
21 #include "webrtc/base/constructormagic.h" 21 #include "webrtc/base/constructormagic.h"
22 #include "webrtc/base/criticalsection.h" 22 #include "webrtc/base/criticalsection.h"
23 #include "webrtc/base/sigslotrepeater.h" 23 #include "webrtc/base/sigslotrepeater.h"
24 #include "webrtc/base/sslstreamadapter.h" 24 #include "webrtc/base/sslstreamadapter.h"
25 #include "webrtc/base/thread_checker.h" 25 #include "webrtc/base/thread_checker.h"
26 #include "webrtc/media/base/cryptoparams.h" 26 #include "webrtc/media/base/cryptoparams.h"
27 #include "webrtc/p2p/base/sessiondescription.h" 27 #include "webrtc/p2p/base/sessiondescription.h"
28 28
29 // Forward declaration to avoid pulling in libsrtp headers here 29 // Forward declaration to avoid pulling in libsrtp headers here
30 struct srtp_event_data_t; 30 struct srtp_event_data_t;
31 struct srtp_ctx_t; 31
32 struct srtp_policy_t; 32 // Libsrtp V1/V2 compatibility hack.
33 // TODO(mattdr): Remove this #define after libsrtp 2.0 is in.
34 #define srtp_ctx_t_ srtp_ctx_t
35
36 struct srtp_ctx_t_;
33 37
34 namespace cricket { 38 namespace cricket {
35 39
36 class SrtpSession; 40 class SrtpSession;
37 class SrtpStat; 41 class SrtpStat;
38 42
39 void EnableSrtpDebugging(); 43 void EnableSrtpDebugging();
40 void ShutdownSrtp(); 44 void ShutdownSrtp();
41 45
42 // Class to transform SRTP to/from RTP. 46 // Class to transform SRTP to/from RTP.
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 private: 219 private:
216 bool SetKey(int type, int cs, const uint8_t* key, size_t len); 220 bool SetKey(int type, int cs, const uint8_t* key, size_t len);
217 // Returns send stream current packet index from srtp db. 221 // Returns send stream current packet index from srtp db.
218 bool GetSendStreamPacketIndex(void* data, int in_len, int64_t* index); 222 bool GetSendStreamPacketIndex(void* data, int in_len, int64_t* index);
219 223
220 static bool Init(); 224 static bool Init();
221 void HandleEvent(const srtp_event_data_t* ev); 225 void HandleEvent(const srtp_event_data_t* ev);
222 static void HandleEventThunk(srtp_event_data_t* ev); 226 static void HandleEventThunk(srtp_event_data_t* ev);
223 227
224 rtc::ThreadChecker thread_checker_; 228 rtc::ThreadChecker thread_checker_;
225 srtp_ctx_t* session_; 229 srtp_ctx_t_* session_;
226 int rtp_auth_tag_len_; 230 int rtp_auth_tag_len_;
227 int rtcp_auth_tag_len_; 231 int rtcp_auth_tag_len_;
228 std::unique_ptr<SrtpStat> srtp_stat_; 232 std::unique_ptr<SrtpStat> srtp_stat_;
229 static bool inited_; 233 static bool inited_;
230 static rtc::GlobalLockPod lock_; 234 static rtc::GlobalLockPod lock_;
231 int last_send_seq_num_; 235 int last_send_seq_num_;
232 RTC_DISALLOW_COPY_AND_ASSIGN(SrtpSession); 236 RTC_DISALLOW_COPY_AND_ASSIGN(SrtpSession);
233 }; 237 };
234 238
235 // Class that collects failures of SRTP. 239 // Class that collects failures of SRTP.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 std::map<FailureKey, FailureStat> failures_; 304 std::map<FailureKey, FailureStat> failures_;
301 // Threshold in ms to silent the signaling errors. 305 // Threshold in ms to silent the signaling errors.
302 int signal_silent_time_; 306 int signal_silent_time_;
303 307
304 RTC_DISALLOW_COPY_AND_ASSIGN(SrtpStat); 308 RTC_DISALLOW_COPY_AND_ASSIGN(SrtpStat);
305 }; 309 };
306 310
307 } // namespace cricket 311 } // namespace cricket
308 312
309 #endif // WEBRTC_PC_SRTPFILTER_H_ 313 #endif // WEBRTC_PC_SRTPFILTER_H_
OLDNEW
« no previous file with comments | « webrtc/pc/externalhmac.cc ('k') | webrtc/pc/srtpfilter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698