Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Side by Side Diff: webrtc/sdk/objc/Framework/Classes/RTCMediaStreamTrack.mm

Issue 1888633002: Added the API to create an RTCRtpSender to the Objective C wrapper. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added constants for Audio and Video Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
16 extern NSString * const kRTCMediaStreamTrackKindAudio =
tkchin_webrtc 2016/04/28 00:05:27 extern not needed here. Also, for these you can us
skvlad 2016/04/28 00:23:44 Didn't know about the @() syntax, very convenient.
17 [NSString stringWithCString:webrtc::MediaStreamTrackInterface::kAudioKind
18 encoding:NSASCIIStringEncoding];
19 extern NSString * const kRTCMediaStreamTrackKindVideo =
20 [NSString stringWithCString:webrtc::MediaStreamTrackInterface::kVideoKind
21 encoding:NSASCIIStringEncoding];
22
23
15 @implementation RTCMediaStreamTrack { 24 @implementation RTCMediaStreamTrack {
16 rtc::scoped_refptr<webrtc::MediaStreamTrackInterface> _nativeTrack; 25 rtc::scoped_refptr<webrtc::MediaStreamTrackInterface> _nativeTrack;
17 RTCMediaStreamTrackType _type; 26 RTCMediaStreamTrackType _type;
18 } 27 }
19 28
20 - (NSString *)kind { 29 - (NSString *)kind {
21 return [NSString stringForStdString:_nativeTrack->kind()]; 30 return [NSString stringForStdString:_nativeTrack->kind()];
22 } 31 }
23 32
24 - (NSString *)trackId { 33 - (NSString *)trackId {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 + (NSString *)stringForState:(RTCMediaStreamTrackState)state { 132 + (NSString *)stringForState:(RTCMediaStreamTrackState)state {
124 switch (state) { 133 switch (state) {
125 case RTCMediaStreamTrackStateLive: 134 case RTCMediaStreamTrackStateLive:
126 return @"Live"; 135 return @"Live";
127 case RTCMediaStreamTrackStateEnded: 136 case RTCMediaStreamTrackStateEnded:
128 return @"Ended"; 137 return @"Ended";
129 } 138 }
130 } 139 }
131 140
132 @end 141 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698