harmony 鸿蒙Video Recording Development
Video Recording Development
When to Use
Use the camera module APIs to capture video streams.
Available APIs
For details, see Available APIs.
Constraints
None
How to Develop
Perform step 1 through step 4 described in Photographing Development.
Obtain the FrameConfig instance for video 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);
- Start and stop video recording.
stateCallback->camera_->TriggerLoopingCapture(*fc); // Start recording.
stateCallback->camera_->StopLoopingCapture(); // Stop recording.
你可能感兴趣的鸿蒙文章
harmony 鸿蒙AI Framework Development Guide
harmony 鸿蒙NNRt Access Adaptation
harmony 鸿蒙Application Privilege Configuration
harmony 鸿蒙Setting Up a Development Environment
harmony 鸿蒙Development Guidelines
harmony 鸿蒙Application Framework Overview
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