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 |
11 #import "RTCMediaStreamTrack+Private.h" | 11 #import "RTCMediaStreamTrack+Private.h" |
12 | 12 |
13 #import "NSString+StdString.h" | 13 #import "NSString+StdString.h" |
14 | 14 |
| 15 NSString * const kRTCMediaStreamTrackKindAudio = |
| 16 @(webrtc::MediaStreamTrackInterface::kAudioKind); |
| 17 NSString * const kRTCMediaStreamTrackKindVideo = |
| 18 @(webrtc::MediaStreamTrackInterface::kVideoKind); |
| 19 |
15 @implementation RTCMediaStreamTrack { | 20 @implementation RTCMediaStreamTrack { |
16 rtc::scoped_refptr<webrtc::MediaStreamTrackInterface> _nativeTrack; | 21 rtc::scoped_refptr<webrtc::MediaStreamTrackInterface> _nativeTrack; |
17 RTCMediaStreamTrackType _type; | 22 RTCMediaStreamTrackType _type; |
18 } | 23 } |
19 | 24 |
20 - (NSString *)kind { | 25 - (NSString *)kind { |
21 return [NSString stringForStdString:_nativeTrack->kind()]; | 26 return [NSString stringForStdString:_nativeTrack->kind()]; |
22 } | 27 } |
23 | 28 |
24 - (NSString *)trackId { | 29 - (NSString *)trackId { |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 + (NSString *)stringForState:(RTCMediaStreamTrackState)state { | 128 + (NSString *)stringForState:(RTCMediaStreamTrackState)state { |
124 switch (state) { | 129 switch (state) { |
125 case RTCMediaStreamTrackStateLive: | 130 case RTCMediaStreamTrackStateLive: |
126 return @"Live"; | 131 return @"Live"; |
127 case RTCMediaStreamTrackStateEnded: | 132 case RTCMediaStreamTrackStateEnded: |
128 return @"Ended"; | 133 return @"Ended"; |
129 } | 134 } |
130 } | 135 } |
131 | 136 |
132 @end | 137 @end |
OLD | NEW |