• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 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_CAMERA_MANAGER_FOR_SYS_H
17 #define OHOS_CAMERA_CAMERA_MANAGER_FOR_SYS_H
18 
19 #include <mutex>
20 #include <refbase.h>
21 
22 #include "output/depth_data_output.h"
23 #include "session/capture_session_for_sys.h"
24 namespace OHOS {
25 namespace CameraStandard {
26 
27 class CameraManagerForSys : public RefBase {
28 public:
29     virtual ~CameraManagerForSys();
30     static sptr<CameraManagerForSys>& GetInstance();
31 
32     sptr<CaptureSessionForSys> CreateCaptureSessionForSysImpl(SceneMode mode, sptr<ICaptureSession> session);
33     sptr<CaptureSessionForSys> CreateCaptureSessionForSys(SceneMode mode);
34     int32_t CreateCaptureSessionForSys(sptr<CaptureSessionForSys>& pCaptureSession, SceneMode mode);
35     int CreateDepthDataOutput(DepthProfile& depthProfile, sptr<IBufferProducer> &surface,
36                               sptr<DepthDataOutput>* pDepthDataOutput);
37 
38 private:
39     explicit CameraManagerForSys();
40     static sptr<CameraManagerForSys> g_cameraManagerForSys;
41     static std::mutex g_sysInstanceMutex;
42 };
43 } // namespace CameraStandard
44 } // namespace OHOS
45 #endif // OHOS_CAMERA_CAMERA_MANAGER_FOR_SYS_H