• 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 "ohos_adapter/bridge/ark_camera_surface_buffer_adapter_wrapper.h"
17 
18 namespace OHOS::ArkWeb {
19 
ArkCameraSurfaceBufferAdapterWrapper(ArkWebRefPtr<ArkCameraSurfaceBufferAdapter> ref)20 ArkCameraSurfaceBufferAdapterWrapper::ArkCameraSurfaceBufferAdapterWrapper(
21     ArkWebRefPtr<ArkCameraSurfaceBufferAdapter> ref)
22     : ctocpp_(ref)
23 {}
24 
GetFileDescriptor()25 int32_t ArkCameraSurfaceBufferAdapterWrapper::GetFileDescriptor()
26 {
27     return ctocpp_->GetFileDescriptor();
28 }
29 
GetWidth()30 int32_t ArkCameraSurfaceBufferAdapterWrapper::GetWidth()
31 {
32     return ctocpp_->GetWidth();
33 }
34 
GetHeight()35 int32_t ArkCameraSurfaceBufferAdapterWrapper::GetHeight()
36 {
37     return ctocpp_->GetHeight();
38 }
39 
GetStride()40 int32_t ArkCameraSurfaceBufferAdapterWrapper::GetStride()
41 {
42     return ctocpp_->GetStride();
43 }
44 
GetFormat()45 int32_t ArkCameraSurfaceBufferAdapterWrapper::GetFormat()
46 {
47     return ctocpp_->GetFormat();
48 }
49 
GetSize()50 uint32_t ArkCameraSurfaceBufferAdapterWrapper::GetSize()
51 {
52     return ctocpp_->GetSize();
53 }
54 
GetBufferAddr()55 uint8_t* ArkCameraSurfaceBufferAdapterWrapper::GetBufferAddr()
56 {
57     return ctocpp_->GetBufferAddr();
58 }
59 
60 } // namespace OHOS::ArkWeb
61