| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // The identifier of the source can be the CSRC or the SSRC. | 48 // The identifier of the source can be the CSRC or the SSRC. |
| 49 uint32_t source_id() const { return source_id_; } | 49 uint32_t source_id() const { return source_id_; } |
| 50 | 50 |
| 51 // The source can be either a contributing source or a synchronization source. | 51 // The source can be either a contributing source or a synchronization source. |
| 52 RtpSourceType source_type() const { return source_type_; } | 52 RtpSourceType source_type() const { return source_type_; } |
| 53 | 53 |
| 54 // This isn't implemented yet and will always return an empty Optional. | 54 // This isn't implemented yet and will always return an empty Optional. |
| 55 // TODO(zhihuang): Implement this to return real audio level. | 55 // TODO(zhihuang): Implement this to return real audio level. |
| 56 rtc::Optional<int8_t> audio_level() const { return rtc::Optional<int8_t>(); } | 56 rtc::Optional<int8_t> audio_level() const { return rtc::Optional<int8_t>(); } |
| 57 | 57 |
| 58 bool operator==(const RtpSource& o) const { |
| 59 return timestamp_ms_ == o.timestamp_ms() && source_id_ == o.source_id() && |
| 60 source_type_ == o.source_type(); |
| 61 } |
| 62 |
| 58 private: | 63 private: |
| 59 int64_t timestamp_ms_; | 64 int64_t timestamp_ms_; |
| 60 uint32_t source_id_; | 65 uint32_t source_id_; |
| 61 RtpSourceType source_type_; | 66 RtpSourceType source_type_; |
| 62 }; | 67 }; |
| 63 | 68 |
| 64 class RtpReceiverObserverInterface { | 69 class RtpReceiverObserverInterface { |
| 65 public: | 70 public: |
| 66 // Note: Currently if there are multiple RtpReceivers of the same media type, | 71 // Note: Currently if there are multiple RtpReceivers of the same media type, |
| 67 // they will all call OnFirstPacketReceived at once. | 72 // they will all call OnFirstPacketReceived at once. |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 PROXY_CONSTMETHOD0(std::string, id) | 123 PROXY_CONSTMETHOD0(std::string, id) |
| 119 PROXY_CONSTMETHOD0(RtpParameters, GetParameters); | 124 PROXY_CONSTMETHOD0(RtpParameters, GetParameters); |
| 120 PROXY_METHOD1(bool, SetParameters, const RtpParameters&) | 125 PROXY_METHOD1(bool, SetParameters, const RtpParameters&) |
| 121 PROXY_METHOD1(void, SetObserver, RtpReceiverObserverInterface*); | 126 PROXY_METHOD1(void, SetObserver, RtpReceiverObserverInterface*); |
| 122 PROXY_CONSTMETHOD0(std::vector<RtpSource>, GetSources); | 127 PROXY_CONSTMETHOD0(std::vector<RtpSource>, GetSources); |
| 123 END_PROXY_MAP() | 128 END_PROXY_MAP() |
| 124 | 129 |
| 125 } // namespace webrtc | 130 } // namespace webrtc |
| 126 | 131 |
| 127 #endif // WEBRTC_API_RTPRECEIVERINTERFACE_H_ | 132 #endif // WEBRTC_API_RTPRECEIVERINTERFACE_H_ |
| OLD | NEW |