Latest 1.0.0
Homepage https://github.com/caixindong/XDCaptureService
License MIT
Platforms ios 8.0
Frameworks AVFoundation, CoreImage
Authors

CI Status
Version
License
Platform
A simple and stable camera component in iOS, which can help quickly build your own audio and video module.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

XDCaptureService is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'XDCaptureService'

Usage

Start service

@property (nonatomic, strong) XDCaptureService *service;
self.service = [[XDCaptureService alloc] init];
_service.delegate = self;

[_service startRunning];

Delegate implement

@protocol XDCaptureServiceDelegate <NSObject>

@optional
//service lifecylce
- (void)captureServiceDidStartService:(XDCaptureService *)service;

- (void)captureService:(XDCaptureService *)service serviceDidFailWithError:(NSError *)error;

- (void)captureServiceDidStopService:(XDCaptureService *)service;

- (void)captureService:(XDCaptureService *)service getPreviewLayer:(AVCaptureVideoPreviewLayer *)previewLayer;

- (void)captureService:(XDCaptureService *)service outputSampleBuffer:(CMSampleBufferRef)sampleBuffer;

//record module
- (void)captureServiceRecorderDidStart:(XDCaptureService *)service ;

- (void)captureService:(XDCaptureService *)service recorderDidFailWithError:(NSError *)error;

- (void)captureServiceRecorderDidStop:(XDCaptureService *)service;

//photo capture
- (void)captureService:(XDCaptureService *)service capturePhoto:(UIImage *)photo;

//face detect
- (void)captureService:(XDCaptureService *)service outputFaceDetectData:(NSArray <AVMetadataFaceObject*>*) faces;

//depth map
- (void)captureService:(XDCaptureService *)service captureTrueDepth:(AVDepthData *)depthData API_AVAILABLE(ios(11.0));

@end

Base actions

Capture a photo, record a video, face detect, capture depth map data, switch camera, focus, whiteBalance´╝îISO and so on.

More details

You can view more usage details in the demo project.

Author

[email protected]

License

XDCaptureService is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "XDCaptureService",
    "version": "1.0.0",
    "summary": "A short description of XDCaptureService.",
    "homepage": "https://github.com/caixindong/XDCaptureService",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "[email protected]": "[email protected]"
    },
    "source": {
        "git": "https://github.com/caixindong/XDCaptureService.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "XDCaptureService/Classes/**/*",
    "public_header_files": "XDCaptureService/Classes/XDCaptureService.h",
    "frameworks": [
        "AVFoundation",
        "CoreImage"
    ]
}

Pin It on Pinterest

Share This