OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 case webrtc::MediaSourceInterface::kEnded: | 104 case webrtc::MediaSourceInterface::kEnded: |
105 return RTCSourceStateEnded; | 105 return RTCSourceStateEnded; |
106 case webrtc::MediaSourceInterface::kMuted: | 106 case webrtc::MediaSourceInterface::kMuted: |
107 return RTCSourceStateMuted; | 107 return RTCSourceStateMuted; |
108 } | 108 } |
109 } | 109 } |
110 | 110 |
111 + (webrtc::MediaStreamTrackInterface::TrackState) | 111 + (webrtc::MediaStreamTrackInterface::TrackState) |
112 convertTrackStateToNative:(RTCTrackState)state { | 112 convertTrackStateToNative:(RTCTrackState)state { |
113 switch (state) { | 113 switch (state) { |
114 case RTCTrackStateInitializing: | |
115 return webrtc::MediaStreamTrackInterface::kInitializing; | |
116 case RTCTrackStateLive: | 114 case RTCTrackStateLive: |
117 return webrtc::MediaStreamTrackInterface::kLive; | 115 return webrtc::MediaStreamTrackInterface::kLive; |
118 case RTCTrackStateEnded: | 116 case RTCTrackStateEnded: |
119 return webrtc::MediaStreamTrackInterface::kEnded; | 117 return webrtc::MediaStreamTrackInterface::kEnded; |
120 case RTCTrackStateFailed: | |
121 return webrtc::MediaStreamTrackInterface::kFailed; | |
122 } | 118 } |
123 } | 119 } |
124 | 120 |
125 + (RTCTrackState)convertTrackStateToObjC: | 121 + (RTCTrackState)convertTrackStateToObjC: |
126 (webrtc::MediaStreamTrackInterface::TrackState)nativeState { | 122 (webrtc::MediaStreamTrackInterface::TrackState)nativeState { |
127 switch (nativeState) { | 123 switch (nativeState) { |
128 case webrtc::MediaStreamTrackInterface::kInitializing: | |
129 return RTCTrackStateInitializing; | |
130 case webrtc::MediaStreamTrackInterface::kLive: | 124 case webrtc::MediaStreamTrackInterface::kLive: |
131 return RTCTrackStateLive; | 125 return RTCTrackStateLive; |
132 case webrtc::MediaStreamTrackInterface::kEnded: | 126 case webrtc::MediaStreamTrackInterface::kEnded: |
133 return RTCTrackStateEnded; | 127 return RTCTrackStateEnded; |
134 case webrtc::MediaStreamTrackInterface::kFailed: | |
135 return RTCTrackStateFailed; | |
136 } | 128 } |
137 } | 129 } |
138 | 130 |
139 + (RTCIceTransportsType)iceTransportsTypeForNativeEnum: | 131 + (RTCIceTransportsType)iceTransportsTypeForNativeEnum: |
140 (webrtc::PeerConnectionInterface::IceTransportsType)nativeEnum { | 132 (webrtc::PeerConnectionInterface::IceTransportsType)nativeEnum { |
141 switch (nativeEnum) { | 133 switch (nativeEnum) { |
142 case webrtc::PeerConnectionInterface::kNone: | 134 case webrtc::PeerConnectionInterface::kNone: |
143 return kRTCIceTransportsTypeNone; | 135 return kRTCIceTransportsTypeNone; |
144 case webrtc::PeerConnectionInterface::kRelay: | 136 case webrtc::PeerConnectionInterface::kRelay: |
145 return kRTCIceTransportsTypeRelay; | 137 return kRTCIceTransportsTypeRelay; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 (RTCTcpCandidatePolicy)tcpCandidatePolicy { | 214 (RTCTcpCandidatePolicy)tcpCandidatePolicy { |
223 switch (tcpCandidatePolicy) { | 215 switch (tcpCandidatePolicy) { |
224 case kRTCTcpCandidatePolicyEnabled: | 216 case kRTCTcpCandidatePolicyEnabled: |
225 return webrtc::PeerConnectionInterface::kTcpCandidatePolicyEnabled; | 217 return webrtc::PeerConnectionInterface::kTcpCandidatePolicyEnabled; |
226 case kRTCTcpCandidatePolicyDisabled: | 218 case kRTCTcpCandidatePolicyDisabled: |
227 return webrtc::PeerConnectionInterface::kTcpCandidatePolicyDisabled; | 219 return webrtc::PeerConnectionInterface::kTcpCandidatePolicyDisabled; |
228 } | 220 } |
229 } | 221 } |
230 | 222 |
231 @end | 223 @end |
OLD | NEW |