diff --git a/bundle.json b/bundle.json index c89001c4d7aafd1795574fcb81772b4c54460a96..0b60524f2bb618f85ac98fe5bf3da394b2559479 100644 --- a/bundle.json +++ b/bundle.json @@ -84,4 +84,4 @@ ] } } -} \ No newline at end of file +} diff --git a/services/screenclient/test/unittest/BUILD.gn b/services/screenclient/test/unittest/BUILD.gn index d00cb0892f00ec1c03a9b12747f28161cf7bb37b..4cdcf6b1debb2142dce05a514b8dd5e427b6d3fd 100644 --- a/services/screenclient/test/unittest/BUILD.gn +++ b/services/screenclient/test/unittest/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. +# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/services/screentransport/screensinkprocessor/decoder/src/image_sink_decoder.cpp b/services/screentransport/screensinkprocessor/decoder/src/image_sink_decoder.cpp index ea167bf7a6cbc4e809641be71a5554293adddb01..93a52ab52a5be3443dddaa2cd8ee19af331ae0d2 100644 --- a/services/screentransport/screensinkprocessor/decoder/src/image_sink_decoder.cpp +++ b/services/screentransport/screensinkprocessor/decoder/src/image_sink_decoder.cpp @@ -114,7 +114,7 @@ int32_t ImageSinkDecoder::InitVideoDecoder(const VideoParam &configParam) DHLOGI("%s: InitVideoDecoder.", LOG_TAG); switch (configParam.GetCodecType()) { case VIDEO_CODEC_TYPE_VIDEO_H264: - videoDecoder_ = Media::VideoDecoderFactory::CreateByName("OMX_hisi_video_decoder_avc"); + videoDecoder_ = Media::VideoDecoderFactory::CreateByMime("video/avc"); break; case VIDEO_CODEC_TYPE_VIDEO_H265: videoDecoder_ = Media::VideoDecoderFactory::CreateByMime("video/hevc"); diff --git a/services/screentransport/screensinkprocessor/src/image_sink_processor.cpp b/services/screentransport/screensinkprocessor/src/image_sink_processor.cpp index 6572255eae7598aac3b1a627a246b83105c6f62b..8f9af8fdc8cdb4d33be58c6f784d7b0fa90e48e7 100644 --- a/services/screentransport/screensinkprocessor/src/image_sink_processor.cpp +++ b/services/screentransport/screensinkprocessor/src/image_sink_processor.cpp @@ -54,7 +54,7 @@ int32_t ImageSinkProcessor::ReleaseImageProcessor() int32_t ret = imageDecoder_->ReleaseDecoder(); if (ret != DH_SUCCESS) { DHLOGE("%s: ReleaseDecoder failed.", LOG_TAG); - return ERR_DH_SCREEN_TRANS_ERROR; + return ret; } return DH_SUCCESS; diff --git a/services/screentransport/screensourceprocessor/encoder/src/image_source_encoder.cpp b/services/screentransport/screensourceprocessor/encoder/src/image_source_encoder.cpp index bfd1c630289ff2b2c201814dbaa397709d8e4cc0..229344ff1705360312f4cd72ce4d63cb454236d1 100644 --- a/services/screentransport/screensourceprocessor/encoder/src/image_source_encoder.cpp +++ b/services/screentransport/screensourceprocessor/encoder/src/image_source_encoder.cpp @@ -117,7 +117,7 @@ int32_t ImageSourceEncoder::InitVideoEncoder(const VideoParam &configParam) DHLOGI("%s: InitVideoEncoder.", LOG_TAG); switch (configParam.GetCodecType()) { case VIDEO_CODEC_TYPE_VIDEO_H264: - videoEncoder_ = Media::VideoEncoderFactory::CreateByName("OMX_hisi_video_encoder_avc"); + videoEncoder_ = Media::VideoEncoderFactory::CreateByMime("video/avc"); break; case VIDEO_CODEC_TYPE_VIDEO_H265: videoEncoder_ = Media::VideoEncoderFactory::CreateByMime("video/hevc"); diff --git a/services/screentransport/test/unittest/screensinkprocessor/src/image_sink_processor_test.cpp b/services/screentransport/test/unittest/screensinkprocessor/src/image_sink_processor_test.cpp index b8a246ead33be4e353cb560633c4964a5d31df11..fa8200b8f6ea87395e506afd0deab3c66539ba59 100644 --- a/services/screentransport/test/unittest/screensinkprocessor/src/image_sink_processor_test.cpp +++ b/services/screentransport/test/unittest/screensinkprocessor/src/image_sink_processor_test.cpp @@ -42,7 +42,7 @@ void ImageSinkProcessorTest::SetUp(void) processor_ = std::make_shared(); imageListener_ = std::make_shared(); processor_->imageDecoder_ = std::make_shared(imageListener_); - processor_->imageDecoder_->videoDecoder_ = Media::VideoDecoderFactory::CreateByName("OMX_hisi_video_decoder_avc"); + processor_->imageDecoder_->videoDecoder_ = Media::VideoEncoderFactory::CreateByMime("video/avc"); } void ImageSinkProcessorTest::TearDown(void) {}