OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. |
| 3 * |
| 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 |
| 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ |
| 10 |
| 11 #import "RTCAudioSource+Private.h" |
| 12 |
| 13 #include "webrtc/base/checks.h" |
| 14 |
| 15 @implementation RTCAudioSource { |
| 16 rtc::scoped_refptr<webrtc::AudioSourceInterface> _nativeAudioSource; |
| 17 } |
| 18 |
| 19 - (instancetype)initWithNativeAudioSource: |
| 20 (rtc::scoped_refptr<webrtc::AudioSourceInterface>)nativeAudioSource { |
| 21 RTC_DCHECK(nativeAudioSource); |
| 22 if (self = [super initWithNativeMediaSource:nativeAudioSource |
| 23 type:RTCMediaSourceTypeAudio]) { |
| 24 _nativeAudioSource = nativeAudioSource; |
| 25 } |
| 26 return self; |
| 27 } |
| 28 |
| 29 - (instancetype)initWithNativeMediaSource: |
| 30 (rtc::scoped_refptr<webrtc::MediaSourceInterface>)nativeMediaSource |
| 31 type:(RTCMediaSourceType)type { |
| 32 RTC_NOTREACHED(); |
| 33 return nil; |
| 34 } |
| 35 |
| 36 - (NSString *)description { |
| 37 NSString *stateString = [[self class] stringForState:self.state]; |
| 38 return [NSString stringWithFormat:@"RTCAudioSource( %p ): %@", self, stateStri
ng]; |
| 39 } |
| 40 |
| 41 #pragma mark - Private |
| 42 |
| 43 - (rtc::scoped_refptr<webrtc::AudioSourceInterface>)nativeAudioSource { |
| 44 return _nativeAudioSource; |
| 45 } |
| 46 |
| 47 @end |
OLD | NEW |