• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 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 FILLP_TYPES_H
17 #define FILLP_TYPES_H
18 
19 #ifdef FILLP_LINUX
20 
21 #ifndef _GNU_SOURCE
22 #define _GNU_SOURCE
23 #endif
24 
25 #ifdef FILLP_MAC
26 #include <mach/task.h>
27 #include <mach/semaphore.h>
28 #endif
29 
30 #if !defined(FILLP_LW_LITEOS)
31 #ifndef __USE_GNU
32 #define __USE_GNU
33 #endif
34 #endif
35 
36 #include <stdint.h>
37 #include <stdlib.h>
38 #include <stdio.h>
39 #include <sys/ioctl.h>
40 #include <fcntl.h>
41 #include <string.h>
42 #include <pthread.h>
43 
44 #ifndef FILLP_MAC
45 #include <sys/prctl.h>
46 #endif
47 #include <sched.h>
48 #include <unistd.h>
49 #include <sys/time.h>
50 #if !defined(FILLP_LW_LITEOS)
51 #include <sys/socket.h>
52 #include <sys/mman.h>
53 #include <netinet/in.h>
54 #include <arpa/inet.h>
55 #include <math.h>
56 #include <sys/types.h>
57 #include <net/if.h>
58 #include <sys/syscall.h>
59 #else
60 #include "lwip/sockets.h"
61 #endif
62 
63 #if !defined(FILLP_LW_LITEOS) && !defined(FILLP_MAC)
64 #include <sys/epoll.h>
65 #endif
66 
67 #define FILLP_STDCALL
68 #define DLL_API __attribute__ ((visibility ("default")))
69 #else
70 #include <WinSock2.h>
71 #include <windows.h>
72 #include <WinBase.h>
73 #include <Ws2tcpip.h>
74 #include <stdlib.h>
75 #include <string.h>
76 #include <process.h>
77 #include <windows.h>
78 #include <math.h>
79 #include <tchar.h>
80 #include <stdio.h>
81 #include <stdlib.h>
82 #pragma comment(lib, "WS2_32")
83 #ifdef DLL_SUPPORT
84 #ifdef DLL_IMPLEMENT
85 #define DLL_API __declspec(dllexport)
86 #else
87 #define DLL_API __declspec(dllimport)
88 #endif
89 #else
90 #define DLL_API
91 #endif
92 
93 #define FILLP_STDCALL __stdcall
94 
95 #ifndef _WINDOWS
96 #ifdef _WIN32
97 #define _WINDOWS
98 #else
99 
100 #ifdef _WIN64
101 #define _WINDOWS
102 #endif
103 #endif
104 #endif
105 #endif
106 
107 #ifdef __cplusplus
108 #define FILLP_NULL_PTR 0
109 #else
110 #define FILLP_NULL_PTR ((void*)0)
111 #endif /* __cplusplus */
112 
113 #ifdef __cplusplus
114 extern "C" {
115 #endif
116 
117 typedef char FILLP_CHAR;
118 typedef unsigned char FILLP_UCHAR;
119 typedef signed char FILLP_INT8;
120 typedef unsigned char FILLP_UINT8;
121 typedef unsigned short FILLP_UINT16;
122 typedef signed short FILLP_INT16;
123 typedef unsigned char FILLP_BOOL;
124 typedef unsigned int FILLP_UINT;
125 typedef signed int FILLP_INT;
126 typedef unsigned long long FILLP_ULLONG;
127 typedef long long FILLP_LLONG;
128 typedef signed long FILLP_SLONG;
129 typedef unsigned long FILLP_ULONG;
130 typedef signed int FILLP_INT32;
131 typedef unsigned int FILLP_UINT32;
132 
133 typedef FILLP_INT FillpErrorType;
134 typedef unsigned long DWORD;
135 
136 #define FILLP_INVALID_UINT32 0xFFFFFFFF
137 #define FILLP_INVALID_INT 0x7FFFFFFF
138 #define FILLP_MAX_UNSHORT_VAL 0xFFFF /* max value of unsinged short */
139 #define FILLP_FALSE 0
140 #define FILLP_TRUE 1
141 #define FILLP_SUCCESS 0
142 #define FILLP_FAILURE 1
143 #define FILLP_CONST const
144 #define IO   /* Input and Out param */
145 #define IN   /* Input param */
146 #define OUT  /* Output param */
147 
148 #ifndef FILLP_FIONBIO
149 #define FILLP_FIONBIO 1 /* Set/Unset socket non-blocking */
150 #endif
151 
152 #define FILLP_UNUSED_PARA(para) (void)(para)
153 
154 /* higher value kept so that it should not clash with linux header files */
155 #define IPPROTO_FILLP 512
156 
157 /* cmsg type used in FtSendFrame */
158 #define FILLP_CMSG_TYPE_FRAME 0x1
159 
160 /* fillp socket options */
161 #define FILLP_PKT_DATA_OPTS_TIMESTAMP 0x01
162 #define FILLP_SOCK_SEND_CACHE_INFO 0x2
163 #define FILLP_SOCK_FC_ALG 0x03
164 #define FILLP_SOCK_DIRECTLY_SEND 0x4
165 #define FILLP_SOCK_BW_DET_ALGO 0x5
166 #define FILLP_SOCK_BW_DET_PARAMS 0x6
167 #define FILLP_SOCK_CQE_ALGO 0x7
168 #define FILLP_SOCK_CQE_PARAMS 0x8
169 #define FILLP_SOCK_MIRACAST_VIDEO_PARAMS 0x9
170 #define FILLP_SEMI_RELIABLE 0xa
171 
172 #define FILLP_IPV6_ADDR_LEN 4
173 
174 #define FILLP_ALG_BASE 0
175 #define FILLP_ALG_ONE 1
176 #define FILLP_ALG_TWO 2
177 #define FILLP_ALG_THREE 3
178 #define FILLP_ALG_MSG 4
179 
180 /* define character bit */
181 #define FILLP_SUPPORT_PACK_WITH_HRBB 0X01 /* send head receiving buffer bubble in pack packet */
182 #define FILLP_SUPPORT_PACK_WITH_PKT_IVAR 0X02
183 
184 /* Valid opcodes to issue to sys_epoll_ctl() */
185 #define SPUNGE_EPOLL_CTL_ADD 1
186 #define SPUNGE_EPOLL_CTL_DEL 2
187 #define SPUNGE_EPOLL_CTL_MOD 3
188 
189 /* Dbg ID for all files */
190 #define  FILLP_DEBUG_ID_ALL                 0xFFFFFFFFFFFFFFFF  /* To enable logs for all the modules */
191 
192 /**
193  * @defgroup FillpDebugCmdEn
194  * @ingroup Enums
195  * @par Prototype
196  *
197  * @datastruct SPUNGE_SHUT_RD Denotes the read close of the socket.
198  * However can continue to send data from peer socket
199  * @datastruct SPUNGE_SHUT_WR Denotes the write close of the socket.
200  * However can continue to receive data from peer socket
201  * @datastruct SPUNGE_SHUT_RDWR Denotes the read and write close of the socket. Equivalent to RST of TCP
202  */
203 enum SpungeSockShutdownCmd {
204     SPUNGE_SHUT_RD,
205     SPUNGE_SHUT_WR,
206     SPUNGE_SHUT_RDWR,
207 };
208 
209 /**
210  * @defgroup CommonMacros
211  * @ingroup Macros
212  * @par Prototype
213  */
214 #if defined(FILLP_LINUX)
215 #define SPUNGE_EPOLLIN    EPOLLIN    /* The associated file is available for read(2) operations. */
216 #define SPUNGE_EPOLLOUT   EPOLLOUT   /* The associated file is available for write(2) operations. */
217 #define SPUNGE_EPOLLERR   EPOLLERR   /* Error condition happened on the associat */
218 #define SPUNGE_EPOLLET    EPOLLET    /* Edge trigger support */
219 #define SPUNGE_EPOLLHUP   EPOLLHUP   /* Hang up happened on the associated socket */
220 #define SPUNGE_EPOLLRDHUP EPOLLRDHUP /* Peer closed */
221 #else
222 #define SPUNGE_EPOLLIN    0x0001    /* The associated file is available for read(2) operations. */
223 #define SPUNGE_EPOLLOUT   0x0004    /* The associated file is available for write(2) operations. */
224 #define SPUNGE_EPOLLERR   0x0008    /* Error condition happened on the associat */
225 #define SPUNGE_EPOLLET    (1u << 31) /* Edge trigger support */
226 #define SPUNGE_EPOLLHUP   0x0010    /* Hang up happened on the associated socket */
227 #define SPUNGE_EPOLLRDHUP 0x2000    /* Peer closed */
228 #endif
229 
230 #if defined(FILLP_LINUX) && !defined(FILLP_MAC)
231 #pragma pack(push, 4)
232 #else
233 #pragma pack(push, 8)
234 #endif
235 
236 /**
237  * Indicates spunge epoll data.
238  */
239 union SpungeEpollData {
240     void *ptr; /* Indicates a pointer to the epoll data. */
241     FILLP_INT fd; /* Indicates the file descriptor. */
242     FILLP_UINT32 u32; /* Indicates 32-bit data. */
243     FILLP_ULLONG u64; /* Indicates 64-bit data. */
244 };
245 
246 /**
247  * Provides spunge epoll event data.
248  */
249 struct SpungeEpollEvent {
250     FILLP_UINT32 events; /* Indicates Epoll events. */
251     union SpungeEpollData data; /* Indicates the user data variable. */
252 };
253 #pragma pack(pop)
254 
255 /**
256  * @defgroup e Error Codes
257  * @ingroup Macros
258  * @par Marcos
259  */
260 #if !defined(FILLP_LW_LITEOS)
261 #define ERR_OK 0
262 #endif
263 #define FILLP_OK ERR_OK
264 #define FILLP_NULL 0
265 #define ERR_NULLPTR (-1) /* NULL Point Error */
266 #define ERR_NOBUFS (-2) /* No buf/item to malloc */
267 #define FILLP_ERR_CONN (-3) /* connection err */
268 #define ERR_PARAM (-4) /* EINVAL */
269 #define ERR_NORES (-5) /* No resource */
270 #define ERR_FAILURE (-7) /* general sem init failures and socket init failures */
271 #define ERR_FEATURE_MACRO_NOT_ENABLED (-10)
272 #define FILLP_ERR_VAL (-13)
273 #define ERR_CONNREFUSED (-14)
274 #define ERR_NO_SOCK (-200)
275 #define ERR_NO_REBIND (-201)
276 #define ERR_EAGAIN (-205)
277 #define ERR_NO_SYS_SOCK (-207)
278 #define FILLP_ERR_ISCONN (-208)
279 #define FILLP_ERR_EALREADY (-209)
280 #define ERR_CONN_TIMEOUT (-300)
281 #define ERR_ADP_SYS_CALLBACK_NOT_REGISTERED (-303)
282 #define ERR_SOCK_TYPE_ERR (-306)
283 #define ERR_SYSTEM_MEMORY_FAILURE (-308)
284 #define ERR_STACK_ALREADY_INITIALD (-402)
285 #define ERR_UNDERCLOSURE (-500) /* ft socket is already under closure */
286 #define ERR_WRONGSTATE (-501) /* api is invoked in wrong connection state */
287 #define ERR_NONBLOCK_UNDERCONNECT (-503)
288 #define ERR_EINPROGRESS (-504)
289 #define ERR_FT_SOCKET_INVALID (-506)
290 #define ERR_TRACE_OBJ_TYPE_INVALID (-507)
291 #define ERR_STACK_NOT_INITED (-518) /* Stack is not in ACTIVE state */
292 #define ERR_HMAC_SHA2_DIGEST_MISMATCH (-519)
293 #define ERR_STALE_COOKIE_ERROR (-520)
294 #define ERR_COOKIE_PORT_MISMATCH (-521)
295 #define ERR_REMOTE_REJECT_OR_CLOSE (-522)
296 #define ERR_NON_FATAL (-523)
297 #define ERR_REMOTE_REJECT_VERSION (-524)
298 #define ERR_COMM (-1000) /* general error */
299 #define ERR_SOCK_BIND (-1001) /* bind failed */
300 #ifdef FILLP_WIN32
301 #ifndef ERROR_WAS_LOCKED
302 /* WinError.h: 717717 (0x2CD) {Page Locked} One of the pages to lock was already locked */
303 #define ERROR_WAS_LOCKED 0x2CD
304 #endif /* #ifndef ERROR_WAS_LOCKED */
305 #endif /* #ifdef FILLP_WIN32 */
306 
307 #ifdef FILLP_LINUX
308 #define FILLP_EAGAIN           EAGAIN
309 #define FILLP_EWOULDBLOCK      FILLP_EAGAIN
310 #define FILLP_EINPROGRESS      EINPROGRESS
311 #define FILLP_EINVAL           EINVAL
312 #define FILLP_EBADF            EBADF
313 #define FILLP_ENOMEM           ENOMEM
314 #define FILLP_EPIPE            EPIPE
315 #define FILLP_EFAULT           EFAULT
316 #define FILLP_ENOTCONN         ENOTCONN
317 #define FILLP_ECONNRESET       ECONNRESET
318 #define FILLP_ENODATA          ENODATA
319 #define FILLP_ENOBUFS          ENOBUFS
320 #define FILLP_ETIMEDOUT        ETIMEDOUT
321 #define FILLP_ECONNREFUSED     ECONNREFUSED
322 #define FILLP_EPROTOTYPE       EPROTOTYPE
323 #define FILLP_ENOPROTOOPT      ENOPROTOOPT
324 #define FILLP_EPROTONOSUPPORT  EPROTONOSUPPORT
325 #define FILLP_ESOCKTNOSUPPORT  ESOCKTNOSUPPORT
326 #define FILLP_EOPNOTSUPP       EOPNOTSUPP
327 #define FILLP_EPFNOSUPPORT     EPFNOSUPPORT
328 #define FILLP_EAFNOSUPPORT     EAFNOSUPPORT
329 #define FILLP_EADDRINUSE       EADDRINUSE
330 #define FILLP_EBUSY            EBUSY
331 #define FILLP_ENOTSOCK         ENOTSOCK
332 #define FILLP_EISCONN          EISCONN
333 #define FILLP_ENOENT           ENOENT
334 #define FILLP_EEXIST           EEXIST
335 #define FILLP_EMFILE           EMFILE
336 #define FILLP_EALREADY         EALREADY
337 
338 #elif defined(FILLP_WIN32)
339 #define FILLP_EAGAIN           WSAEWOULDBLOCK
340 #define FILLP_EWOULDBLOCK      FILLP_EAGAIN
341 #define FILLP_EINPROGRESS      WSAEINPROGRESS
342 #define FILLP_EINVAL           WSAEINVAL
343 #define FILLP_EBADF            WSAEBADF
344 #define FILLP_ENOMEM           WSA_NOT_ENOUGH_MEMORY
345 #define FILLP_EPIPE            WSAENOTCONN
346 #define FILLP_EFAULT           WSAEFAULT
347 #define FILLP_ENOTCONN         WSAENOTCONN
348 #define FILLP_ECONNRESET       WSAECONNRESET
349 #define FILLP_ENODATA          WSAENOMORE
350 #define FILLP_ENOBUFS          WSAENOBUFS
351 #define FILLP_ETIMEDOUT        WSAETIMEDOUT
352 #define FILLP_ECONNREFUSED     WSAECONNREFUSED
353 #define FILLP_EPROTOTYPE       WSAEPROTOTYPE
354 #define FILLP_ENOPROTOOPT      WSAENOPROTOOPT
355 #define FILLP_EPROTONOSUPPORT  WSAEPROTONOSUPPORT
356 #define FILLP_ESOCKTNOSUPPORT  WSAESOCKTNOSUPPORT
357 #define FILLP_EOPNOTSUPP       WSAEOPNOTSUPP
358 #define FILLP_EPFNOSUPPORT     WSAEPFNOSUPPORT
359 #define FILLP_EAFNOSUPPORT     WSAEAFNOSUPPORT
360 #define FILLP_EADDRINUSE       WSAEADDRINUSE
361 #define FILLP_EBUSY            ERROR_WAS_LOCKED
362 #define FILLP_ENOTSOCK         WSAENOTSOCK
363 #define FILLP_EISCONN          WSAEISCONN
364 #define FILLP_ENOENT           WSANO_DATA
365 #define FILLP_EEXIST           WSAEALREADY
366 #define FILLP_EMFILE           WSAEMFILE
367 #define FILLP_EALREADY         WSAEALREADY
368 #endif
369 
370 #define FILLP_SIZE_T size_t
371 #if defined(FILLP_LINUX)
372 
373 #define FILLP_ATOMIC
374 
375 /**
376  * Provides the data to store atomic operations value.
377  */
378 #ifdef FILLP_ATOMIC
379 #ifdef FILLP_LW_LITEOS
380 typedef atomic_t SysArchAtomic;
381 #else
382 typedef struct {
383     volatile FILLP_INT counter; /* Indicates the counter to store atomic operations value. */
384 #ifdef FILLP_64BIT_ALIGN
385     FILLP_UINT32 reserve;
386 #endif
387 } AtomicT;
388 typedef AtomicT SysArchAtomic;
389 #endif
390 #endif /* FILLP_ATOMIC */
391 
392 #ifndef FILLP_MAC
393 typedef struct {
394     FILLP_INT counter;
395     pthread_mutex_t mutex;
396     pthread_cond_t cond;
397 } SemT;
398 #define SYS_ARCH_SEM SemT
399 #endif
400 
401 #ifdef FILLP_MAC
402 #define SYS_ARCH_SEM semaphore_t
403 #endif
404 
405 #if defined(FILLP_LW_LITEOS)
406 typedef struct InnerSysArchRwSem {
407     pthread_mutex_t readMutex;
408     pthread_mutex_t writeMutex;
409     volatile int readCount;
410 } SYS_ARCH_RW_SEM;
411 
412 #else
413 #define SYS_ARCH_RW_SEM pthread_rwlock_t
414 #endif
415 #elif defined(FILLP_WIN32)
416 
417 typedef volatile FILLP_INT SysArchAtomic;
418 
419 /**
420  * Provides a semaphore.
421  */
422 #define SYS_ARCH_SEM HANDLE
423 typedef struct InnerSysArchRwSem {
424     volatile FILLP_ULONG sem; /* Indicates a semaphore. */
425 } SYS_ARCH_RW_SEM;
426 #else
427 # error "system atomic function need to define !!!"
428 #endif
429 
430 typedef struct sockaddr FILLP_SOCKADDR;
431 
432 /**
433 * Provides thread parameters.
434 */
435 struct ThreadParam {
436     void (*func)(void *param); /* Indicates a pointer to the spunge main thread function. */
437     void *param; /* Indicates a pointer to the spunge instance. */
438 };
439 
440 /**
441 * Provides the FillP debug level values.
442 */
443 typedef enum {
444     FILLP_DBG_LVL_DEBUG = 1, /* Indicates the FillP debug level. */
445     FILLP_DBG_LVL_DETAIL, /* Indicates the FillP debug details. */
446     FILLP_DBG_LVL_INFO, /* Indicates the FillP debug information. */
447     FILLP_DBG_LVL_WARNING, /* Indicates the FillP debug level warning. */
448     FILLP_DBG_LVL_ERROR, /* Indicates the FillP debug level error. */
449     FILLP_DBG_LVL_BUTT, /* Indicates the end of the enum. */
450     FILLP_DBG_LVL_HELP,
451     FILLP_DBG_LVL_SHOWDATA,
452     FILLP_DBG_LVL_SHOWLEVEL,
453 } FillpDebugLevel;
454 
455 /**
456 * Provides the debug type values.
457 */
458 typedef enum {
459     /* Provides information about all other debug commands which a developer can use. */
460     FILLP_DBG_HELP,
461     /* Provides all runtime error/warning/info logs, based on the level
462      * set by developer/debugger(FILLP_DBGCMD_SET_PRINT_LEVEL) */
463     FILLP_DBG_PRINT,
464     /* Provides information on the existing level for run time debug information set by the developer. */
465     FILLP_DBG_SHOW_LEVEL,
466     /* Provides function trace information, if enabled by the developer. */
467     FILLP_DBG_FUNC_TRACE,
468     /* Provides information requested by the developer using debug interface. */
469     FILLP_DBG_SHOW_DATA,
470     /* Provides all the product/user related log information. */
471     FILLP_DBG_LOG
472 } FillpDebugType;
473 
474 typedef enum {
475     FILLP_PACK_STATE_NORMAL = 1,
476     FILLP_PACK_STATE_ENLARGE,
477     FILLP_PACK_STATE_KEEP_ALIVE
478 } FillpPackSendState;
479 
480 /**
481  * @ingroup FillPDebug
482  * @brief
483  * This callback is use for debug send.
484  *
485  * @param[in] debugType @ref FillpDebugType
486  * @param[in] debugLvl @ref FillpDebugLevel
487  * @param[in] debugId Indicates the file and line information.
488  * @param[in] format Specifies the actual message.
489  *
490  * @return
491  * On success : FILLP_SUCCESS
492  * On failure : FILLP_FAILURE
493  */
494 typedef void (*FillpDebugSendFunc)(IN FILLP_UINT32 debugType, IN FILLP_UINT32 debugLvl,
495     IN FILLP_UINT32 debugId, IN FILLP_CHAR *format, ...);
496 
497 /**
498 * Provides information about LM callback function.
499 */
500 typedef struct {
501     FillpDebugSendFunc debugCallbackFunc; /* Registers debug information output callback function. */
502 } FillpLmCallbackFunc;
503 
504 /**
505  * @ingroup FillPDebug
506  * @brief
507  * Sets the debug log level.
508  *
509  * @param[in] logLevel Defines the log level. Refer @ref FillpDebugLevel.
510  * @return
511  * FILLP_SUCCESS on success, otherwise error codes.
512  */
513 extern FILLP_INT32 DLL_API FillpApiSetDebugLogLevel(IN FILLP_UINT8 logLevel);
514 
515 /**
516  * @ingroup FillPDebug
517  * @brief
518  * Sets the log enable/disable status for different modules.
519  *
520  * @param[in] logModules ORed values of all the modules for which log needs to
521  * be enabled. If set to 0xFFFFFFFF, then it is enabled for all the modules.
522  * @return
523  * FILLP_SUCCESS on success, otherwise error codes.
524  */
525 extern FILLP_UINT32 DLL_API FillpApiConfigLogModules(IN FILLP_ULLONG logModules);
526 
527 /**
528  * @ingroup Callbacks
529  * @brief
530  * This callback is used to info APP that fillp socket is about to close and destroy, so APP
531  * can do something before fillp socket destroy.
532  *
533  * @param[in] udpSock udp socket fd
534  * @param[in] localAddr Indicates the local socket address
535  * @param[in] peerAddr Indicates the peer socket address
536  *
537  * @return
538  * void
539  */
540 typedef void (*FillpSockCloseCbkFunc)(IN FILLP_INT udpSock, IN struct sockaddr *localAddr,
541     IN struct sockaddr *peerAddr);
542 
543 /**
544  * Structure of app callback functions.
545  */
546 typedef struct {
547     FillpSockCloseCbkFunc fillpSockCloseCbkFunc; /* Registers fillp socket close callback function. */
548 } FillpAppCallbackFunc;
549 
550 typedef void (*FillpEventPollCbFunc)(void *argEpInfo, int fd, int event);
551 
552 enum {
553     NONE,
554     VIDEO_I,
555     VIDEO_P,
556     VIDEO_MAX = 50,
557     AUDIO = VIDEO_MAX + 1,
558     AUDIO_MAX = 100,
559 };
560 
561 #define FRAME_INFO_BITMAP_SLICE_END 0x00000001 /* last data of the slice */
562 #define FRAME_INFO_BITMAP_FRAME_END 0x00000002 /* last data of the frame,
563                                                 * when set, the SLICE_END or the LAYER_END no need to set */
564 #define FRAME_INFO_BITMAP_LAYER_END 0x00000004 /* last data of the layer */
565 
566 struct FrameInfo {
567     FILLP_INT frameType; /* I or P frame */
568     FILLP_INT seqNum; /* frame sequence number, different slice or layer data has the same sequence,
569                        * range [0 ~ 2147483647] */
570     FILLP_INT subSeqNum; /* slice number of the frame, started at 0 of a new slice */
571     FILLP_INT level; /* level of the scalable video coding, 0: basic level, 1: extend level 1, 2: extend level 2 */
572     FILLP_SLONG timestamp; /* time of the frame in codec, us. it's optional and value 0 means no time got */
573     FILLP_UINT32 bitMap;
574 };
575 
576 /**
577  * the event type
578  */
579 typedef enum {
580     FT_EVT_MAX,
581 } FtEnumEventType;
582 
583 /**
584  * Structure of event callback information.
585  */
586 typedef struct {
587     FtEnumEventType evt;
588     union {
589         FILLP_UINT32 reserved;
590     } info;
591 } FtEventCbkInfo;
592 
593 #ifdef __cplusplus
594 }
595 #endif
596 
597 #endif
598 
599