From patchwork Mon Jul 17 14:19:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas George X-Patchwork-Id: 4329 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.1.76 with SMTP id 73csp209050vsb; Mon, 17 Jul 2017 07:19:58 -0700 (PDT) X-Received: by 10.28.230.17 with SMTP id d17mr4569197wmh.17.1500301198346; Mon, 17 Jul 2017 07:19:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500301198; cv=none; d=google.com; s=arc-20160816; b=GRxuGSdVPlHBxO5OPBqVb6dl3wSyK75NimmBbFVUzTOEh0SyUDJWpFj8fIHrKurF4+ Zi/Poacn3KF/rsOwgJYJR8MijIsEckRon+ly4h60VqJmRq0jebuNjxPNWJBIsTX9FI1v ZXBQuqG77E5WFv1gOmGYuIncB0gH1S3LeBanDkgEEgqPkFWf53rVs1ic8ZXeygluhchb ZDNMauq6a6RAufzkEKqU6G5MAEdsoL/dF6rKO3ts9ChsNQvB9+zW4BhC4LMStw3rj+Yl 6vgqefovfdI3KToBg+7lT5nmhnt/3N2ww+s52+jtEKhoj0hDtJCsm6iAYDQbep1/fQ8A pSdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to:arc-authentication-results; bh=F/Dxj1kpUZDPJBOnqMjthfGbGVHLMh7xSCWuYvbT680=; b=aeFqpr5UVi4K70nc20B0I9wqIwd06TRaJiq0GvDs4dkC0RmZQbEE9xbQACDAY6ASRo GDinq8taKNP6DrsLxeLXsrNRGVBvgyzAABfzKAkos7yk0ewnRBU4Jx4oEIZ/gCHP7Ppk 27f9osGuVaoIH40RLBK2kDu1l0PGC86dd/wyP4Las1/JhqGgYlAVTmfrlaEyWoFa5VfS WjkSTMj86c4diuSMeLGTRouT7DXJqurL1U9S6eB75oexgOF30061jx0rTIz6rBd8h6i0 E60z6c3hh8pephCPHyXFfnDgwV2di2nOUzHruCbWq9VetM9N0ctoXRpqg7S9I5wuIJUX lgFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id u143si10000981wmu.187.2017.07.17.07.19.57; Mon, 17 Jul 2017 07:19:58 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D7C07689C89; Mon, 17 Jul 2017 17:19:29 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from nef2.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 308AB689216 for ; Mon, 17 Jul 2017 17:19:23 +0300 (EEST) Received: from phare.normalesup.org (phare.normalesup.org [129.199.129.80]) by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id v6HEJTJ0039887 for ; Mon, 17 Jul 2017 16:19:29 +0200 (CEST) Received: by phare.normalesup.org (Postfix, from userid 1001) id 98157E00D0; Mon, 17 Jul 2017 16:19:29 +0200 (CEST) From: Nicolas George To: ffmpeg-devel@ffmpeg.org Date: Mon, 17 Jul 2017 16:19:22 +0200 Message-Id: <20170717141926.7442-3-george@nsup.org> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170717141926.7442-1-george@nsup.org> References: <20170717141926.7442-1-george@nsup.org> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef2.ens.fr [129.199.96.32]); Mon, 17 Jul 2017 16:19:29 +0200 (CEST) Subject: [FFmpeg-devel] [PATCH 3/7] lavfi/framesync2: rename all conflicting symbols. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Nicolas George --- libavfilter/framesync2.c | 42 +++++++++++++++++++++--------------------- libavfilter/framesync2.h | 30 +++++++++++++++--------------- 2 files changed, 36 insertions(+), 36 deletions(-) Trivial change to make the next patches more readable. diff --git a/libavfilter/framesync2.c b/libavfilter/framesync2.c index eb05d66a86..8d81bb5c48 100644 --- a/libavfilter/framesync2.c +++ b/libavfilter/framesync2.c @@ -24,7 +24,7 @@ #include "libavutil/avassert.h" #include "avfilter.h" #include "bufferqueue.h" -#include "framesync.h" +#include "framesync2.h" #include "internal.h" #define OFFSET(member) offsetof(FFFrameSync, member) @@ -49,7 +49,7 @@ enum { STATE_EOF, }; -int ff_framesync_init(FFFrameSync *fs, void *parent, unsigned nb_in) +int ff_framesync2_init(FFFrameSync *fs, void *parent, unsigned nb_in) { fs->class = &framesync_class; fs->parent = parent; @@ -77,7 +77,7 @@ static void framesync_sync_level_update(FFFrameSync *fs) fs->eof = 1; } -int ff_framesync_configure(FFFrameSync *fs) +int ff_framesync2_configure(FFFrameSync *fs) { unsigned i; int64_t gcd, lcm; @@ -202,7 +202,7 @@ static void framesync_inject_frame(FFFrameSync *fs, unsigned in, AVFrame *frame) fs->in[in].have_next = 1; } -int ff_framesync_add_frame(FFFrameSync *fs, unsigned in, AVFrame *frame) +int ff_framesync2_add_frame(FFFrameSync *fs, unsigned in, AVFrame *frame) { av_assert1(in < fs->nb_in); if (!fs->in[in].have_next) @@ -212,7 +212,7 @@ int ff_framesync_add_frame(FFFrameSync *fs, unsigned in, AVFrame *frame) return 0; } -void ff_framesync_next(FFFrameSync *fs) +void ff_framesync2_next(FFFrameSync *fs) { unsigned i; @@ -224,13 +224,13 @@ void ff_framesync_next(FFFrameSync *fs) framesync_advance(fs); } -void ff_framesync_drop(FFFrameSync *fs) +void ff_framesync2_drop(FFFrameSync *fs) { fs->frame_ready = 0; } -int ff_framesync_get_frame(FFFrameSync *fs, unsigned in, AVFrame **rframe, - unsigned get) +int ff_framesync2_get_frame(FFFrameSync *fs, unsigned in, AVFrame **rframe, + unsigned get) { AVFrame *frame; unsigned need_copy = 0, i; @@ -266,7 +266,7 @@ int ff_framesync_get_frame(FFFrameSync *fs, unsigned in, AVFrame **rframe, return 0; } -void ff_framesync_uninit(FFFrameSync *fs) +void ff_framesync2_uninit(FFFrameSync *fs) { unsigned i; @@ -279,18 +279,18 @@ void ff_framesync_uninit(FFFrameSync *fs) av_freep(&fs->in); } -int ff_framesync_process_frame(FFFrameSync *fs, unsigned all) +int ff_framesync2_process_frame(FFFrameSync *fs, unsigned all) { int ret, count = 0; av_assert0(fs->on_event); while (1) { - ff_framesync_next(fs); + ff_framesync2_next(fs); if (fs->eof || !fs->frame_ready) break; if ((ret = fs->on_event(fs)) < 0) return ret; - ff_framesync_drop(fs); + ff_framesync2_drop(fs); count++; if (!all) break; @@ -300,26 +300,26 @@ int ff_framesync_process_frame(FFFrameSync *fs, unsigned all) return count; } -int ff_framesync_filter_frame(FFFrameSync *fs, AVFilterLink *inlink, - AVFrame *in) +int ff_framesync2_filter_frame(FFFrameSync *fs, AVFilterLink *inlink, + AVFrame *in) { int ret; - if ((ret = ff_framesync_process_frame(fs, 1)) < 0) + if ((ret = ff_framesync2_process_frame(fs, 1)) < 0) return ret; - if ((ret = ff_framesync_add_frame(fs, FF_INLINK_IDX(inlink), in)) < 0) + if ((ret = ff_framesync2_add_frame(fs, FF_INLINK_IDX(inlink), in)) < 0) return ret; - if ((ret = ff_framesync_process_frame(fs, 0)) < 0) + if ((ret = ff_framesync2_process_frame(fs, 0)) < 0) return ret; return 0; } -int ff_framesync_request_frame(FFFrameSync *fs, AVFilterLink *outlink) +int ff_framesync2_request_frame(FFFrameSync *fs, AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; int input, ret, i; - if ((ret = ff_framesync_process_frame(fs, 0)) < 0) + if ((ret = ff_framesync2_process_frame(fs, 0)) < 0) return ret; if (ret > 0) return 0; @@ -333,9 +333,9 @@ int ff_framesync_request_frame(FFFrameSync *fs, AVFilterLink *outlink) input = i; ret = ff_request_frame(ctx->inputs[input]); if (ret == AVERROR_EOF) { - if ((ret = ff_framesync_add_frame(fs, input, NULL)) < 0) + if ((ret = ff_framesync2_add_frame(fs, input, NULL)) < 0) return ret; - if ((ret = ff_framesync_process_frame(fs, 0)) < 0) + if ((ret = ff_framesync2_process_frame(fs, 0)) < 0) return ret; ret = 0; } diff --git a/libavfilter/framesync2.h b/libavfilter/framesync2.h index 074d30394f..e19d0f37e8 100644 --- a/libavfilter/framesync2.h +++ b/libavfilter/framesync2.h @@ -44,13 +44,13 @@ * The basic working of this API is the following: * * - When a frame is available on any input, add it using - * ff_framesync_add_frame(). + * ff_framesync2_add_frame(). * * - When a frame event is ready to be processed (i.e. after adding a frame * or when requested on input): - * - call ff_framesync_next(); + * - call ff_framesync2_next(); * - if fs->frame_ready is true, process the frames; - * - call ff_framesync_drop(). + * - call ff_framesync2_drop(). */ /** @@ -217,7 +217,7 @@ typedef struct FFFrameSync { * @param nb_in number of inputs * @return >= 0 for success or a negative error code */ -int ff_framesync_init(FFFrameSync *fs, void *parent, unsigned nb_in); +int ff_framesync2_init(FFFrameSync *fs, void *parent, unsigned nb_in); /** * Configure a frame sync structure. @@ -226,12 +226,12 @@ int ff_framesync_init(FFFrameSync *fs, void *parent, unsigned nb_in); * * @return >= 0 for success or a negative error code */ -int ff_framesync_configure(FFFrameSync *fs); +int ff_framesync2_configure(FFFrameSync *fs); /** * Free all memory currently allocated. */ -void ff_framesync_uninit(FFFrameSync *fs); +void ff_framesync2_uninit(FFFrameSync *fs); /** * Add a frame to an input @@ -242,19 +242,19 @@ void ff_framesync_uninit(FFFrameSync *fs); * @param in index of the input * @param frame input frame, or NULL for EOF */ -int ff_framesync_add_frame(FFFrameSync *fs, unsigned in, AVFrame *frame); +int ff_framesync2_add_frame(FFFrameSync *fs, unsigned in, AVFrame *frame); /** * Prepare the next frame event. * * The status of the operation can be found in fs->frame_ready and fs->eof. */ -void ff_framesync_next(FFFrameSync *fs); +void ff_framesync2_next(FFFrameSync *fs); /** * Drop the current frame event. */ -void ff_framesync_drop(FFFrameSync *fs); +void ff_framesync2_drop(FFFrameSync *fs); /** * Get the current frame in an input. @@ -266,15 +266,15 @@ void ff_framesync_drop(FFFrameSync *fs); * the returned frame; the current frame will either be * duplicated or removed from the framesync structure */ -int ff_framesync_get_frame(FFFrameSync *fs, unsigned in, AVFrame **rframe, - unsigned get); +int ff_framesync2_get_frame(FFFrameSync *fs, unsigned in, AVFrame **rframe, + unsigned get); /** * Process one or several frame using the on_event callback. * * @return number of frames processed or negative error code */ -int ff_framesync_process_frame(FFFrameSync *fs, unsigned all); +int ff_framesync2_process_frame(FFFrameSync *fs, unsigned all); /** @@ -283,8 +283,8 @@ int ff_framesync_process_frame(FFFrameSync *fs, unsigned all); * This function can be the complete implementation of all filter_frame * methods of a filter using framesync. */ -int ff_framesync_filter_frame(FFFrameSync *fs, AVFilterLink *inlink, - AVFrame *in); +int ff_framesync2_filter_frame(FFFrameSync *fs, AVFilterLink *inlink, + AVFrame *in); /** * Request a frame on the filter output. @@ -292,6 +292,6 @@ int ff_framesync_filter_frame(FFFrameSync *fs, AVFilterLink *inlink, * This function can be the complete implementation of all filter_frame * methods of a filter using framesync if it has only one output. */ -int ff_framesync_request_frame(FFFrameSync *fs, AVFilterLink *outlink); +int ff_framesync2_request_frame(FFFrameSync *fs, AVFilterLink *outlink); #endif /* AVFILTER_FRAMESYNC2_H */