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

Side by Side Diff: talk/app/webrtc/objc/RTCMediaStreamTrack.mm

Issue 1816143002: Removed MediaStreamTrackInterface::set_state (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@track_state_listen_on_source2
Patch Set: Rebased 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 unified diff | Download patch
« no previous file with comments | « no previous file | talk/app/webrtc/objc/public/RTCMediaStreamTrack.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 86
87 - (BOOL)setEnabled:(BOOL)enabled { 87 - (BOOL)setEnabled:(BOOL)enabled {
88 return self.mediaTrack->set_enabled(enabled); 88 return self.mediaTrack->set_enabled(enabled);
89 } 89 }
90 90
91 - (RTCTrackState)state { 91 - (RTCTrackState)state {
92 return [RTCEnumConverter convertTrackStateToObjC:self.mediaTrack->state()]; 92 return [RTCEnumConverter convertTrackStateToObjC:self.mediaTrack->state()];
93 } 93 }
94 94
95 - (BOOL)setState:(RTCTrackState)state {
96 return self.mediaTrack->set_state(
97 [RTCEnumConverter convertTrackStateToNative:state]);
98 }
99
100 @end 95 @end
101 96
102 @implementation RTCMediaStreamTrack (Internal) 97 @implementation RTCMediaStreamTrack (Internal)
103 98
104 - (id)initWithMediaTrack: 99 - (id)initWithMediaTrack:
105 (rtc::scoped_refptr<webrtc::MediaStreamTrackInterface>) 100 (rtc::scoped_refptr<webrtc::MediaStreamTrackInterface>)
106 mediaTrack { 101 mediaTrack {
107 if (!mediaTrack) { 102 if (!mediaTrack) {
108 NSAssert(NO, @"nil arguments not allowed"); 103 NSAssert(NO, @"nil arguments not allowed");
109 self = nil; 104 self = nil;
(...skipping 10 matching lines...) Expand all
120 115
121 - (void)dealloc { 116 - (void)dealloc {
122 _mediaTrack->UnregisterObserver(_observer.get()); 117 _mediaTrack->UnregisterObserver(_observer.get());
123 } 118 }
124 119
125 - (rtc::scoped_refptr<webrtc::MediaStreamTrackInterface>)mediaTrack { 120 - (rtc::scoped_refptr<webrtc::MediaStreamTrackInterface>)mediaTrack {
126 return _mediaTrack; 121 return _mediaTrack;
127 } 122 }
128 123
129 @end 124 @end
OLDNEW
« no previous file with comments | « no previous file | talk/app/webrtc/objc/public/RTCMediaStreamTrack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698