| 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 13 matching lines...) Expand all Loading... |
| 24 namespace webrtc { | 24 namespace webrtc { |
| 25 | 25 |
| 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; | |
| 35 | |
| 36 // The WebRTC specification only defines RTCRtpParameters in terms of senders, | 34 // The WebRTC specification only defines RTCRtpParameters in terms of senders, |
| 37 // but this API also applies them to receivers, similar to ORTC: | 35 // but this API also applies them to receivers, similar to ORTC: |
| 38 // http://ortc.org/wp-content/uploads/2016/03/ortc.html#rtcrtpparameters*. | 36 // http://ortc.org/wp-content/uploads/2016/03/ortc.html#rtcrtpparameters*. |
| 39 virtual RtpParameters GetParameters() const = 0; | 37 virtual RtpParameters GetParameters() const = 0; |
| 40 virtual bool SetParameters(const RtpParameters& parameters) = 0; | 38 virtual bool SetParameters(const RtpParameters& parameters) = 0; |
| 41 | 39 |
| 42 protected: | 40 protected: |
| 43 virtual ~RtpReceiverInterface() {} | 41 virtual ~RtpReceiverInterface() {} |
| 44 }; | 42 }; |
| 45 | 43 |
| 46 // Define proxy for RtpReceiverInterface. | 44 // Define proxy for RtpReceiverInterface. |
| 47 BEGIN_SIGNALING_PROXY_MAP(RtpReceiver) | 45 BEGIN_SIGNALING_PROXY_MAP(RtpReceiver) |
| 48 PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track) | 46 PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track) |
| 49 PROXY_CONSTMETHOD0(std::string, id) | 47 PROXY_CONSTMETHOD0(std::string, id) |
| 50 PROXY_METHOD0(void, Stop) | |
| 51 PROXY_CONSTMETHOD0(RtpParameters, GetParameters); | 48 PROXY_CONSTMETHOD0(RtpParameters, GetParameters); |
| 52 PROXY_METHOD1(bool, SetParameters, const RtpParameters&) | 49 PROXY_METHOD1(bool, SetParameters, const RtpParameters&) |
| 53 END_SIGNALING_PROXY() | 50 END_SIGNALING_PROXY() |
| 54 | 51 |
| 55 } // namespace webrtc | 52 } // namespace webrtc |
| 56 | 53 |
| 57 #endif // WEBRTC_API_RTPRECEIVERINTERFACE_H_ | 54 #endif // WEBRTC_API_RTPRECEIVERINTERFACE_H_ |
| OLD | NEW |