| 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 15 matching lines...) Expand all Loading... |
| 26 class RtpReceiverInterface : public rtc::RefCountInterface { | 26 class RtpReceiverInterface : public rtc::RefCountInterface { |
| 27 public: | 27 public: |
| 28 virtual rtc::scoped_refptr<MediaStreamTrackInterface> track() const = 0; | 28 virtual rtc::scoped_refptr<MediaStreamTrackInterface> track() const = 0; |
| 29 | 29 |
| 30 // Not to be confused with "mid", this is a field we can temporarily use | 30 // Not to be confused with "mid", this is a field we can temporarily use |
| 31 // to uniquely identify a receiver until we implement Unified Plan SDP. | 31 // to uniquely identify a receiver until we implement Unified Plan SDP. |
| 32 virtual std::string id() const = 0; | 32 virtual std::string id() const = 0; |
| 33 | 33 |
| 34 virtual void Stop() = 0; | 34 virtual void Stop() = 0; |
| 35 | 35 |
| 36 // The WebRTC specification only defines RTCRtpParameters in terms of senders, |
| 37 // but this API also applies them to receivers, similar to ORTC: |
| 38 // http://ortc.org/wp-content/uploads/2016/03/ortc.html#rtcrtpparameters*. |
| 39 virtual RtpParameters GetParameters() const = 0; |
| 40 virtual bool SetParameters(const RtpParameters& parameters) = 0; |
| 41 |
| 36 protected: | 42 protected: |
| 37 virtual ~RtpReceiverInterface() {} | 43 virtual ~RtpReceiverInterface() {} |
| 38 }; | 44 }; |
| 39 | 45 |
| 40 // Define proxy for RtpReceiverInterface. | 46 // Define proxy for RtpReceiverInterface. |
| 41 BEGIN_SIGNALING_PROXY_MAP(RtpReceiver) | 47 BEGIN_SIGNALING_PROXY_MAP(RtpReceiver) |
| 42 PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track) | 48 PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track) |
| 43 PROXY_CONSTMETHOD0(std::string, id) | 49 PROXY_CONSTMETHOD0(std::string, id) |
| 44 PROXY_METHOD0(void, Stop) | 50 PROXY_METHOD0(void, Stop) |
| 51 PROXY_CONSTMETHOD0(RtpParameters, GetParameters); |
| 52 PROXY_METHOD1(bool, SetParameters, const RtpParameters&) |
| 45 END_SIGNALING_PROXY() | 53 END_SIGNALING_PROXY() |
| 46 | 54 |
| 47 } // namespace webrtc | 55 } // namespace webrtc |
| 48 | 56 |
| 49 #endif // WEBRTC_API_RTPRECEIVERINTERFACE_H_ | 57 #endif // WEBRTC_API_RTPRECEIVERINTERFACE_H_ |
| OLD | NEW |