/* * 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 #include #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 */