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

Side by Side Diff: webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm

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, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/api/objc/avfoundationvideocapturer.h" 11 #include "avfoundationvideocapturer.h"
12
13 #import <AVFoundation/AVFoundation.h>
14 #import <Foundation/Foundation.h>
15 #import <UIKit/UIKit.h>
16
17 #import "RTCDispatcher+Private.h"
18 #import "WebRTC/RTCLogging.h"
12 19
13 #include "webrtc/base/bind.h" 20 #include "webrtc/base/bind.h"
14 #include "webrtc/base/checks.h" 21 #include "webrtc/base/checks.h"
15 #include "webrtc/base/thread.h" 22 #include "webrtc/base/thread.h"
16 23
17 #import <AVFoundation/AVFoundation.h>
18 #import <Foundation/Foundation.h>
19 #import <UIKit/UIKit.h>
20
21 #import "webrtc/base/objc/RTCDispatcher+Private.h"
22 #import "webrtc/base/objc/RTCLogging.h"
23
24 // TODO(tkchin): support other formats. 24 // TODO(tkchin): support other formats.
25 static NSString *const kDefaultPreset = AVCaptureSessionPreset640x480; 25 static NSString *const kDefaultPreset = AVCaptureSessionPreset640x480;
26 static cricket::VideoFormat const kDefaultFormat = 26 static cricket::VideoFormat const kDefaultFormat =
27 cricket::VideoFormat(640, 27 cricket::VideoFormat(640,
28 480, 28 480,
29 cricket::VideoFormat::FpsToInterval(30), 29 cricket::VideoFormat::FpsToInterval(30),
30 cricket::FOURCC_NV12); 30 cricket::FOURCC_NV12);
31 31
32 // This class used to capture frames using AVFoundation APIs on iOS. It is meant 32 // This class used to capture frames using AVFoundation APIs on iOS. It is meant
33 // to be owned by an instance of AVFoundationVideoCapturer. The reason for this 33 // to be owned by an instance of AVFoundationVideoCapturer. The reason for this
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 536
537 // This will call a superclass method that will perform the frame conversion 537 // This will call a superclass method that will perform the frame conversion
538 // to I420. 538 // to I420.
539 SignalFrameCaptured(this, &frame); 539 SignalFrameCaptured(this, &frame);
540 540
541 CVPixelBufferUnlockBaseAddress(image_buffer, lock_flags); 541 CVPixelBufferUnlockBaseAddress(image_buffer, lock_flags);
542 CVBufferRelease(image_buffer); 542 CVBufferRelease(image_buffer);
543 } 543 }
544 544
545 } // namespace webrtc 545 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698