!47 【修改说明】CodecBase中存在非通用函数,修改纯虚函数

Merge pull request !47 from hongran1206/develop_test_zhr
This commit is contained in:
hongran1206 2023-04-25 06:24:49 +00:00 committed by Gitee
commit bb46c37382
9 changed files with 88 additions and 19 deletions

View File

@ -23,7 +23,8 @@
| | |---sa_avcodec # avcodec主进程C/S框架
| | |---common # 服务公用资源
| |---engine # 引擎实现
| | |---include # base头文件
| | |---base # 内部接口base文件
| | | |---include # base头文件
| | |---common # 引擎公用资源
| | |---factory # 引擎工厂实现
| | |---codeclist # 编解码能力查询引擎
@ -31,7 +32,7 @@
| | |---muxer # 封装引擎
| | |---demuxer # 解封装引擎
| | |---plugin # 插件
| | | |---inferfaces # 插件接口
| | | |---interfaces # 插件接口
| | | |---core # 插件框架
| | | |---plugins # 插件实现
| | | | |---codec # 编解码插件

View File

@ -18,6 +18,7 @@ declare_args() {
multimedia_av_codec_support_demuxer = false
multimedia_av_codec_support_muxer = true
multimedia_av_codec_support_ffmpeg_demuxer = false
multimedia_av_codec_support_test = false
}
av_codec_defines = []

View File

