class CvVideoCamera

#include <cap_ios.h>

class CvVideoCamera:
    public CvAbstractCamera,
    public <AVCaptureVideoDataOutputSampleBufferDelegate>
{
public:
    // properties

    id<CvVideoCameraDelegate>
    delegate;

    BOOL
    grayscaleMode;

    AVAssetWriter*
    recordAssetWriter;

    AVAssetWriterInput*
    recordAssetWriterInput;

    AVAssetWriterInputPixelBufferAdaptor*
    recordPixelBufferAdaptor;

    BOOL
    recordVideo;

    BOOL
    rotateVideo;

    // methods

    virtual
    void
    adjustLayoutToInterfaceOrientation:(UIInterfaceOrientation interfaceOrientation);

    virtual
    void
    layoutPreviewLayer();

    virtual
    void
    saveVideo();

    virtual
    NSString*
    videoFileString();

    virtual
    NSURL*
    videoFileURL();

protected:
    // fields

    CALayer* customPreviewLayer;
    CMTime lastSampleTime;
    AVCaptureVideoDataOutput* videoDataOutput;
    dispatch_queue_t videoDataOutputQueue;
};

Inherited Members

public:
    // properties

    AVCaptureSession*
    captureSession;

    BOOL
    captureSessionLoaded;

    AVCaptureVideoPreviewLayer*
    captureVideoPreviewLayer;

    AVCaptureDevicePosition
    defaultAVCaptureDevicePosition;

    NSString*const
    defaultAVCaptureSessionPreset;

    AVCaptureVideoOrientation
    defaultAVCaptureVideoOrientation;

    int
    defaultFPS;

    int
    imageHeight;

    int
    imageWidth;

    UIView*
    parentView;

    BOOL
    running;

    BOOL
    useAVCaptureVideoPreviewLayer;

    AVCaptureConnection*
    videoCaptureConnection;

    // methods

    virtual
    void
    createCaptureOutput();

    virtual
    void
    createVideoPreviewLayer();

    virtual
    id
    initWithParentView:(UIView* parent);

    virtual
    void
    lockBalance();

    virtual
    void
    lockExposure();

    virtual
    void
    lockFocus();

    virtual
    void
    start();

    virtual
    void
    stop();

    virtual
    void
    switchCameras();

    virtual
    void
    unlockBalance();

    virtual
    void
    unlockExposure();

    virtual
    void
    unlockFocus();

    virtual
    void
    updateOrientation();

protected:
    // fields

    BOOL cameraAvailable;
    UIDeviceOrientation currentDeviceOrientation;