• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 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 #ifndef AIHDR_ENHANCER_VIDEO_COMMON_H
16 #define AIHDR_ENHANCER_VIDEO_COMMON_H
17 namespace OHOS {
18 namespace Media {
19 namespace VideoProcessingEngine {
20 enum AihdrEnhancerBufferFlag : uint32_t {
21     AIHDR_ENHANCER_BUFFER_FLAG_NONE = 0,
22     /* This signals the end of stream */
23     AIHDR_ENHANCER_BUFFER_FLAG_EOS = 1 << 0,
24 };
25 
26 class __attribute__((visibility("default"))) AihdrEnhancerVideoCallback {
27 public:
28     virtual ~AihdrEnhancerVideoCallback() = default;
29     /* *
30      * Called when an error occurred.
31      *
32      * @param errorCode Error code.
33      * @since 5.0
34      */
35     virtual void OnError(int32_t errorCode) = 0;
36 
37     /* *
38      * Called when an state changed.
39      *
40      * @param state current state.
41      * @since 5.0
42      */
43     virtual void OnState(int32_t state) = 0;
44 
45     /* *
46      * Called when an output buffer becomes available.
47      *
48      * @param index The index of the available output buffer.
49      * @since 5.0
50      */
51     virtual void OnOutputBufferAvailable(uint32_t index, AihdrEnhancerBufferFlag flag) = 0;
52 };
53 } // namespace VideoProcessingEngine
54 } // namespace Media
55 } // namespace OHOS
56 #endif // AIHDR_ENHANCER_VIDEO_COMMON_H
57