ObjC: RTCVideoSource cleanup
RTCVideoSource was recently added in https://codereview.webrtc.org/2745193002/. This CL addresses some post commit feedback. BUG=webrtc:7177 Review-Url: https://codereview.webrtc.org/2812533003 Cr-Commit-Position: refs/heads/master@{#17649}
This commit is contained in:
@ -89,9 +89,9 @@
|
||||
}
|
||||
|
||||
- (RTCVideoSource *)videoSource {
|
||||
rtc::scoped_refptr<webrtc::ObjcVideoTrackSource> objc_video_track_source(
|
||||
rtc::scoped_refptr<webrtc::ObjcVideoTrackSource> objcVideoTrackSource(
|
||||
new rtc::RefCountedObject<webrtc::ObjcVideoTrackSource>());
|
||||
return [[RTCVideoSource alloc] initWithNativeVideoSource:objc_video_track_source];
|
||||
return [[RTCVideoSource alloc] initWithNativeVideoSource:objcVideoTrackSource];
|
||||
}
|
||||
|
||||
- (RTCVideoTrack *)videoTrackWithSource:(RTCVideoSource *)source
|
||||
|
||||
@ -10,19 +10,16 @@
|
||||
|
||||
#import "WebRTC/RTCVideoCapturer.h"
|
||||
|
||||
@implementation RTCVideoCapturer {
|
||||
__weak id<RTCVideoCapturerDelegate> _delegate;
|
||||
}
|
||||
@implementation RTCVideoCapturer
|
||||
|
||||
@synthesize delegate = _delegate;
|
||||
|
||||
- (instancetype)initWithDelegate:(id<RTCVideoCapturerDelegate>)delegate {
|
||||
NSAssert(delegate != nil, @"delegate cannot be nil");
|
||||
if (self = [super init]) {
|
||||
_delegate = delegate;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id<RTCVideoCapturerDelegate>)delegate {
|
||||
return _delegate;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@ -11,11 +11,12 @@
|
||||
#ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_OBJCVIDEOTRACKSOURCE_H_
|
||||
#define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_OBJCVIDEOTRACKSOURCE_H_
|
||||
|
||||
#import <WebRTC/RTCVideoFrame.h>
|
||||
|
||||
#include "WebRTC/RTCMacros.h"
|
||||
#include "webrtc/base/timestampaligner.h"
|
||||
#include "webrtc/media/base/adaptedvideotracksource.h"
|
||||
|
||||
RTC_FWD_DECL_OBJC_CLASS(RTCVideoFrame);
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
class ObjcVideoTrackSource : public rtc::AdaptedVideoTrackSource {
|
||||
|
||||
Reference in New Issue
Block a user