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

Unified Diff: webrtc/api/objc/RTCMediaStreamTrack.mm

Issue 1790633002: Propagate MediaStreamSource state to video tracks the same way as audio. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@refactor_track
Patch Set: Fix bug with wrong enum values. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/objc/RTCMediaStreamTrack.h ('k') | webrtc/api/rtpreceiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/objc/RTCMediaStreamTrack.mm
diff --git a/webrtc/api/objc/RTCMediaStreamTrack.mm b/webrtc/api/objc/RTCMediaStreamTrack.mm
index 260c89d66e55af55d7f20ab3058903cdc87ff2e6..25979b38d9a32bd968d531bdc66a5553ec77f4d7 100644
--- a/webrtc/api/objc/RTCMediaStreamTrack.mm
+++ b/webrtc/api/objc/RTCMediaStreamTrack.mm
@@ -67,41 +67,29 @@
+ (webrtc::MediaStreamTrackInterface::TrackState)nativeTrackStateForState:
(RTCMediaStreamTrackState)state {
switch (state) {
- case RTCMediaStreamTrackStateInitializing:
- return webrtc::MediaStreamTrackInterface::kInitializing;
case RTCMediaStreamTrackStateLive:
return webrtc::MediaStreamTrackInterface::kLive;
case RTCMediaStreamTrackStateEnded:
return webrtc::MediaStreamTrackInterface::kEnded;
- case RTCMediaStreamTrackStateFailed:
- return webrtc::MediaStreamTrackInterface::kFailed;
}
}
+ (RTCMediaStreamTrackState)trackStateForNativeState:
(webrtc::MediaStreamTrackInterface::TrackState)nativeState {
switch (nativeState) {
- case webrtc::MediaStreamTrackInterface::kInitializing:
- return RTCMediaStreamTrackStateInitializing;
case webrtc::MediaStreamTrackInterface::kLive:
return RTCMediaStreamTrackStateLive;
case webrtc::MediaStreamTrackInterface::kEnded:
return RTCMediaStreamTrackStateEnded;
- case webrtc::MediaStreamTrackInterface::kFailed:
- return RTCMediaStreamTrackStateFailed;
}
}
+ (NSString *)stringForState:(RTCMediaStreamTrackState)state {
switch (state) {
- case RTCMediaStreamTrackStateInitializing:
- return @"Initializing";
case RTCMediaStreamTrackStateLive:
return @"Live";
case RTCMediaStreamTrackStateEnded:
return @"Ended";
- case RTCMediaStreamTrackStateFailed:
- return @"Failed";
}
}
« no previous file with comments | « webrtc/api/objc/RTCMediaStreamTrack.h ('k') | webrtc/api/rtpreceiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698