Skip to content

Commit

Permalink
Enable the low latency option for video decoding on the OHOS platform. (
Browse files Browse the repository at this point in the history
#2616)

(cherry picked from commit 504de7f)
  • Loading branch information
kevingpqi123 committed Dec 9, 2024
1 parent 589e061 commit fd20a70
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/platform/ohos/OHOSVideoDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ bool OHOSVideoDecoder::initDecoder(const OH_AVCodecCategory avCodecCategory) {
OH_AVFormat* ohFormat = OH_AVFormat_Create();
OH_AVFormat_SetIntValue(ohFormat, OH_MD_KEY_WIDTH, videoFormat.width);
OH_AVFormat_SetIntValue(ohFormat, OH_MD_KEY_HEIGHT, videoFormat.height);
OH_AVFormat_SetIntValue(ohFormat, OH_MD_KEY_VIDEO_ENABLE_LOW_LATENCY, 1);
OH_AVFormat_SetIntValue(ohFormat, OH_MD_KEY_PIXEL_FORMAT, AV_PIXEL_FORMAT_NV12);
ret = OH_VideoDecoder_Configure(videoCodec, ohFormat);
OH_AVFormat_Destroy(ohFormat);
Expand Down

0 comments on commit fd20a70

Please sign in to comment.