From patchwork Sat Feb 4 10:41:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 40276 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:5494:b0:bf:7b3a:fd32 with SMTP id i20csp1870752pzk; Sat, 4 Feb 2023 02:48:27 -0800 (PST) X-Google-Smtp-Source: AK7set9TErURy9HTl1HkpgKaIWUy/6d10utqjr5iynY006d6pzDkdRluvL6vBiln9QFDPKkg+1Pl X-Received: by 2002:aa7:c714:0:b0:463:9193:404a with SMTP id i20-20020aa7c714000000b004639193404amr13232888edq.21.1675507707350; Sat, 04 Feb 2023 02:48:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675507707; cv=none; d=google.com; s=arc-20160816; b=Tb8DCuDKscTJF67dvJ45jAp9IlsxM2IYg0Gk8PuohyFJie7/GAGRXR7WOU5h/pz3Sx /HHOeQeC+FNP6bggfZuLOyo5EQcvM/XTp+C2tlRx0rlBx+3BXsIUO4DoGgQo6CVVOoYo M7EqqLfsB1pSO2nDXUzvVrCIKxFgOivMNOd6Nt51liE72PevXo5JXDZXCFDfZvNkIRqP 7dBSOUBgVOUMwBXyxV17Q9sZWVjqn/ineZt853ZdrGrMToq53Q5qLHcStXwf6cyogKlP /jrTnvRuO6BJTkDlQ7AO48SdQk0EcAKx+Hx2nqd7p20lyHZCPM8C8fQ8wckgdlaIyrnm MYFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=6yKsKrpHxn+GT3eN3oMtOWC/0hu6Xcf48PppEqPecTE=; b=Y8jBgpggB2/BXAZFuAtKkMs+2MD95bWPq7lM6tEnoLD37eGlad9lyoTIJWVvQroqz6 ZDDuC4CV2fNY+HPDO9N/vg9Vv+BwQ7HmhGfSFsrV+7Y38iC3bKUpdxsHpI6Shoq7USfN LT0KIaJDeokziHRaL4mky+WxHJ6c+xfWJPOxh50TXrLpqO1lxzi4wQ73YwXjEtK0Hlrn HHA4JqfncPy4iV0iNMaXupN8UmQs8cn2lSu0AVtHZqWgL3PG+YabsJT7QtGDIzD3BPvp ymcrKkVQmKx+Vsx33wvlEfZnlnzWgvluPD0jh3q4sZG8hf8+3f1S1t8Yu3vOpyu09uD/ y5eg== 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 el10-20020a056402360a00b004a0912fda8esi5004729edb.194.2023.02.04.02.48.26; Sat, 04 Feb 2023 02:48:27 -0800 (PST) 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 170E068BF4D; Sat, 4 Feb 2023 12:44:47 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5FBA468B6C8 for ; Sat, 4 Feb 2023 12:44:21 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 1CE042404EC for ; Sat, 4 Feb 2023 11:44:21 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 0-pJHeOb61Np for ; Sat, 4 Feb 2023 11:44:20 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 43E49240D25 for ; Sat, 4 Feb 2023 11:44:07 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 1BD413A05CC for ; Sat, 4 Feb 2023 11:44:06 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Sat, 4 Feb 2023 11:41:53 +0100 Message-Id: <20230204104204.20721-23-anton@khirnov.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230204104204.20721-1-anton@khirnov.net> References: <20230204104204.20721-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 22/33] avfilter: remove FF_API_BUFFERSINK_ALLOC X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: m9QPe+icmrYZ From: James Almer Signed-off-by: James Almer --- libavfilter/buffersink.c | 22 ---------------------- libavfilter/buffersink.h | 36 ------------------------------------ libavfilter/version_major.h | 1 - 3 files changed, 59 deletions(-) diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c index e269cf72d1b..306c283f775 100644 --- a/libavfilter/buffersink.c +++ b/libavfilter/buffersink.c @@ -154,28 +154,6 @@ int attribute_align_arg av_buffersink_get_samples(AVFilterContext *ctx, return get_frame_internal(ctx, frame, 0, nb_samples); } -#if FF_API_BUFFERSINK_ALLOC -AVBufferSinkParams *av_buffersink_params_alloc(void) -{ - static const int pixel_fmts[] = { AV_PIX_FMT_NONE }; - AVBufferSinkParams *params = av_malloc(sizeof(AVBufferSinkParams)); - if (!params) - return NULL; - - params->pixel_fmts = pixel_fmts; - return params; -} - -AVABufferSinkParams *av_abuffersink_params_alloc(void) -{ - AVABufferSinkParams *params = av_mallocz(sizeof(AVABufferSinkParams)); - - if (!params) - return NULL; - return params; -} -#endif - static av_cold int common_init(AVFilterContext *ctx) { BufferSinkContext *buf = ctx->priv; diff --git a/libavfilter/buffersink.h b/libavfilter/buffersink.h index 01e7c747d8e..64e08de53ee 100644 --- a/libavfilter/buffersink.h +++ b/libavfilter/buffersink.h @@ -94,42 +94,6 @@ int av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flag */ #define AV_BUFFERSINK_FLAG_NO_REQUEST 2 -#if FF_API_BUFFERSINK_ALLOC -/** - * Deprecated and unused struct to use for initializing a buffersink context. - */ -typedef struct AVBufferSinkParams { - const enum AVPixelFormat *pixel_fmts; ///< list of allowed pixel formats, terminated by AV_PIX_FMT_NONE -} AVBufferSinkParams; - -/** - * Create an AVBufferSinkParams structure. - * - * Must be freed with av_free(). - */ -attribute_deprecated -AVBufferSinkParams *av_buffersink_params_alloc(void); - -/** - * Deprecated and unused struct to use for initializing an abuffersink context. - */ -typedef struct AVABufferSinkParams { - const enum AVSampleFormat *sample_fmts; ///< list of allowed sample formats, terminated by AV_SAMPLE_FMT_NONE - const int64_t *channel_layouts; ///< list of allowed channel layouts, terminated by -1 - const int *channel_counts; ///< list of allowed channel counts, terminated by -1 - int all_channel_counts; ///< if not 0, accept any channel count or layout - int *sample_rates; ///< list of allowed sample rates, terminated by -1 -} AVABufferSinkParams; - -/** - * Create an AVABufferSinkParams structure. - * - * Must be freed with av_free(). - */ -attribute_deprecated -AVABufferSinkParams *av_abuffersink_params_alloc(void); -#endif - /** * Set the frame size for an audio buffer sink. * diff --git a/libavfilter/version_major.h b/libavfilter/version_major.h index 655e3d119d2..5a8bf4eda21 100644 --- a/libavfilter/version_major.h +++ b/libavfilter/version_major.h @@ -35,7 +35,6 @@ * the public API and may change, break or disappear at any time. */ -#define FF_API_BUFFERSINK_ALLOC (LIBAVFILTER_VERSION_MAJOR < 9) #define FF_API_PAD_COUNT (LIBAVFILTER_VERSION_MAJOR < 9) #endif /* AVFILTER_VERSION_MAJOR_H */