xref: /OK3568_Linux_fs/external/rockit/tgi/sdk/include/RTGraphCommon.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Copyright 2020 Rockchip Electronics Co. LTD
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * author: modified by <rimon.xu@rock-chips.com>
17  *   date: 2020-12-12
18  */
19 
20 #ifndef SRC_RT_TASK_TASK_GRAPH_COMMON_H_
21 #define SRC_RT_TASK_TASK_GRAPH_COMMON_H_
22 
23 typedef INT64  RTCBHandle;
24 typedef INT64  RTLinkHandle;
25 
26 #define RT_INVALID_CB_HANDLE    -1
27 #define RT_INVALID_LINK_HANDLE  -1
28 #define RT_INVALID_STREAM_ID    -1
29 #define RT_INVALID_NODE_ID      -1
30 
31 typedef enum GraphIOStreamMode {
32     // Blocks and waits until none of the affected streams
33     // are full. Note that if max_queue_size is set to -1, the packet will be
34     // added regardless of queue size.
35     WAIT_TILL_NOT_FULL,
36     // Returns and does not add packet if any affected input
37     // stream is full.
38     ADD_IF_NOT_FULL,
39     // drop packet when streams are full
40     DROP_IF_FULL,
41 } RTGraphIOStreamMode;
42 
43 
44 #endif  // SRC_RT_TASK_TASK_GRAPH_COMMON_H_
45