Remove deprecated RTCVideoRenderer constructor.
Removes -[RTCVideoRenderer initWithView]. Also, fix potential issue where we hold on to a video frame longer than the lifetime of its associated track. BUG=3341 R=glaznev@webrtc.org Review URL: https://webrtc-codereview.appspot.com/16099004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7032 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -63,6 +63,18 @@ static CGFloat const kLocalViewPadding = 20;
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
self.remoteVideoView =
|
||||
[[RTCEAGLVideoView alloc] initWithFrame:self.blackView.bounds];
|
||||
self.remoteVideoView.delegate = self;
|
||||
self.remoteVideoView.transform = CGAffineTransformMakeScale(-1, 1);
|
||||
[self.blackView addSubview:self.remoteVideoView];
|
||||
|
||||
self.localVideoView =
|
||||
[[RTCEAGLVideoView alloc] initWithFrame:self.blackView.bounds];
|
||||
self.localVideoView.delegate = self;
|
||||
[self.blackView addSubview:self.localVideoView];
|
||||
|
||||
self.statusBarOrientation =
|
||||
[UIApplication sharedApplication].statusBarOrientation;
|
||||
self.roomInput.delegate = self;
|
||||
@@ -181,25 +193,13 @@ static CGFloat const kLocalViewPadding = 20;
|
||||
self.instructionsView.hidden = NO;
|
||||
self.logView.hidden = YES;
|
||||
self.logView.text = nil;
|
||||
self.localVideoView.videoTrack = nil;
|
||||
self.remoteVideoView.videoTrack = nil;
|
||||
self.blackView.hidden = YES;
|
||||
[self.remoteVideoView removeFromSuperview];
|
||||
self.remoteVideoView = nil;
|
||||
[self.localVideoView removeFromSuperview];
|
||||
self.localVideoView = nil;
|
||||
}
|
||||
|
||||
- (void)setupCaptureSession {
|
||||
self.blackView.hidden = NO;
|
||||
self.remoteVideoView =
|
||||
[[RTCEAGLVideoView alloc] initWithFrame:self.blackView.bounds];
|
||||
self.remoteVideoView.delegate = self;
|
||||
self.remoteVideoView.transform = CGAffineTransformMakeScale(-1, 1);
|
||||
[self.blackView addSubview:self.remoteVideoView];
|
||||
|
||||
self.localVideoView =
|
||||
[[RTCEAGLVideoView alloc] initWithFrame:self.blackView.bounds];
|
||||
self.localVideoView.delegate = self;
|
||||
[self.blackView addSubview:self.localVideoView];
|
||||
[self updateVideoViewLayout];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user