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

Unified Diff: media/base/mac/avfoundation_glue.h

Issue 2129733004: ImageCapture: Implement takePhoto() for Mac AVFoundation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: General cleanup and added VideoCaptureDeviceTest::TakePhoto Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: media/base/mac/avfoundation_glue.h
diff --git a/media/base/mac/avfoundation_glue.h b/media/base/mac/avfoundation_glue.h
index a5b430412fdcfe3da37983f4d41fcdf19bbb0451..1aa981c2029c03b5e8bc150740278d3b2c0dffcb 100644
--- a/media/base/mac/avfoundation_glue.h
+++ b/media/base/mac/avfoundation_glue.h
@@ -51,6 +51,7 @@ class MEDIA_EXPORT AVFoundationGlue {
static Class AVCaptureSessionClass();
static Class AVCaptureVideoDataOutputClass();
+ static Class AVCaptureStillImageOutputClass();
#endif // defined(__OBJC__)
private:
@@ -95,6 +96,9 @@ MEDIA_EXPORT
MEDIA_EXPORT
@interface CrAVCaptureOutput : NSObject // Originally from AVCaptureOutput.h.
+
+- (NSArray*)connections;
+
@end
// Originally AVCaptureSession and coming from AVCaptureSession.h.
@@ -104,6 +108,7 @@ MEDIA_EXPORT
- (void)release;
- (void)addInput:(CrAVCaptureInput*)input;
- (void)removeInput:(CrAVCaptureInput*)input;
+- (NSArray*)outputs;
- (void)addOutput:(CrAVCaptureOutput*)output;
- (void)removeOutput:(CrAVCaptureOutput*)output;
- (BOOL)isRunning;
@@ -156,6 +161,17 @@ MEDIA_EXPORT
@end
+// Originally AVCaptureStillImageOutput and coming from AVCaptureOutput.h.
+MEDIA_EXPORT
+@interface CrAVCaptureStillImageOutput : CrAVCaptureOutput
+
+typedef void (^CompletionHandler)(CoreMediaGlue::CMSampleBufferRef, NSError*);
+- (void)
+captureStillImageAsynchronouslyFromConnection:(CrAVCaptureConnection*)connection
+ completionHandler:(CompletionHandler)handler;
+
+@end
+
// Class to provide access to class methods of AVCaptureDevice.
MEDIA_EXPORT
@interface AVCaptureDeviceGlue : NSObject
« no previous file with comments | « no previous file | media/base/mac/avfoundation_glue.mm » ('j') | media/capture/video/mac/video_capture_device_avfoundation_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698