OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2016 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 #import <Foundation/Foundation.h> | 11 #import <Foundation/Foundation.h> |
12 | 12 |
13 #import <WebRTC/RTCMacros.h> | 13 #import <WebRTC/RTCMacros.h> |
14 #import <WebRTC/RTCMediaStreamTrack.h> | 14 #import <WebRTC/RTCMediaStreamTrack.h> |
15 #import <WebRTC/RTCRtpParameters.h> | 15 #import <WebRTC/RTCRtpParameters.h> |
16 | 16 |
17 NS_ASSUME_NONNULL_BEGIN | 17 NS_ASSUME_NONNULL_BEGIN |
18 | 18 |
19 RTC_EXPORT | 19 RTC_EXPORT |
20 @protocol RTCRtpSender <NSObject> | 20 @protocol RTCRtpReceiver <NSObject> |
21 | 21 |
22 /** The currently active RTCRtpParameters, as defined in | 22 /** The currently active RTCRtpParameters, as defined in |
23 * https://www.w3.org/TR/webrtc/#idl-def-RTCRtpParameters. | 23 * https://www.w3.org/TR/webrtc/#idl-def-RTCRtpParameters. |
| 24 * |
| 25 * The WebRTC specification only defines RTCRtpParameters in terms of senders, |
| 26 * but this API also applies them to receivers, similar to ORTC: |
| 27 * http://ortc.org/wp-content/uploads/2016/03/ortc.html#rtcrtpparameters*. |
24 */ | 28 */ |
25 @property(nonatomic, readonly) RTCRtpParameters *parameters; | 29 @property(nonatomic, readonly) RTCRtpParameters *parameters; |
26 | 30 |
27 /** The RTCMediaStreamTrack associated with the sender. | 31 /** The RTCMediaStreamTrack associated with the receiver. |
28 * Note: reading this property returns a new instance of | 32 * Note: reading this property returns a new instance of |
29 * RTCMediaStreamTrack. Use isEqual: instead of == to compare | 33 * RTCMediaStreamTrack. Use isEqual: instead of == to compare |
30 * RTCMediaStreamTrack instances. | 34 * RTCMediaStreamTrack instances. |
31 */ | 35 */ |
32 @property(nonatomic, readonly) RTCMediaStreamTrack *track; | 36 @property(nonatomic, readonly) RTCMediaStreamTrack *track; |
33 | 37 |
34 /** Set the new RTCRtpParameters to be used by the sender. | 38 /** Set the new RTCRtpParameters to be used by the receiver. |
35 * Returns YES if the new parameters were applied, NO otherwise. | 39 * Returns YES if the new parameters were applied, NO otherwise. |
36 */ | 40 */ |
37 - (BOOL)setParameters:(RTCRtpParameters *)parameters; | 41 - (BOOL)setParameters:(RTCRtpParameters *)parameters; |
38 | 42 |
39 @end | 43 @end |
40 | 44 |
41 RTC_EXPORT | 45 RTC_EXPORT |
42 @interface RTCRtpSender : NSObject <RTCRtpSender> | 46 @interface RTCRtpReceiver : NSObject <RTCRtpReceiver> |
43 | 47 |
44 - (instancetype)init NS_UNAVAILABLE; | 48 - (instancetype)init NS_UNAVAILABLE; |
45 | 49 |
46 @end | 50 @end |
47 | 51 |
48 NS_ASSUME_NONNULL_END | 52 NS_ASSUME_NONNULL_END |
OLD | NEW |