• 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_ICAPTURE_SESSION_H
17 #define OHOS_CAMERA_ICAPTURE_SESSION_H
18 
19 #include "icamera_device_service.h"
20 #include "icapture_session_callback.h"
21 #include "iremote_broker.h"
22 #include "istream_repeat.h"
23 #include "istream_capture.h"
24 
25 namespace OHOS {
26 namespace CameraStandard {
27 class ICaptureSession : public IRemoteBroker {
28 public:
29     virtual int32_t BeginConfig() = 0;
30 
31     virtual int32_t AddInput(sptr<ICameraDeviceService> cameraDevice) = 0;
32 
33     virtual int32_t AddOutput(sptr<IStreamRepeat> streamRepeat) = 0;
34 
35     virtual int32_t AddOutput(sptr<IStreamCapture> streamCapture) = 0;
36 
37     virtual int32_t RemoveInput(sptr<ICameraDeviceService> cameraDevice) = 0;
38 
39     virtual int32_t RemoveOutput(sptr<IStreamCapture> streamCapture) = 0;
40 
41     virtual int32_t RemoveOutput(sptr<IStreamRepeat> streamRepeat) = 0;
42 
43     virtual int32_t CommitConfig() = 0;
44 
45     virtual int32_t Start() = 0;
46 
47     virtual int32_t Stop() = 0;
48 
49     virtual int32_t Release(pid_t pid) = 0;
50 
51     virtual int32_t SetCallback(sptr<ICaptureSessionCallback> &callback) = 0;
52 
53     DECLARE_INTERFACE_DESCRIPTOR(u"ICaptureSession");
54 };
55 } // namespace CameraStandard
56 } // namespace OHOS
57 #endif // OHOS_CAMERA_ICAPTURE_SESSION_H
58