1 /* 2 * Copyright (c) 2021 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_ISTREAM_REPEAT_CALLBACK_H 17 #define OHOS_CAMERA_ISTREAM_REPEAT_CALLBACK_H 18 19 #include <cstdint> 20 #include "iremote_broker.h" 21 22 namespace OHOS { 23 namespace CameraStandard { 24 enum class SketchStatus : int32_t { 25 STOPED = 0, 26 STARTED = 1, 27 STOPPING = 2, 28 STARTING = 3 29 }; 30 31 typedef struct { 32 SketchStatus status; 33 float sketchRatio; 34 } SketchStatusData; 35 36 class IStreamRepeatCallback : public IRemoteBroker { 37 public: 38 virtual int32_t OnFrameStarted() = 0; 39 40 virtual int32_t OnFrameEnded(int32_t frameCount) = 0; 41 42 virtual int32_t OnFrameError(int32_t errorCode) = 0; 43 44 virtual int32_t OnSketchStatusChanged(SketchStatus status) = 0; 45 46 DECLARE_INTERFACE_DESCRIPTOR(u"IStreamRepeatCallback"); 47 }; 48 } // namespace CameraStandard 49 } // namespace OHOS 50 #endif // OHOS_CAMERA_ISTREAM_REPEAT_CALLBACK_H 51