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

Side by Side Diff: webrtc/base/objc/RTCCameraPreviewView.m

Issue 1903663002: Build dynamic iOS SDK. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix test gyp Created 4 years, 7 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 | « webrtc/base/objc/RTCCameraPreviewView.h ('k') | webrtc/base/objc/RTCDispatcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 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 #if !defined(__has_feature) || !__has_feature(objc_arc)
12 #error "This file requires ARC support."
13 #endif
14
15 #import "webrtc/base/objc/RTCCameraPreviewView.h"
16
17 #import <AVFoundation/AVFoundation.h>
18
19 #import "webrtc/base/objc/RTCDispatcher.h"
20
21 @implementation RTCCameraPreviewView
22
23 @synthesize captureSession = _captureSession;
24
25 + (Class)layerClass {
26 return [AVCaptureVideoPreviewLayer class];
27 }
28
29 - (void)setCaptureSession:(AVCaptureSession *)captureSession {
30 if (_captureSession == captureSession) {
31 return;
32 }
33 _captureSession = captureSession;
34 AVCaptureVideoPreviewLayer *previewLayer = [self previewLayer];
35 [RTCDispatcher dispatchAsyncOnType:RTCDispatcherTypeCaptureSession
36 block:^{
37 previewLayer.session = captureSession;
38 }];
39 }
40
41 #pragma mark - Private
42
43 - (AVCaptureVideoPreviewLayer *)previewLayer {
44 return (AVCaptureVideoPreviewLayer *)self.layer;
45 }
46
47 @end
OLDNEW
« no previous file with comments | « webrtc/base/objc/RTCCameraPreviewView.h ('k') | webrtc/base/objc/RTCDispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698