| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "talk/app/webrtc/objc/avfoundationvideocapturer.h" | 28 #include "talk/app/webrtc/objc/avfoundationvideocapturer.h" |
| 29 | 29 |
| 30 #include "webrtc/base/bind.h" | 30 #include "webrtc/base/bind.h" |
| 31 #include "webrtc/base/checks.h" | 31 #include "webrtc/base/checks.h" |
| 32 #include "webrtc/base/thread.h" | 32 #include "webrtc/base/thread.h" |
| 33 | 33 |
| 34 #import <AVFoundation/AVFoundation.h> | 34 #import <AVFoundation/AVFoundation.h> |
| 35 #import <Foundation/Foundation.h> | 35 #import <Foundation/Foundation.h> |
| 36 #import <UIKit/UIKit.h> | 36 #import <UIKit/UIKit.h> |
| 37 | 37 |
| 38 #import "webrtc/base/objc/RTCDispatcher+Private.h" | 38 #import "RTCDispatcher+Private.h" |
| 39 #import "webrtc/base/objc/RTCLogging.h" | 39 #import "RTCLogging.h" |
| 40 | 40 |
| 41 // TODO(tkchin): support other formats. | 41 // TODO(tkchin): support other formats. |
| 42 static NSString *const kDefaultPreset = AVCaptureSessionPreset640x480; | 42 static NSString *const kDefaultPreset = AVCaptureSessionPreset640x480; |
| 43 static cricket::VideoFormat const kDefaultFormat = | 43 static cricket::VideoFormat const kDefaultFormat = |
| 44 cricket::VideoFormat(640, | 44 cricket::VideoFormat(640, |
| 45 480, | 45 480, |
| 46 cricket::VideoFormat::FpsToInterval(30), | 46 cricket::VideoFormat::FpsToInterval(30), |
| 47 cricket::FOURCC_NV12); | 47 cricket::FOURCC_NV12); |
| 48 | 48 |
| 49 // This class used to capture frames using AVFoundation APIs on iOS. It is meant | 49 // This class used to capture frames using AVFoundation APIs on iOS. It is meant |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 | 553 |
| 554 // This will call a superclass method that will perform the frame conversion | 554 // This will call a superclass method that will perform the frame conversion |
| 555 // to I420. | 555 // to I420. |
| 556 SignalFrameCaptured(this, &frame); | 556 SignalFrameCaptured(this, &frame); |
| 557 | 557 |
| 558 CVPixelBufferUnlockBaseAddress(image_buffer, lock_flags); | 558 CVPixelBufferUnlockBaseAddress(image_buffer, lock_flags); |
| 559 CVBufferRelease(image_buffer); | 559 CVBufferRelease(image_buffer); |
| 560 } | 560 } |
| 561 | 561 |
| 562 } // namespace webrtc | 562 } // namespace webrtc |
| OLD | NEW |