diff --git a/README.en.md b/README.en.md index 047bbc70a535192b91e93203ed6f71346a88f1e5..886cba1ed2b247dce2840cefe8ef0c554b5e8911 100644 --- a/README.en.md +++ b/README.en.md @@ -98,6 +98,6 @@ N/A ### Constraints 1. The sample app is supported only on Huawei phones running the standard system. -2. The HarmonyOS version must be HarmonyOS NEXT Developer Beta1 or later. -3. The DevEco Studio version must be DevEco Studio NEXT Developer Beta1 or later. -4. The HarmonyOS SDK version must be HarmonyOS NEXT Developer Beta1 or later. +2. The HarmonyOS version must be HarmonyOS 5.0.0 Release or later. +3. The DevEco Studio version must be DevEco Studio 5.0.0 Release or later. +4. The HarmonyOS SDK version must be HarmonyOS 5.0.0 Release or later. diff --git a/README.md b/README.md index ab04a100bbfdd65711c8a71cf462581469af1ad0..9cd080f6689f5b45f678a2493e7ee8eda6b4941a 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,6 @@ ### 约束与限制 1. 本示例仅支持标准系统上运行,支持设备:华为手机。 -2. HarmonyOS系统:HarmonyOS NEXT Developer Beta1及以上。 -3. DevEco Studio版本:DevEco Studio NEXT Developer Beta1及以上。 -4. HarmonyOS SDK版本:HarmonyOS NEXT Developer Beta1 SDK及以上。 \ No newline at end of file +2. HarmonyOS系统:HarmonyOS 5.0.0 Release及以上。 +3. DevEco Studio版本:DevEco Studio 5.0.0 Release及以上。 +4. HarmonyOS SDK版本:HarmonyOS 5.0.0 Release SDK及以上。 \ No newline at end of file diff --git a/entry/src/main/cpp/camera_manager.cpp b/entry/src/main/cpp/camera_manager.cpp index fd4f4d2f6253f226f502cfc9ea615519da822f87..6a01822eff875746eaea07110cf89fd75344944f 100644 --- a/entry/src/main/cpp/camera_manager.cpp +++ b/entry/src/main/cpp/camera_manager.cpp @@ -352,6 +352,8 @@ Camera_ErrorCode NDKCamera::GetSupportedOutputCapability(void) { } Camera_ErrorCode NDKCamera::CreatePreviewOutput(void) { + cameraOutputCapability_->previewProfiles[0]->size.width = 640; + cameraOutputCapability_->previewProfiles[0]->size.height = 480; profile_ = cameraOutputCapability_->previewProfiles[0]; if (profile_ == nullptr) { OH_LOG_ERROR(LOG_APP, "Get previewProfiles failed."); @@ -383,6 +385,8 @@ Camera_ErrorCode NDKCamera::CreatePhotoOutput(char *photoSurfaceId) { } Camera_ErrorCode NDKCamera::CreateVideoOutput(char *videoId) { + cameraOutputCapability_->videoProfiles[0]->size.width = 640; + cameraOutputCapability_->videoProfiles[0]->size.height = 480; videoProfile_ = cameraOutputCapability_->videoProfiles[0]; if (videoProfile_ == nullptr) { @@ -644,6 +648,8 @@ Camera_ErrorCode NDKCamera::IsFocusPoint(float x, float y) { } int32_t NDKCamera::GetVideoFrameWidth(void) { + cameraOutputCapability_->videoProfiles[0]->size.width = 640; + cameraOutputCapability_->videoProfiles[0]->size.height = 480; videoProfile_ = cameraOutputCapability_->videoProfiles[0]; if (videoProfile_ == nullptr) { OH_LOG_ERROR(LOG_APP, "Get videoProfiles failed."); @@ -653,6 +659,8 @@ int32_t NDKCamera::GetVideoFrameWidth(void) { } int32_t NDKCamera::GetVideoFrameHeight(void) { + cameraOutputCapability_->videoProfiles[0]->size.width = 640; + cameraOutputCapability_->videoProfiles[0]->size.height = 480; videoProfile_ = cameraOutputCapability_->videoProfiles[0]; if (videoProfile_ == nullptr) { OH_LOG_ERROR(LOG_APP, "Get videoProfiles failed.");