@ -57,9 +57,11 @@ config("av_codec_packege_include") {
"//foundation/multimedia/av_codec/services/services/codec/client",
"//foundation/multimedia/av_codec/services/services/codec/ipc",
"//foundation/multimedia/av_codec/services/services/codec/server",
"//foundation/multimedia/av_codec/services/services/codecbase/",
"//foundation/multimedia/av_codec/services/services/codecbase/server/",
"//foundation/multimedia/av_codec/services/services/codecbase/server/include/",
# "//foundation/multimedia/av_codec/services/services/codecbase/",
# "//foundation/multimedia/av_codec/services/services/codecbase/server/",
# "//foundation/multimedia/av_codec/services/services/codecbase/server/include/",
"//foundation/multimedia/av_codec/services/engine/base/",
"//foundation/multimedia/av_codec/services/engine/base/include/",
"//foundation/multimedia/av_codec/services/services/common/",
"//foundation/multimedia/av_codec/services/services/demuxer/",
"//foundation/multimedia/av_codec/services/services/demuxer/client/",
@ -78,9 +80,9 @@ config("av_codec_packege_include") {
"//foundation/multimedia/av_codec/services/services/source/client/",
"//foundation/multimedia/av_codec/services/services/source/ipc/",
"//foundation/multimedia/av_codec/services/services/source/server/",
"//foundation/multimedia/av_codec/services/services/sourcebase/",
"//foundation/multimedia/av_codec/services/services/sourcebase/server/",
"//foundation/multimedia/av_codec/services/services/sourcebase/server/include/",
# "//foundation/multimedia/av_codec/services/services/sourcebase/",
# "//foundation/multimedia/av_codec/services/services/sourcebase/server/",
# "//foundation/multimedia/av_codec/services/services/sourcebase/server/include/",
"//foundation/multimedia/av_codec/services/utils/",
"//foundation/multimedia/av_codec/services/utils/include/",
]

View File

@ -78,9 +78,11 @@ config("av_codec_capi_config") {
"//foundation/multimedia/av_codec/services/services/codec/client",
"//foundation/multimedia/av_codec/services/services/codec/ipc",
"//foundation/multimedia/av_codec/services/services/codec/server",
"//foundation/multimedia/av_codec/services/services/codecbase/",
"//foundation/multimedia/av_codec/services/services/codecbase/server/",
"//foundation/multimedia/av_codec/services/services/codecbase/server/include/",
# "//foundation/multimedia/av_codec/services/services/codecbase/",
# "//foundation/multimedia/av_codec/services/services/codecbase/server/",
# "//foundation/multimedia/av_codec/services/services/codecbase/server/include/",
"//foundation/multimedia/av_codec/services/engine/base/",
"//foundation/multimedia/av_codec/services/engine/base/include/",
"//foundation/multimedia/av_codec/services/services/common/",
"//foundation/multimedia/av_codec/services/services/demuxer/",
"//foundation/multimedia/av_codec/services/services/demuxer/client/",

View File

@ -0,0 +1,59 @@
/*
* Copyright (C) 2023 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "codecbase.h"
#include "avcodec_log.h"
namespace {
constexpr OHOS::HiviewDFX::HiLogLabel LABEL = {LOG_CORE, LOG_DOMAIN, "CodecBase"}
}
namespace OHOS {
namespace Media {
int32_t CodecBase::NotifyEos()
{
AVCODEC_LOGW("NotifyEos is not supported");
return 0;
}
sptr<Surface> CodecBase::CreateInputSurface()
{
AVCODEC_LOGW("CreateInputSurface is not supported");
return nullptr;
}
int32_t CodecBase::SetOutputSurface(sptr<Surface> surface)
{
(void)surface;
AVCODEC_LOGW("SetOutputSurface is not supported");
return 0;
}
int32_t CodecBase::RenderOutputBuffer(size_t index)
{
(void)index;
AVCODEC_LOGW("RenderOutputBuffer is not supported");
return 0;
}
int32_t CodecBase::SignalRequestIDRFrame()
{
AVCODEC_LOGW("SignalRequestIDRFrame is not supported");
return 0;
}
} // namespace Media
} // namespace OHOS

View File

@ -36,17 +36,18 @@ public:
virtual int32_t Flush() = 0;
virtual int32_t Reset() = 0;
virtual int32_t Release() = 0;
virtual int32_t NotifyEos() = 0;
virtual int32_t SetParameter(const Format& format) = 0;
virtual int32_t GetOutputFormat(Format& format) = 0;
virtual sptr<Surface> CreateInputSurface() = 0;
virtual int32_t SetOutputSurface(sptr<Surface> surface) = 0;
virtual std::shared_ptr<AVSharedMemory> GetInputBuffer(size_t index) = 0;
virtual int32_t QueueInputBuffer(size_t index, const AVCodecBufferInfo& info, AVCodecBufferFlag& flag) = 0;
virtual std::shared_ptr<AVSharedMemory> GetOutputBuffer(size_t index) = 0;
virtual int32_t RenderOutputBuffer(size_t index) = 0;
virtual int32_t ReleaseOutputBuffer(size_t index) = 0;
virtual int32_t SignalRequestIDRFrame() = 0;
int32_t NotifyEos();
sptr<Surface> CreateInputSurface();
int32_t SetOutputSurface(sptr<Surface> surface);
int32_t RenderOutputBuffer(size_t index);
int32_t SignalRequestIDRFrame();
};
} // namespace Media
} // namespace OHOS

View File

@ -95,9 +95,11 @@ config("av_codec_service_config") {
"//foundation/multimedia/av_codec/services/services/codec/client",
"//foundation/multimedia/av_codec/services/services/codec/ipc",
"//foundation/multimedia/av_codec/services/services/codec/server",
"//foundation/multimedia/av_codec/services/services/codecbase/",
"//foundation/multimedia/av_codec/services/services/codecbase/server/",
"//foundation/multimedia/av_codec/services/services/codecbase/server/include/",
# "//foundation/multimedia/av_codec/services/services/codecbase/",
# "//foundation/multimedia/av_codec/services/services/codecbase/server/",
# "//foundation/multimedia/av_codec/services/services/codecbase/server/include/",
"//foundation/multimedia/av_codec/services/engine/base/",
"//foundation/multimedia/av_codec/services/engine/base/include/",
"//foundation/multimedia/av_codec/services/services/common/",
"//foundation/multimedia/av_codec/services/services/demuxer/",
"//foundation/multimedia/av_codec/services/services/demuxer/client/",
@ -161,6 +163,7 @@ ohos_shared_library("av_codec_service") {
"codec/ipc/codec_listener_proxy.cpp",
"codec/ipc/codec_service_stub.cpp",
"codec/server/codec_server.cpp",
"$AV_CODEC_ROOT_DIR/services/engine/base/codecbase.cpp",
]
}
if (multimedia_av_codec_support_codeclist) {