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

Unified Diff: webrtc/p2p/base/candidatepair.h

Issue 2437503004: Set actual transport overhead in rtp_rtcp (Closed)
Patch Set: Save selected candidate pair in transport channel. 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/p2p/base/candidatepair.h
diff --git a/webrtc/p2p/base/candidatepair.h b/webrtc/p2p/base/candidatepair.h
new file mode 100644
index 0000000000000000000000000000000000000000..6f113beac2ac609d031734c9f15a24fd5db515ea
--- /dev/null
+++ b/webrtc/p2p/base/candidatepair.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2016 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_P2P_BASE_CANDIDATEPAIR_H_
+#define WEBRTC_P2P_BASE_CANDIDATEPAIR_H_
+
+#include "webrtc/p2p/base/candidate.h"
+#include "webrtc/p2p/base/candidatepairinterface.h"
+
+namespace cricket {
+
+class CandidatePair : public CandidatePairInterface {
+ public:
+ CandidatePair() = default;
+ explicit CandidatePair(const CandidatePairInterface& selected_candidate_pair)
+ : local_candidate_(selected_candidate_pair.local_candidate()),
+ remote_candidate_(selected_candidate_pair.remote_candidate()) {}
+ CandidatePair(const Candidate& local_candidate,
+ const Candidate& remote_candidate)
+ : local_candidate_(local_candidate),
+ remote_candidate_(remote_candidate) {}
+ ~CandidatePair() = default;
+ const Candidate& local_candidate() const override { return local_candidate_; }
+ const Candidate& remote_candidate() const override {
+ return remote_candidate_;
+ }
+
+ private:
+ Candidate local_candidate_;
+ Candidate remote_candidate_;
+};
+
+} // namespace cricket
+
+#endif // WEBRTC_P2P_BASE_CANDIDATEPAIR_H_

Powered by Google App Engine
This is Rietveld 408576698