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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 virtual cricket::MediaType media_type() const = 0; | 47 virtual cricket::MediaType media_type() const = 0; |
48 | 48 |
49 // Not to be confused with "mid", this is a field we can temporarily use | 49 // Not to be confused with "mid", this is a field we can temporarily use |
50 // to uniquely identify a receiver until we implement Unified Plan SDP. | 50 // to uniquely identify a receiver until we implement Unified Plan SDP. |
51 virtual std::string id() const = 0; | 51 virtual std::string id() const = 0; |
52 | 52 |
53 // The WebRTC specification only defines RTCRtpParameters in terms of senders, | 53 // The WebRTC specification only defines RTCRtpParameters in terms of senders, |
54 // but this API also applies them to receivers, similar to ORTC: | 54 // but this API also applies them to receivers, similar to ORTC: |
55 // http://ortc.org/wp-content/uploads/2016/03/ortc.html#rtcrtpparameters*. | 55 // http://ortc.org/wp-content/uploads/2016/03/ortc.html#rtcrtpparameters*. |
56 virtual RtpParameters GetParameters() const = 0; | 56 virtual RtpParameters GetParameters() const = 0; |
| 57 // Currently, doesn't support changing any parameters, but may in the future. |
57 virtual bool SetParameters(const RtpParameters& parameters) = 0; | 58 virtual bool SetParameters(const RtpParameters& parameters) = 0; |
58 | 59 |
59 // Does not take ownership of observer. | 60 // Does not take ownership of observer. |
60 // Must call SetObserver(nullptr) before the observer is destroyed. | 61 // Must call SetObserver(nullptr) before the observer is destroyed. |
61 virtual void SetObserver(RtpReceiverObserverInterface* observer) = 0; | 62 virtual void SetObserver(RtpReceiverObserverInterface* observer) = 0; |
62 | 63 |
63 protected: | 64 protected: |
64 virtual ~RtpReceiverInterface() {} | 65 virtual ~RtpReceiverInterface() {} |
65 }; | 66 }; |
66 | 67 |
67 // Define proxy for RtpReceiverInterface. | 68 // Define proxy for RtpReceiverInterface. |
| 69 // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods |
| 70 // are called on is an implementation detail. |
68 BEGIN_SIGNALING_PROXY_MAP(RtpReceiver) | 71 BEGIN_SIGNALING_PROXY_MAP(RtpReceiver) |
69 PROXY_SIGNALING_THREAD_DESTRUCTOR() | 72 PROXY_SIGNALING_THREAD_DESTRUCTOR() |
70 PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track) | 73 PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track) |
71 PROXY_CONSTMETHOD0(cricket::MediaType, media_type) | 74 PROXY_CONSTMETHOD0(cricket::MediaType, media_type) |
72 PROXY_CONSTMETHOD0(std::string, id) | 75 PROXY_CONSTMETHOD0(std::string, id) |
73 PROXY_CONSTMETHOD0(RtpParameters, GetParameters); | 76 PROXY_CONSTMETHOD0(RtpParameters, GetParameters); |
74 PROXY_METHOD1(bool, SetParameters, const RtpParameters&) | 77 PROXY_METHOD1(bool, SetParameters, const RtpParameters&) |
75 PROXY_METHOD1(void, SetObserver, RtpReceiverObserverInterface*); | 78 PROXY_METHOD1(void, SetObserver, RtpReceiverObserverInterface*); |
76 END_PROXY_MAP() | 79 END_PROXY_MAP() |
77 | 80 |
78 } // namespace webrtc | 81 } // namespace webrtc |
79 | 82 |
80 #endif // WEBRTC_API_RTPRECEIVERINTERFACE_H_ | 83 #endif // WEBRTC_API_RTPRECEIVERINTERFACE_H_ |
OLD | NEW |