| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 [self configure]; | 56 [self configure]; |
| 57 _source = source; | 57 _source = source; |
| 58 } | 58 } |
| 59 return self; | 59 return self; |
| 60 } | 60 } |
| 61 | 61 |
| 62 - (instancetype)initWithMediaTrack: | 62 - (instancetype)initWithMediaTrack: |
| 63 (rtc::scoped_refptr<webrtc::MediaStreamTrackInterface>)mediaTrack { | 63 (rtc::scoped_refptr<webrtc::MediaStreamTrackInterface>)mediaTrack { |
| 64 if (self = [super initWithMediaTrack:mediaTrack]) { | 64 if (self = [super initWithMediaTrack:mediaTrack]) { |
| 65 [self configure]; | 65 [self configure]; |
| 66 rtc::scoped_refptr<webrtc::VideoSourceInterface> source = | 66 rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> source = |
| 67 self.nativeVideoTrack->GetSource(); | 67 self.nativeVideoTrack->GetSource(); |
| 68 if (source) { | 68 if (source) { |
| 69 _source = [[RTCVideoSource alloc] initWithMediaSource:source.get()]; | 69 _source = [[RTCVideoSource alloc] initWithMediaSource:source.get()]; |
| 70 } | 70 } |
| 71 } | 71 } |
| 72 return self; | 72 return self; |
| 73 } | 73 } |
| 74 | 74 |
| 75 - (void)configure { | 75 - (void)configure { |
| 76 _adapters = [NSMutableArray array]; | 76 _adapters = [NSMutableArray array]; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 @end | 114 @end |
| 115 | 115 |
| 116 @implementation RTCVideoTrack (Internal) | 116 @implementation RTCVideoTrack (Internal) |
| 117 | 117 |
| 118 - (rtc::scoped_refptr<webrtc::VideoTrackInterface>)nativeVideoTrack { | 118 - (rtc::scoped_refptr<webrtc::VideoTrackInterface>)nativeVideoTrack { |
| 119 return static_cast<webrtc::VideoTrackInterface*>(self.mediaTrack.get()); | 119 return static_cast<webrtc::VideoTrackInterface*>(self.mediaTrack.get()); |
| 120 } | 120 } |
| 121 | 121 |
| 122 @end | 122 @end |
| OLD | NEW |