{"id":197580,"date":"2013-10-15T13:09:03","date_gmt":"2013-10-15T09:09:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=197580"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=197580","title":{"rendered":"<span class=\"post_title\">\u041a\u0430\u043a \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u043a\u0430\u043c\u0435\u0440\u043e\u0439 iPhone \u0432 QCamplr<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/5f2\/9ee\/9a0\/5f29ee9a03600813a01f71012f1fe12b.png\" alt=\"image\"\/><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e \u0432\u0441\u0435 \u0425\u0430\u0431\u0440\u0430-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e!<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0431\u044b \u0445\u043e\u0442\u0435\u043b \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u2014 <b>QCamplr<\/b>, \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043a\u0430\u043c\u0435\u0440\u043e\u0439 iOS-\u0434\u0435\u0432\u0430\u0439\u0441\u0430.<br \/>  \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u0430\u043c\u0435\u0440\u044b \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h5>\u0428\u0430\u0433 1: \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438<\/h5>\n<p>  \u042f \u0443\u0436\u0435 \u043d\u0430\u0447\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 Objective-C \u0432 Xcode 5, \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 <\/p>\n<pre><code>#import<\/code><\/pre>\n<p> \u0431\u044b\u043b \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u043d\u0430 <\/p>\n<pre><code>@import<\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u0430\u043c\u0435\u0440\u043e\u0439 iOS, \u043d\u0430\u043c \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f <b>AVFoundation.framework<\/b>, \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u043c \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0437 <b>CoreMedia<\/b>, <b>CoreVideo<\/b> \u0438 <b>ImageIO<\/b>. \u0421\u043e\u0432\u0435\u0442\u0443\u044e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441, \u0447\u0442\u043e \u0431\u044b \u043f\u043e\u0442\u043e\u043c \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<pre><code>@import AVFoundation; @import CoreMedia; @import CoreVideo; @import ImageIO; <\/code><\/pre>\n<p>  <\/p>\n<h5>\u0428\u0430\u0433 2: \u0414\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043c\u0435\u0442\u043e\u0434\u044b<\/h5>\n<p>  <\/p>\n<pre><code>@property (nonatomic, strong, readonly) AVCaptureSession *captureSession; @property (nonatomic, strong, readonly) AVCaptureDevice *captureDevice; @property (nonatomic, strong, readonly) AVCaptureVideoPreviewLayer *captureVideoPreviewLayer; @property (nonatomic, strong, readonly) AVCaptureDeviceInput *captureDeviceInput; @property (nonatomic, strong, readonly) AVCaptureStillImageOutput *captureStillImageOutput;  + (QCCameraManager *)sharedManager;  - (void)setupCaptureSessionWithSessionPreset:(NSString *)sessionPreset captureDevice:(AVCaptureDevice *)captureDevice captureViewLayer:(CALayer *)captureViewLayer;  - (void)captureStillImageWithCompletionHandler:(void (^)(UIImage *capturedStillImage))completionHandler;  - (BOOL)toggleCaptureDevice;  - (AVCaptureDevice *)captureDeviceWithPosition:(AVCaptureDevicePosition)captureDevicePosition;  - (BOOL)configureFocusModeOnDevice:(AVCaptureDevice *)captureDevice withFocusMode:(AVCaptureFocusMode)focusMode focusPointOfInterest:(CGPoint)focusPointOfInterest; - (BOOL)configureExposureModeOnDevice:(AVCaptureDevice *)captureDevice withExposureMode:(AVCaptureExposureMode)exposureMode exposurePointOfInterest:(CGPoint)exposurePointOfInterest; - (BOOL)configureWhiteBalanceModeOnDevice:(AVCaptureDevice *)captureDevice withWhiteBalanceMode:(AVCaptureWhiteBalanceMode)whiteBalanceMode; - (BOOL)configureFlashModeOnDevice:(AVCaptureDevice *)captureDevice withFlashMode:(AVCaptureFlashMode)flashMode; - (BOOL)configureTorchModeOnDevice:(AVCaptureDevice *)captureDevice withTorchMode:(AVCaptureTorchMode)torchMode torchLevel:(CGFloat)torchLevel; - (BOOL)configureLowLightBoostOnDevice:(AVCaptureDevice *)captureDevice withLowLightBoostEnabled:(BOOL)lowLightBoostEnabled; <\/code><\/pre>\n<p>  \u0412\u0441\u0435 \u043d\u0430\u0448\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u044e\u0442 <b>readonly keyword<\/b>. \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043a\u0442\u043e-\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u043b \u0438\u0445 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u044b\u0432\u0430\u044e\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0435\u0441\u0441\u0438\u0438 \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u043c\u0443 \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e <b>AVFoundation stack<\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u043e\u0442\u043e\u0441\u044a\u0435\u043c\u043a\u0438 \u0441 \u043a\u0430\u043c\u0435\u0440\u044b iOS-\u0434\u0435\u0432\u0430\u0439\u0441\u0430.<\/p>\n<p>  <i>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438 11 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0439 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0448\u0430\u0433\u0430\u0445.<\/i><\/p>\n<p>  <i><b>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u043b\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c .m \u0444\u0430\u0439\u043b \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u0430\u0448\u0435\u0439 \u043a\u0430\u043c\u0435\u0440\u044b.<\/b><\/i><\/p>\n<h5>\u0428\u0430\u0433 3: Singleton<\/h5>\n<p>  \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e iOS-\u0434\u0435\u0432\u0430\u0439\u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0443 \u0430\u043a\u0442\u0438\u0432\u043d\u0443\u044e <b>AVCaptureSession<\/b>. \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0441\u0441\u0438\u0439 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e, \u0442\u043e \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0443 \u0432 <b>Console<\/b>. \u0422\u0430\u043a \u0436\u0435 \u0435\u0441\u0442\u044c \u043c\u0430\u0441\u0441\u0430 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c \u043a\u0430\u043c\u0435\u0440\u044b \u0438\u0437 \u043b\u044e\u0431\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c <b>singleton<\/b>. \u041c\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c ARC, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 <b>singeton<\/b> \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u043e\u0442 \u0442\u0430\u043a:  <\/p>\n<pre><code>+ (QCCameraManager *)sharedManager {     static dispatch_once_t dispatchOncePredicate;     __strong static QCCameraManager *cameraManager = nil;     dispatch_once(&dispatchOncePredicate, ^{         cameraManager = [[QCCameraManager alloc] init];     });     return cameraManager; } <\/code><\/pre>\n<h5>\u0428\u0430\u0433 4: \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043d\u0430\u0448 AVFoundation Stack<\/h5>\n<p>  <\/p>\n<pre><code>- (void)setupCaptureSessionWithSessionPreset:(NSString *)sessionPreset captureDevice:(AVCaptureDevice *)captureDevice captureViewLayer:(CALayer *)captureViewLayer {     [self setCaptureSession:[[AVCaptureSession alloc] init]];          if([[self captureSession] canSetSessionPreset:sessionPreset]) {         [[self captureSession] setSessionPreset:sessionPreset];     } else {         [[self captureSession] setSessionPreset:AVCaptureSessionPresetHigh];     }          [self setCaptureDevice:captureDevice];              [self setCaptureDeviceInput:[[AVCaptureDeviceInput alloc] initWithDevice:[self captureDevice] error:nil]];          if(![[[self captureSession] inputs] count]) {         if([[self captureSession] canAddInput:[self captureDeviceInput]]) {             [[self captureSession] addInput:[self captureDeviceInput]];         }     }          [self setCaptureStillImageOutput:[[AVCaptureStillImageOutput alloc] init]];     [[self captureStillImageOutput] setOutputSettings:[[NSDictionary alloc] initWithObjectsAndKeys:AVVideoCodecJPEG, AVVideoCodecKey, nil]];          if ([[self captureSession] canAddOutput:[self captureStillImageOutput]]) {         [[self captureSession] addOutput:[self captureStillImageOutput]];     }          [self configureWhiteBalanceModeOnDevice:[self captureDevice] withWhiteBalanceMode:AVCaptureWhiteBalanceModeContinuousAutoWhiteBalance];     [self configureLowLightBoostOnDevice:[self captureDevice] withLowLightBoostEnabled:YES];              [self setCaptureVideoPreviewLayer:[[AVCaptureVideoPreviewLayer alloc] initWithSession:[self captureSession]]];     [[self captureVideoPreviewLayer] setVideoGravity:AVLayerVideoGravityResizeAspectFill];     [[self captureVideoPreviewLayer] setBounds:[captureViewLayer bounds]];     [[self captureVideoPreviewLayer] setFrame:[captureViewLayer bounds]];          [captureViewLayer setMasksToBounds:YES];     [captureViewLayer insertSublayer:[self captureVideoPreviewLayer] atIndex:0]; } <\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u0432\u0441\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e:  <\/p>\n<ul>\n<li>\u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0435\u0441\u0441\u0438\u044e, \u0438 \u0437\u0430\u0434\u0430\u0435\u043c \u0435\u0439 preset, \u043e\u043d \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0441\u044a\u0435\u043c\u043a\u0438.<\/li>\n<li>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u0434\u043b\u044f \u0441\u044a\u0435\u043c\u043a\u0438, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0437\u0430\u0434\u043d\u044f\u044f \u043a\u0430\u043c\u0435\u0440\u0430<\/li>\n<li>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c <b>input<\/b> \u043a \u043d\u0430\u0448\u0435\u0439 \u0441\u0435\u0441\u0441\u0438\u0438. \u041e\u043d \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u043a\u0430\u043c\u0435\u0440\u044b \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0421\u0435\u0441\u0441\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d <b>input<\/b>, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e <b>output<\/b> \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u0438\u043f\u0430 \u00ab\u043c\u043e\u0433\u0443 \u043b\u0438 \u044f \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 <b>input<\/b> \u043a \u0441\u0435\u0441\u0441\u0438\u0438?\u00bb \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0435\u0433\u0434\u0430!<\/li>\n<li>\u0414\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c <b>output<\/b>, \u043e\u043d \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0441\u044a\u0435\u043c\u043a\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u043a\u0430\u043c\u0435\u0440\u044b. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u0438\u043f\u0430 \u00ab\u043c\u043e\u0433\u0443 \u043b\u0438 \u044f \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 <b>output<\/b> \u043a \u0441\u0435\u0441\u0441\u0438\u0438?\u00bb \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0432\u0441\u0435\u0433\u0434\u0430!<\/li>\n<li>\u0414\u0430\u043b\u0435\u0435, \u043c\u044b \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0442\u0435\u0445 \u043e\u043f\u0446\u0438\u0439 \u043a\u0430\u043c\u0435\u0440\u044b, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u044b \u043d\u0435 \u0434\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043d\u0438\u0445 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435.<\/li>\n<li>\u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u043b\u043e\u0439, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441 \u043d\u0430\u0448\u0435\u0433\u043e <i>input \u0434\u0435\u0432\u0430\u0439\u0441\u0430<\/i>. \u0421\u043b\u043e\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u0430\u043a <b>sublayer<\/b> \u0441\u043b\u043e\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u043b\u0438 \u043a\u0430\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043a \u044d\u0442\u043e\u043c\u0443 \u043c\u0435\u0442\u043e\u0434\u0443.<\/li>\n<\/ul>\n<p>  \u0421\u0435\u0441\u0441\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0430! \u0427\u0442\u043e\u0431\u044b \u0435\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <b>startRunning<\/b> \u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <b>captureSession<\/b>, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0440\u0432\u0430\u0442\u044c \u0441\u0435\u0441\u0441\u0438\u044e, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <b>stopRunning<\/b>. <\/p>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u044b\u0437\u043e\u0432 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u0432\u0430\u0448\u0435\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u0435:  <\/p>\n<pre><code>[[QCCameraManager sharedManager] setupCaptureSessionWithSessionPreset:AVCaptureSessionPresetPhoto captureDevice:[AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo] captureViewLayer:[[self view] layer]]; [[[[QCCameraManager sharedManager] captureSession] startRunning]; <\/code><\/pre>\n<h5>\u0428\u0430\u0433 5: \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043a\u0430\u043c\u0435\u0440\u0443<\/h5>\n<p>  <\/p>\n<pre><code>- (BOOL)configureTorchModeOnDevice:(AVCaptureDevice *)captureDevice withTorchMode:(AVCaptureTorchMode)torchMode torchLevel:(CGFloat)torchLevel {     if([captureDevice hasTorch] && [captureDevice isTorchAvailable]) {         if([captureDevice torchMode] != torchMode) {             if([captureDevice isTorchModeSupported:torchMode]) {                 if(!(([captureDevice isTorchActive]) && (torchMode == AVCaptureTorchModeOn))) {                     if([captureDevice lockForConfiguration:nil]) {                         if((torchMode == AVCaptureTorchModeOn) && (torchLevel &gt;= 0.0f)) {                             [captureDevice setTorchModeOnWithLevel:torchLevel error:nil];                         } else {                             [captureDevice setTorchMode:torchMode];                         }                         [captureDevice unlockForConfiguration];                     } else {                         return NO;                     }                 }             } else {                 return NO;             }         }         return YES;     } else {         return NO;     } }  - (BOOL)configureFlashModeOnDevice:(AVCaptureDevice *)captureDevice withFlashMode:(AVCaptureFlashMode)flashMode {     if([captureDevice isFlashAvailable] && [captureDevice isFlashModeSupported:flashMode]) {         if([captureDevice flashMode] != flashMode) {             if([captureDevice lockForConfiguration:nil]) {                 [captureDevice setFlashMode:flashMode];                 [captureDevice unlockForConfiguration];             } else {                 return NO;             }         }         return YES;     } else {         return NO;     } }  - (BOOL)configureWhiteBalanceModeOnDevice:(AVCaptureDevice *)captureDevice withWhiteBalanceMode:(AVCaptureWhiteBalanceMode)whiteBalanceMode {     if([captureDevice isWhiteBalanceModeSupported:whiteBalanceMode]) {         if([captureDevice whiteBalanceMode] != whiteBalanceMode) {             if([captureDevice lockForConfiguration:nil]) {                 [captureDevice setWhiteBalanceMode:whiteBalanceMode];                 [captureDevice unlockForConfiguration];             } else {                 return NO;             }         }         return YES;     } else {         return NO;     } }  - (BOOL)configureFocusModeOnDevice:(AVCaptureDevice *)captureDevice withFocusMode:(AVCaptureFocusMode)focusMode focusPointOfInterest:(CGPoint)focusPointOfInterest {     if([captureDevice isFocusModeSupported:focusMode] && [captureDevice isFocusPointOfInterestSupported]) {         if([captureDevice focusMode] == focusMode) {             if([captureDevice lockForConfiguration:nil]) {                 [captureDevice setFocusPointOfInterest:focusPointOfInterest];                 [captureDevice setFocusMode:focusMode];                 [captureDevice unlockForConfiguration];             } else {                 return NO;             }         }         return YES;     } else {         return NO;     } }  - (BOOL)configureExposureModeOnDevice:(AVCaptureDevice *)captureDevice withExposureMode:(AVCaptureExposureMode)exposureMode exposurePointOfInterest:(CGPoint)exposurePointOfInterest {     if ([captureDevice isExposureModeSupported:exposureMode] && [captureDevice isExposurePointOfInterestSupported]) {         if([captureDevice exposureMode] == exposureMode) {             if([captureDevice lockForConfiguration:nil]) {                 [captureDevice setExposurePointOfInterest:exposurePointOfInterest];                 [captureDevice setExposureMode:exposureMode];                 [captureDevice unlockForConfiguration];             } else {                 return NO;             }         }         return YES; \t} else {         return NO;     } }  - (BOOL)configureLowLightBoostOnDevice:(AVCaptureDevice *)captureDevice withLowLightBoostEnabled:(BOOL)lowLightBoostEnabled {     if([captureDevice isLowLightBoostSupported]) {         if([captureDevice isLowLightBoostEnabled] != lowLightBoostEnabled) {             if([captureDevice lockForConfiguration:nil]) {                 [captureDevice setAutomaticallyEnablesLowLightBoostWhenAvailable:lowLightBoostEnabled];                 [captureDevice unlockForConfiguration];             } else {                 return NO;             }         }         return YES;     } else {         return NO;     } } <\/code><\/pre>\n<p>  \u0412\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u0430\u043c\u0435\u0440\u044b \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430\u0448\u0438\u043c\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438, \u0432\u0441\u0435 \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0438 \u0442\u043e\u043c\u0443 \u0436\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443. \u0412\u0441\u0435 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <b>lockForConfiguration:<\/b>, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <b>unlockForConfiguration<\/b>.<\/p>\n<p>  \u0412 <b>QCamplr<\/b> \u043c\u044b \u0434\u0430\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c 4 \u043e\u043f\u0446\u0438\u0438: \u0432\u0441\u043f\u044b\u0448\u043a\u0430, \u0444\u043e\u043d\u0430\u0440\u044c(\u043d\u043e\u0447\u043d\u0430\u044f \u0441\u044a\u0435\u043c\u043a\u0430), \u0444\u043e\u043a\u0443\u0441 \u0438 \u044d\u043a\u0441\u043f\u043e\u0437\u0438\u0446\u0438\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/318\/13d\/afa\/31813dafac423eb944a1d1ee6223f959.png\" alt=\"image\"\/><\/p>\n<h5>\u0428\u0430\u0433 5: \u0424\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0440\u0443\u0435\u043c<\/h5>\n<p>  <\/p>\n<pre><code>- (void)captureStillImageWithCompletionHandler:(void (^)(UIImage *capturedStillImage))completionHandler {     if(![[self captureStillImageOutput] isCapturingStillImage]) {         [[NSNotificationCenter defaultCenter] postNotificationName:@&quot;QCCameraManagedWillCaptureStillImageNotification&quot; object:nil userInfo:nil];         [[self captureStillImageOutput] captureStillImageAsynchronouslyFromConnection:[[self captureStillImageOutput] connectionWithMediaType:AVMediaTypeVideo] completionHandler:^(CMSampleBufferRef imageDataSampleBuffer, NSError *error) {             if (imageDataSampleBuffer) {                 UIImage *capturedStillImage = [[UIImage alloc] initWithData:[AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageDataSampleBuffer]];                 completionHandler([capturedStillImage croppedImageFromCaptureDevice:[self captureDevice]]);             }         }];     } } <\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442\u0435 \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u00ab\u0442\u0443\u0433\u043b\u0435\u0440\u00bb \u0432 QCamplr. \u0412 completionHandler \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 jpeg, \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0442\u0430\u044f \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 UIImage. <\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/6e1\/2f6\/691\/6e12f6691ded366b8190f7883dc29240.png\" alt=\"image\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0432\u0430\u043c \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u0430\u043c\u0435\u0440\u043e\u0439.<\/p>\n<h5>\u041c\u0435\u0442\u043e\u0434 #1<\/h5>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0444\u0440\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043b\u0438 \u0437\u0430\u0434\u043d\u0435\u0439 \u043a\u0430\u043c\u0435\u0440\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430:  <\/p>\n<pre><code class=\"objectivec\">- (AVCaptureDevice *)captureDeviceWithPosition:(AVCaptureDevicePosition)captureDevicePosition {     NSArray *captureDevices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo];     for(AVCaptureDevice *captureDevice in captureDevices) {         if([captureDevice position] == captureDevicePosition) {             return captureDevice;         }     }     return nil; } <\/code><\/pre>\n<h5>\u041c\u0435\u0442\u043e\u0434 #2<\/h5>\n<p>  \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u0441 \u0444\u0440\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u0430\u043c\u0435\u0440\u044b \u043d\u0430 \u0437\u0430\u0434\u043d\u044e\u044e \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430:  <\/p>\n<pre><code class=\"objectivec\">- (BOOL)toggleCaptureDevice {     if ([[AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo] count] &gt; 1) {         AVCaptureDeviceInput *captureDeviceInput = [self captureDeviceInput];                  if([[[self captureDeviceInput] device] position] == AVCaptureDevicePositionBack) {             [self setCaptureDeviceInput:[[AVCaptureDeviceInput alloc] initWithDevice:[self captureDeviceWithPosition:AVCaptureDevicePositionFront] error:nil]];         } else if([[[self captureDeviceInput] device] position] == AVCaptureDevicePositionFront) {             [self setCaptureDeviceInput:[[AVCaptureDeviceInput alloc] initWithDevice:[self captureDeviceWithPosition:AVCaptureDevicePositionBack] error:nil]];         } else if([[[self captureDeviceInput] device] position] == AVCaptureDevicePositionUnspecified) {             return NO;         }                  [self setCaptureDevice:[[self captureDeviceInput] device]];                  [[self captureSession] beginConfiguration];                  [[self captureSession] removeInput:captureDeviceInput];                  if([[self captureSession] canAddInput:[self captureDeviceInput]]) {             [[self captureSession] addInput:[self captureDeviceInput]];         } else {             [[self captureSession] addInput:captureDeviceInput];         }                  [[self captureSession] commitConfiguration];                  return YES;     } else {         return NO;     } } <\/code><\/pre>\n<h5>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0421\u0441\u044b\u043b\u043a\u0438<\/h5>\n<p>  <a href=\"https:\/\/developer.apple.com\/av-foundation\/\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e AVFoundation<\/a><br \/>  <a href=\"https:\/\/www.qcamplr.com\/\">\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 QCamplr<\/a><\/p>\n<p>  P.S. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u044b\u043b\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0432\u0441\u0435\u043c \u0442\u0435\u043c, \u043a\u0442\u043e \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0432\u043e\u0431\u043e\u0434\u044b \u0438 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u0430\u043c\u0435\u0440\u0430\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043d\u043e \u043d\u0435 \u0437\u043d\u0430\u043b, \u0441 \u0447\u0435\u0433\u043e \u043d\u0430\u0447\u0430\u0442\u044c. \u0416\u0435\u043b\u0430\u044e \u0432\u0441\u0435\u043c \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0438 \u0443\u0434\u0430\u0447\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u043d\u0435\u043b\u0435\u0433\u043a\u043e\u043c \u0434\u0435\u043b\u0435! \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/197580\/\"> http:\/\/habrahabr.ru\/post\/197580\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/5f2\/9ee\/9a0\/5f29ee9a03600813a01f71012f1fe12b.png\" alt=\"image\"\/><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e \u0432\u0441\u0435 \u0425\u0430\u0431\u0440\u0430-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e!<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0431\u044b \u0445\u043e\u0442\u0435\u043b \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u2014 <b>QCamplr<\/b>, \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043a\u0430\u043c\u0435\u0440\u043e\u0439 iOS-\u0434\u0435\u0432\u0430\u0439\u0441\u0430.<br \/>  \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u0430\u043c\u0435\u0440\u044b \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-197580","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/197580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=197580"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/197580\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=197580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=197580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=197580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}