On Wed, Nov 22, 2017 at 9:35 AM, Jeyapal, Karthick <kjeya...@akamai.com> wrote: >>On 11/22/17, 1:47 PM, "刘歧" <l...@chinaffmpeg.org> wrote: >> >>> 在 2017年11月22日,14:53,Karthick J <kjeya...@akamai.com> 写道: >>> >>> --- >>> libavformat/hlsenc.c | 130 +++++++----------------------------------- >>> libavformat/hlsenc.h | 158 >>> +++++++++++++++++++++++++++++++++++++++++++++++++++ >>> 2 files changed, 177 insertions(+), 111 deletions(-) >>> create mode 100644 libavformat/hlsenc.h >>> > […] >> move the APIs to an C source file, and use ff_ prefix, refer to: >> https://ffmpeg.org/developer.html#toc-Naming-conventions > Thanks for the reply. > I am not adding it to the API or a global function. > Those are just ‘static’ utility functions, to allow code reuse. > The scope will be limited only to those files including hlsenc.h. > Developer guide states “For file-scope variables and functions declared as > static, no prefix is required”. > For example, oggdec.h has two static functions without ff_ prefix. >
Regardless, having a bunch of complex functions in a header is not the preferred way (because their code gets duplicated), its usually reserved for extremely simple functions or special cases. Instead, put them into a .c file and give them the ff_ prefix, like most common shared code we use. - Hendrik _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel