mirror of
https://github.com/openharmony/applications_sample_camera.git
synced 2026-07-01 14:21:52 -04:00
回退media/camera_sample.cpp文件修改
回退cpp文件修改,先解决黄区代码检查告警 Signed-off-by: tongkai0808fh <tongkai5@huawei.com>
This commit is contained in:
@@ -87,15 +87,6 @@ Recorder *SampleCreateRecorder()
|
||||
int32_t height = 1080;
|
||||
VideoCodecFormat encoder = HEVC;
|
||||
Recorder *recorder = new Recorder();
|
||||
HandleVideoAudio(recorder);
|
||||
return recorder;
|
||||
|
||||
ERROR:
|
||||
delete recorder;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void HandleVideoAudio(Recorder *recorder) {
|
||||
if ((ret = recorder->SetVideoSource(source, sourceId)) != SUCCESS) {
|
||||
cout << "SetVideoSource failed." << ret << endl;
|
||||
goto ERROR;
|
||||
@@ -144,6 +135,11 @@ void HandleVideoAudio(Recorder *recorder) {
|
||||
cout << "SetAudioEncodingBitRate failed." << ret << endl;
|
||||
goto ERROR;
|
||||
}
|
||||
return recorder;
|
||||
|
||||
ERROR:
|
||||
delete recorder;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
class SampleFrameStateCallback : public FrameStateCallback {
|
||||
|
||||
Reference in New Issue
Block a user