| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2004 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 |
| 11 #ifndef WEBRTC_PC_RTCPMUXFILTER_H_ | 11 #ifndef WEBRTC_PC_RTCPMUXFILTER_H_ |
| 12 #define WEBRTC_PC_RTCPMUXFILTER_H_ | 12 #define WEBRTC_PC_RTCPMUXFILTER_H_ |
| 13 | 13 |
| 14 #include "webrtc/base/basictypes.h" | 14 #include "webrtc/base/basictypes.h" |
| 15 #include "webrtc/p2p/base/sessiondescription.h" | 15 #include "webrtc/p2p/base/sessiondescription.h" |
| 16 | 16 |
| 17 namespace cricket { | 17 namespace cricket { |
| 18 | 18 |
| 19 // RTCP Muxer, as defined in RFC 5761 (http://tools.ietf.org/html/rfc5761) | 19 // RTCP Muxer, as defined in RFC 5761 (http://tools.ietf.org/html/rfc5761) |
| 20 class RtcpMuxFilter { | 20 class RtcpMuxFilter { |
| 21 public: | 21 public: |
| 22 RtcpMuxFilter(); | 22 RtcpMuxFilter(); |
| 23 | 23 |
| 24 // Whether the filter is active, i.e. has RTCP mux been properly negotiated. | 24 // Whether RTCP mux has been negotiated with a final answer (not provisional). |
| 25 bool IsFullyActive() const; |
| 26 |
| 27 // Whether RTCP mux has been negotiated with a provisional answer; this means |
| 28 // a later answer could disable RTCP mux, and so the RTCP transport should |
| 29 // not be disposed yet. |
| 30 bool IsProvisionallyActive() const; |
| 31 |
| 32 // Whether the filter is active, i.e. has RTCP mux been properly negotiated, |
| 33 // either with a final or provisional answer. |
| 25 bool IsActive() const; | 34 bool IsActive() const; |
| 26 | 35 |
| 27 // Make the filter active, regardless of the current state. | 36 // Make the filter active (fully, not provisionally) regardless of the |
| 37 // current state. This should be used when an endpoint *requires* RTCP mux. |
| 28 void SetActive(); | 38 void SetActive(); |
| 29 | 39 |
| 30 // Specifies whether the offer indicates the use of RTCP mux. | 40 // Specifies whether the offer indicates the use of RTCP mux. |
| 31 bool SetOffer(bool offer_enable, ContentSource src); | 41 bool SetOffer(bool offer_enable, ContentSource src); |
| 32 | 42 |
| 33 // Specifies whether the provisional answer indicates the use of RTCP mux. | 43 // Specifies whether the provisional answer indicates the use of RTCP mux. |
| 34 bool SetProvisionalAnswer(bool answer_enable, ContentSource src); | 44 bool SetProvisionalAnswer(bool answer_enable, ContentSource src); |
| 35 | 45 |
| 36 // Specifies whether the answer indicates the use of RTCP mux. | 46 // Specifies whether the answer indicates the use of RTCP mux. |
| 37 bool SetAnswer(bool answer_enable, ContentSource src); | 47 bool SetAnswer(bool answer_enable, ContentSource src); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 63 // the filter. | 73 // the filter. |
| 64 ST_ACTIVE | 74 ST_ACTIVE |
| 65 }; | 75 }; |
| 66 State state_; | 76 State state_; |
| 67 bool offer_enable_; | 77 bool offer_enable_; |
| 68 }; | 78 }; |
| 69 | 79 |
| 70 } // namespace cricket | 80 } // namespace cricket |
| 71 | 81 |
| 72 #endif // WEBRTC_PC_RTCPMUXFILTER_H_ | 82 #endif // WEBRTC_PC_RTCPMUXFILTER_H_ |
| OLD | NEW |