• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2022 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 #ifndef OHOS_CAMERA_ICAMERA_SERVICE_H
17 #define OHOS_CAMERA_ICAMERA_SERVICE_H
18 
19 #include "camera_metadata_info.h"
20 #include "icamera_service_callback.h"
21 #include "icamera_device_service.h"
22 #include "icapture_session.h"
23 #include "iremote_broker.h"
24 #include "istream_capture.h"
25 #include "istream_repeat.h"
26 #include "surface.h"
27 
28 namespace OHOS {
29 namespace CameraStandard {
30 class ICameraService : public IRemoteBroker {
31 public:
32     virtual int32_t CreateCameraDevice(std::string cameraId, sptr<ICameraDeviceService>& device) = 0;
33 
34     virtual int32_t SetCallback(sptr<ICameraServiceCallback>& callback) = 0;
35 
36     virtual int32_t GetCameras(std::vector<std::string> &cameraIds,
37         std::vector<std::shared_ptr<Camera::CameraMetadata>> &cameraAbilityList) = 0;
38 
39     virtual int32_t CreateCaptureSession(sptr<ICaptureSession> &session) = 0;
40 
41     virtual int32_t CreatePhotoOutput(const sptr<OHOS::IBufferProducer> &producer, int32_t format,
42                                       sptr<IStreamCapture> &photoOutput) = 0;
43 
44     virtual int32_t CreatePreviewOutput(const sptr<OHOS::IBufferProducer> &producer, int32_t format,
45                                         sptr<IStreamRepeat> &previewOutput) = 0;
46 
47     virtual int32_t CreateCustomPreviewOutput(const sptr<OHOS::IBufferProducer> &producer, int32_t format,
48                                               int32_t width, int32_t height, sptr<IStreamRepeat> &previewOutput) = 0;
49 
50     virtual int32_t CreateVideoOutput(const sptr<OHOS::IBufferProducer> &producer, int32_t format,
51                                       sptr<IStreamRepeat> &videoOutput) = 0;
52 
53     virtual int32_t SetListenerObject(const sptr<IRemoteObject> &object) = 0;
54 
55     DECLARE_INTERFACE_DESCRIPTOR(u"ICameraService");
56 };
57 } // namespace CameraStandard
58 } // namespace OHOS
59 #endif // OHOS_CAMERA_ICAMERA_SERVICE_H
60