[FFmpeg-devel] [PATCH V2 1/3] dnn: fix redefining typedefs and also refine naming with correct prefix

Anton Khirnov anton at khirnov.net
Sun Jan 3 19:31:12 EET 2021


Quoting Guo, Yejun (2020-12-30 16:35:06)
> The prefix for symbols not exported from the library and not
> local to one translation unit is ff_ (or FF for types).
> 
> Signed-off-by: Guo, Yejun <yejun.guo at intel.com>
> ---
>  libavfilter/dnn/dnn_backend_openvino.c | 32 ++++++-------
>  libavfilter/dnn/queue.c                | 66 +++++++++++++-------------
>  libavfilter/dnn/queue.h                | 20 ++++----
>  libavfilter/dnn/safe_queue.c           | 34 ++++++-------
>  libavfilter/dnn/safe_queue.h           | 14 +++---
>  5 files changed, 83 insertions(+), 83 deletions(-)
> 
> diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c
> index a35d72a38c..331f13b263 100644
> --- a/libavfilter/dnn/dnn_backend_openvino.c
> +++ b/libavfilter/dnn/dnn_backend_openvino.c
> @@ -53,8 +53,8 @@ typedef struct OVModel{
>      ie_infer_request_t *infer_request;
>  
>      /* for async execution */
> -    safe_queue *request_queue;  // holds RequestItem
> -    queue *task_queue;          // holds TaskItem
> +    FFSafeQueue *request_queue;   // holds RequestItem
> +    FFQueue *task_queue;          // holds TaskItem

Note that the ff prefix is only required for functions, to avoid
conflicts with static linking. Struct names are not a part of the ABI,
so no namespacing is needed for private structs.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list