diff --git a/entry/src/main/cpp/capbilities/VideoEncoder.cpp b/entry/src/main/cpp/capbilities/VideoEncoder.cpp index 2bd03828e2278cd5ab678d66e3dcfe68424a987a..6384c06e71874739464f5fa733011e6aeabb0a44 100644 --- a/entry/src/main/cpp/capbilities/VideoEncoder.cpp +++ b/entry/src/main/cpp/capbilities/VideoEncoder.cpp @@ -114,6 +114,7 @@ int32_t VideoEncoder::SetCallback(CodecUserData *codecUserData) { // Camera+AVCodec // [Start camera_AVCodec] +// [Start video_encoder_faq] int32_t VideoEncoder::Configure(const SampleInfo &sampleInfo) { // [StartExclude camera_AVCodec] OH_AVFormat *format = OH_AVFormat_Create(); @@ -135,6 +136,7 @@ int32_t VideoEncoder::Configure(const SampleInfo &sampleInfo) { OH_AVFormat_SetIntValue(format, OH_MD_KEY_TRANSFER_CHARACTERISTICS, sampleInfo.transfer); OH_AVFormat_SetIntValue(format, OH_MD_KEY_MATRIX_COEFFICIENTS, sampleInfo.matrix); } + // [StartExclude video_encoder_faq] // [StartExclude camera_AVCodec] AVCODEC_SAMPLE_LOGI("====== VideoEncoder config ======"); AVCODEC_SAMPLE_LOGI("%{public}d*%{public}d, %{public}.1ffps", sampleInfo.videoWidth, sampleInfo.videoHeight, @@ -143,6 +145,7 @@ int32_t VideoEncoder::Configure(const SampleInfo &sampleInfo) { AVCODEC_SAMPLE_LOGI("BitRate Mode: %{public}d, BitRate: %{public}" PRId64 "kbps", sampleInfo.bitrateMode, sampleInfo.bitrate / 1024); AVCODEC_SAMPLE_LOGI("====== VideoEncoder config ======"); + // [EndExclude video_encoder_faq] // [Start set_encoder] // Setting the Encoder @@ -154,6 +157,7 @@ int32_t VideoEncoder::Configure(const SampleInfo &sampleInfo) { return AVCODEC_SAMPLE_ERR_OK; // [EndExclude camera_AVCodec] } +// [End video_encoder_faq] // [End camera_AVCodec] int32_t VideoEncoder::GetSurface(SampleInfo &sampleInfo) {