1 Star 0 Fork 4.9K

丛林 / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
device-camera-control-demo-videoguide.md 1.24 KB
一键复制 编辑 原始数据 按行查看 历史
wusongqing 提交于 2022-01-30 14:35 . deleted unnecessary links

Video Recording

When to Use

Use the camera module APIs to capture video streams.

Available APIs

For details, see the available APIs described in development guidelines on photographing.

Limitations and Constraints

None

How to Develop

  1. Perform step 1 through step 4 described in development guidelines on photographing.

  2. Obtain the FrameConfig instance for audio recording.

    /* Obtain the surface from the recorder. */
    Surface *surface = recorder_->GetSurface(0);
    surface->SetWidthAndHeight(1920, 1080);
    surface->SetQueueSize(3);
    surface->SetSize(1024 * 1024);
    /* Add the surface to the FrameConfig instance. */
    FrameConfig *fc = new FrameConfig(FRAME_CONFIG_RECORD);
    fc->AddSurface(*surface);
  3. Start and stop video recording.

    stateCallback->camera_->TriggerLoopingCapture(*fc); // Start recording.
    stateCallback->camera_->StopLoopingCapture(); // Stop recording.
1
https://gitee.com/jungle8023/docs.git
git@gitee.com:jungle8023/docs.git
jungle8023
docs
docs
master

搜索帮助