-1

我想在 iOS 中暂停视频录制是否可以使用任何库或框架来做到这一点?

4

2 回答 2

0

从这里下载 wwdc 2010 示例源代码:https ://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?code=y&source=x&bundleID= 20645 并找到 AVCamDemo 项目的代码。这一切都与视频录制、暂停和播放有关。

于 2012-11-29T06:54:28.433 回答
0

您需要将其从 AVCam 更改为 CameraEngine

    #import "CameraEngine.h"


- (void) startPreview
{
    AVCaptureVideoPreviewLayer* preview = [[CameraEngine engine] getPreviewLayer];
    [preview removeFromSuperlayer];
    preview.frame = self.cameraView.bounds;
    [[preview connection] setVideoOrientation:UIInterfaceOrientationLandscapeRight];

    [self.cameraView.layer addSublayer:preview];
}



    - (IBAction)startRecording:(id)sender
    {
        [[CameraEngine engine] startCapture];
    }

    - (IBAction)pauseRecording:(id)sender
    {
        [[CameraEngine engine] pauseCapture];
    }

    - (IBAction)stopRecording:(id)sender
    {
        [[CameraEngine engine] stopCapture];
    }
    - (IBAction)resumeRecording:(id)sender
    {
        [[CameraEngine engine] resumeCapture];
    }
于 2017-06-06T12:39:59.353 回答