• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include "avcodec_log.h"
17 #include "codecbase.h"
18 
19 namespace {
20 constexpr OHOS::HiviewDFX::HiLogLabel LABEL = {LOG_CORE, LOG_DOMAIN, "CodecBase"};
21 }
22 
23 namespace OHOS {
24 namespace MediaAVCodec {
SetCallback(const std::shared_ptr<AVCodecCallback> & callback)25 int32_t CodecBase::SetCallback(const std::shared_ptr<AVCodecCallback> &callback)
26 {
27     (void)callback;
28     AVCODEC_LOGD("SetCallback of AVCodecCallback is not supported");
29     return 0;
30 }
SetCallback(const std::shared_ptr<MediaCodecCallback> & callback)31 int32_t CodecBase::SetCallback(const std::shared_ptr<MediaCodecCallback> &callback)
32 {
33     (void)callback;
34     AVCODEC_LOGD("SetCallback of MediaCodecCallback is not supported");
35     return 0;
36 }
37 
QueueInputBuffer(uint32_t index,const AVCodecBufferInfo & info,AVCodecBufferFlag flag)38 int32_t CodecBase::QueueInputBuffer(uint32_t index, const AVCodecBufferInfo &info, AVCodecBufferFlag flag)
39 {
40     (void)index;
41     (void)info;
42     (void)flag;
43     AVCODEC_LOGD("QueueInputBuffer of AVSharedMemory is not supported");
44     return 0;
45 }
46 
QueueInputBuffer(uint32_t index)47 int32_t CodecBase::QueueInputBuffer(uint32_t index)
48 {
49     (void)index;
50     AVCODEC_LOGD("QueueInputBuffer of AVBuffer is not supported");
51     return 0;
52 }
53 
NotifyEos()54 int32_t CodecBase::NotifyEos()
55 {
56     AVCODEC_LOGW("NotifyEos is not supported");
57     return 0;
58 }
59 
CreateInputSurface()60 sptr<Surface> CodecBase::CreateInputSurface()
61 {
62     AVCODEC_LOGW("CreateInputSurface is not supported");
63     return nullptr;
64 }
65 
SetInputSurface(sptr<Surface> surface)66 int32_t CodecBase::SetInputSurface(sptr<Surface> surface)
67 {
68     (void)surface;
69     AVCODEC_LOGW("SetInputSurface is not supported");
70     return 0;
71 }
72 
SetOutputSurface(sptr<Surface> surface)73 int32_t CodecBase::SetOutputSurface(sptr<Surface> surface)
74 {
75     (void)surface;
76     AVCODEC_LOGW("SetOutputSurface is not supported");
77     return 0;
78 }
79 
RenderOutputBuffer(uint32_t index)80 int32_t CodecBase::RenderOutputBuffer(uint32_t index)
81 {
82     (void)index;
83     AVCODEC_LOGW("RenderOutputBuffer is not supported");
84     return 0;
85 }
86 
SignalRequestIDRFrame()87 int32_t CodecBase::SignalRequestIDRFrame()
88 {
89     AVCODEC_LOGW("SignalRequestIDRFrame is not supported");
90     return 0;
91 }
92 
GetInputFormat(Format & format)93 int32_t CodecBase::GetInputFormat(Format& format)
94 {
95     (void)format;
96     AVCODEC_LOGW("GetInputFormat is not supported");
97     return 0;
98 }
99 } // namespace MediaAVCodec
100 } // namespace OHOS
101