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 |
(...skipping 54 matching lines...) Loading... |
65 return [[RTCMediaStreamTrack alloc] initWithNativeTrack:nativeTrack]; | 65 return [[RTCMediaStreamTrack alloc] initWithNativeTrack:nativeTrack]; |
66 } | 66 } |
67 return nil; | 67 return nil; |
68 } | 68 } |
69 | 69 |
70 - (NSString *)description { | 70 - (NSString *)description { |
71 return [NSString stringWithFormat:@"RTCRtpReceiver {\n receiverId: %@\n}", | 71 return [NSString stringWithFormat:@"RTCRtpReceiver {\n receiverId: %@\n}", |
72 self.receiverId]; | 72 self.receiverId]; |
73 } | 73 } |
74 | 74 |
| 75 - (void)dealloc { |
| 76 _nativeRtpReceiver->SetObserver(nullptr); |
| 77 } |
| 78 |
75 - (BOOL)isEqual:(id)object { | 79 - (BOOL)isEqual:(id)object { |
76 if (self == object) { | 80 if (self == object) { |
77 return YES; | 81 return YES; |
78 } | 82 } |
79 if (object == nil) { | 83 if (object == nil) { |
80 return NO; | 84 return NO; |
81 } | 85 } |
82 if (![object isMemberOfClass:[self class]]) { | 86 if (![object isMemberOfClass:[self class]]) { |
83 return NO; | 87 return NO; |
84 } | 88 } |
(...skipping 29 matching lines...) Loading... |
114 case cricket::MEDIA_TYPE_AUDIO: | 118 case cricket::MEDIA_TYPE_AUDIO: |
115 return RTCRtpMediaTypeAudio; | 119 return RTCRtpMediaTypeAudio; |
116 case cricket::MEDIA_TYPE_VIDEO: | 120 case cricket::MEDIA_TYPE_VIDEO: |
117 return RTCRtpMediaTypeVideo; | 121 return RTCRtpMediaTypeVideo; |
118 case cricket::MEDIA_TYPE_DATA: | 122 case cricket::MEDIA_TYPE_DATA: |
119 return RTCRtpMediaTypeData; | 123 return RTCRtpMediaTypeData; |
120 } | 124 } |
121 } | 125 } |
122 | 126 |
123 @end | 127 @end |
OLD | NEW |