From patchwork Mon Jul 17 14:19:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas George X-Patchwork-Id: 4333 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.1.76 with SMTP id 73csp209384vsb; Mon, 17 Jul 2017 07:20:19 -0700 (PDT) X-Received: by 10.28.139.204 with SMTP id n195mr4562628wmd.14.1500301218954; Mon, 17 Jul 2017 07:20:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500301218; cv=none; d=google.com; s=arc-20160816; b=Na3a7JxU0TIRqrymmam1B9m3pyP8CWY8uXCDxU89ncdi8neLgTe6CBp+MuI6vi+EUx 9DN/lFTru+AHIvrzmyZpbhziFmWE5kG1nRjmS6PVxmWra1LjTpyY9YZN8l9UHTWX0Sri NwZboCDNi6gHWESMuSMqoOCOAxwQ5kaJ1xQo2whYRKFWG7Oh23EkqXQcNHlAjsaNIMlN dRnxNhuud+IeMBv1BA52YHqjRks5nUW3rkUUYunvjpt9MCaMBtYmR/+E3JT8OWQ6iTNZ pPhSgWtAi9ub8t8jV0Boul6oh8v+3AtdtWgf+BZB616lVorR15HoklqLgEvyWNbz+eey AAzQ== 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=pT7khONd1ePlQQz9YmEEPeDKq+5gcBQVtf2ISjtTNb4=; b=ZQamauDVfGUj7YMjMv5kLMI5SHy0sHBpY8Ls05RWoRI1fB6V0p2AbqseJJWOBqZTne bBIzWPsdHLzFdQLfwAmbIhJiQmFGz9ykDnCNOR/X+6wtsJfctAlQZicONr5kyAkP9UCG uIAWEqcUoyJjzonO9IooQGFYNq8nKYUbaN4H38BcCTBbjLjUOtoVTbMEYbbbvYIoT3jj Qt1LZBRDKIAHbKWkOYNEt2TNctu75p5cyfKJbao+cC4YvgO2/wsV7yfmWpxhX/u2uNSh hRhBy88e6Vd2MrnQBQRAn8Wb48q6+DkD+PwHil2mbMYPKquGg59KjM5oAT/LYOViliic bJng== 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 s10si10230007wma.14.2017.07.17.07.20.18; Mon, 17 Jul 2017 07:20:18 -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 B29E8689C1D; Mon, 17 Jul 2017 17:19:31 +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 6565A689C70 for ; Mon, 17 Jul 2017 17:19:24 +0300 (EEST) Received: from phare.normalesup.org (archicubes.ens.fr [129.199.129.80]) by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id v6HEJUgN039903 for ; Mon, 17 Jul 2017 16:19:31 +0200 (CEST) Received: by phare.normalesup.org (Postfix, from userid 1001) id C768EE00D0; Mon, 17 Jul 2017 16:19:30 +0200 (CEST) From: Nicolas George To: ffmpeg-devel@ffmpeg.org Date: Mon, 17 Jul 2017 16:19:24 +0200 Message-Id: <20170717141926.7442-5-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:31 +0200 (CEST) Subject: [FFmpeg-devel] [PATCH 5/7] lavfi: add outlink helper functions. 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" These wrappers cost nothing, they make the namespace more consistent and they will be useful if/when locking becomes necessary. Signed-off-by: Nicolas George --- libavfilter/filters.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/libavfilter/filters.h b/libavfilter/filters.h index 370d99b38b..1cbc18158f 100644 --- a/libavfilter/filters.h +++ b/libavfilter/filters.h @@ -26,6 +26,7 @@ */ #include "avfilter.h" +#include "internal.h" /** * Special return code when activate() did not do anything. @@ -139,4 +140,24 @@ int ff_inlink_acknowledge_status(AVFilterLink *link, int *rstatus, int64_t *rpts */ void ff_inlink_request_frame(AVFilterLink *link); +/** + * Test if a frame is wanted on an output link. + */ +static inline int ff_outlink_frame_wanted(AVFilterLink *link) +{ + return link->frame_wanted_out; +} + +/** + * Set the status field of a link from the source filter. + * The pts should reflect the timestamp of the status change, + * in link time base and relative to the frames timeline. + * In particular, for AVERROR_EOF, it should reflect the + * end time of the last frame. + */ +static inline void ff_outlink_set_status(AVFilterLink *link, int status, int64_t pts) +{ + ff_avfilter_link_set_in_status(link, status, pts); +} + #endif /* AVFILTER_FILTERS_H */