You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.0 KiB

/*
* Copyright (c) Hisilicon Technologies Co., Ltd. 2020-2021. All rights reserved.
* Description: demux sample common interface.
* Author: Hisilicon
* Create: 2020-06-08
*/
#ifndef _SAMPLE_DEMUX_COMMON_H
#define _SAMPLE_DEMUX_COMMON_H
#include <stdio.h>
#include <limits.h>
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#define sample_dofunc_goto(func, ret, laber) do { \
(ret) = (func); \
if ((ret) != TD_SUCCESS) { \
printf("call %s failed, ret = 0x%x\n", # func, (ret)); \
goto laber; \
} \
} while (0)
#define sample_dofunc_goto_free(func, ret, point, laber, laber_v) do { \
(ret) = (func); \
(laber) = (laber_v); \
if ((ret) != TD_SUCCESS) { \
printf("call %s failed, ret = 0x%x\n", # func, (ret)); \
goto point; \
} \
} while (0)
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cplusplus */
#endif /* __cplusplus */
#endif /* _SAMPLE_DEMUX_COMMON_H */