From patchwork Mon Jan 16 13:38:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 40044 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:1d43:b0:b8:6755:f97e with SMTP id cs3csp1038244pzb; Mon, 16 Jan 2023 05:41:28 -0800 (PST) X-Google-Smtp-Source: AMrXdXs+bU5aG1avpYYSO8ifVtunEwqc7zTcehY5w27ERfrLoJ05kn9igq9icWVpsj2Cca4rkTRo X-Received: by 2002:a50:eac6:0:b0:461:d042:80db with SMTP id u6-20020a50eac6000000b00461d04280dbmr80772414edp.0.1673876488291; Mon, 16 Jan 2023 05:41:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673876488; cv=none; d=google.com; s=arc-20160816; b=iLuj2YJSPdNBnvR8gCY0C4FqVeLSgBQvQNBS61+zkbzCQhe/o0iUk8wswxXrCDKNJA DePrqwoq1GWUd37L/9w4XSOZ14L+wti47P+pJwmZyvMNl+P6CK8Tp4c7EX1G77CPHqDi 2oIwqPpIpJFjikomW9EsFmE1eFC382QClG87EAuwH1wy2z93ZSJeRDtTrkkjIof5Do19 QSPUcPM3IJj/3CnH0eXisFHXCRM6evmnN8a2dPtuUREpFMFavzdb8d3x4bOtbXK3EcVt go3L4tn+oOTrQLT24Kp7C1j/07ohvvlUPvdvsgYJF0Op3sRtPkVbi0ZkBqJHLm1zxyeE nzXw== 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:dkim-signature:delivered-to; bh=kiN4xo9JswAvy6x5PrmPdBSf8gO7FUWWpJ3Qm4Uu4No=; b=w/RkHhQvp9cXHyNaCDjGVu4AqFFVPHyIKfCRp8WnMQN6AqjTkxzpJCGnfFHgf8po/r 7bzRuo3xvxmp6mLKOpytmf/75b1buBQwOMm2Sg/67HJNqtGuGjxO1FxbXRcpW1+zeyfn moJyod7cvNB/qZv/3OdkHhfnnHSIauHu7yksUMN460O12qRKsthFUrBaqYC2FBOriyOS bteMN5GX1ZYZ4tzQYpEPz/KisRGBbQ6xs/CN1HQv7//ibORYL28gJY8oKNa2P50IQ7zF XD102ElcrsOUPowP3WA9Soj69wLkVSPQdnyVdaXl+2vx/B1tNAi2qUnbejEGKmVgtooe Aq4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=lLOTpm3z; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g26-20020aa7d1da000000b004764be0b8f8si27101454edp.424.2023.01.16.05.41.27; Mon, 16 Jan 2023 05:41:28 -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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=lLOTpm3z; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 26CE368BE0B; Mon, 16 Jan 2023 15:39:32 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A424268BDC5 for ; Mon, 16 Jan 2023 15:39:25 +0200 (EET) Received: by mail-ot1-f44.google.com with SMTP id p17-20020a9d6951000000b00678306ceb94so16122721oto.5 for ; Mon, 16 Jan 2023 05:39:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=kwnBD9pfSuAg2fHyrcc2HHrr1utmPm23BJidvu3tESI=; b=lLOTpm3zetblj4ItTOVaUC1ANGCZ8cmCChifHlAXjd2C7GpmJW9z6+ci9HncTdf5Tu MBO7PRfEK8qm4ZIuKWKcRpgI30oqhO0Y7vg2t31dvxwhV1TyOn21CvIdIps64E5z9taN TSzIHYcHJG/x3lRI7zTUrKaQi2JGGdXQ2nY0qqkbGs9yx9Ap6Ym5zk/sNMufqI2J8/pd H1yGB6zcroVI5lPkJIZTf3WGlv9kFfEkkVasZntWQ5IUE5HL5p61CawZ3uYMVFw2u8Nr bh5vce4JJYtqb8bwVCUyPZ0Cfg7MWwZmzfwGkf58VjD5/dSaQtvPR0Ywann5guYUGwX2 h5uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kwnBD9pfSuAg2fHyrcc2HHrr1utmPm23BJidvu3tESI=; b=ktFq+83F5QAhAMAVVLm+ru+tGfkJxYgcYw8K849pJ79jzSSpmwqTIwfJ4sioiic4Pb BdgDwVj/JUes3Dx20uZBpUjbSUZsfW4kbsR1v1539bVGgINaujqCen1g5COIkjYHIzuG HmmADo8gafG7VtN6TH0UVHygz/GxHkOIkH0LChk+0bwLYKX4GOYSw48oVUhQIAZhaxpI ArD7rZcrzCtarr9yvuxKOtyyNbP0u4oML/Jd1adUnoUp+6CrcmYd/vQBEogNO79nc7yH aT4zdWGiGPkqwuJjqM1VGitNbcpHJggZFKjz8LPJ2elq8KF5DONWv1AYIECwMQNeH8d1 tcqw== X-Gm-Message-State: AFqh2kqNyZE7dretP6SejVZCCh1EP65+CUgB8k/NG8cKUATAFoU0fK+M he4o479yl4CCN8FVDGivcazuNAlSJKY= X-Received: by 2002:a05:6830:12d6:b0:66e:61e5:5b50 with SMTP id a22-20020a05683012d600b0066e61e55b50mr9663262otq.11.1673876364033; Mon, 16 Jan 2023 05:39:24 -0800 (PST) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id 3-20020a9d0303000000b0066ca9001e68sm388524otv.5.2023.01.16.05.39.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 05:39:23 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 16 Jan 2023 10:38:28 -0300 Message-Id: <20230116133840.512-15-jamrial@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230116133840.512-1-jamrial@gmail.com> References: <20230116133840.512-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 14/26] avformat: remove FF_API_AVSTREAM_CLASS 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: fq9063SoQMx8 Signed-off-by: James Almer --- fftools/ffmpeg_mux_init.c | 11 ----------- libavformat/avformat.h | 2 -- libavformat/options.c | 3 --- libavformat/version_major.h | 1 - 4 files changed, 17 deletions(-) diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index 9eea8639dc..4d4521f639 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -1709,18 +1709,7 @@ static int set_dispositions(Muxer *mux, const OptionsContext *o) if (!disp) continue; -#if LIBAVFORMAT_VERSION_MAJOR >= 60 ret = av_opt_set(ost->st, "disposition", disp, 0); -#else - { - const AVClass *class = av_stream_get_class(); - const AVOption *o = av_opt_find(&class, "disposition", NULL, 0, AV_OPT_SEARCH_FAKE_OBJ); - - av_assert0(o); - ret = av_opt_eval_flags(&class, o, disp, &ost->st->disposition); - } -#endif - if (ret < 0) goto finish; } diff --git a/libavformat/avformat.h b/libavformat/avformat.h index b40492703c..daa396e5a2 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -948,12 +948,10 @@ const char *av_disposition_to_string(int disposition); * sizeof(AVStream) must not be used outside libav*. */ typedef struct AVStream { -#if FF_API_AVSTREAM_CLASS /** * A class for @ref avoptions. Set on stream creation. */ const AVClass *av_class; -#endif int index; /**< stream index in AVFormatContext */ /** diff --git a/libavformat/options.c b/libavformat/options.c index 0079a06d9a..c7681122cd 100644 --- a/libavformat/options.c +++ b/libavformat/options.c @@ -257,10 +257,7 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c) return NULL; st = &sti->pub; -#if FF_API_AVSTREAM_CLASS st->av_class = &stream_class; -#endif - st->codecpar = avcodec_parameters_alloc(); if (!st->codecpar) goto fail; diff --git a/libavformat/version_major.h b/libavformat/version_major.h index 057d1ac0fb..1db8e7600e 100644 --- a/libavformat/version_major.h +++ b/libavformat/version_major.h @@ -42,7 +42,6 @@ * */ #define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 60) -#define FF_API_AVSTREAM_CLASS (LIBAVFORMAT_VERSION_MAJOR > 59) #define FF_API_GET_END_PTS (LIBAVFORMAT_VERSION_MAJOR < 60) #define FF_API_AVIODIRCONTEXT (LIBAVFORMAT_VERSION_MAJOR < 60)