From patchwork Mon Apr 19 14:09:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27046 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp558906iob; Mon, 19 Apr 2021 07:15:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPHT3/9LWuGt6zyPIZc12GYgdP99t1VW/FN/oGCZQwnfKSo/QlZ5/IDlM0iyTd4ODn9N6I X-Received: by 2002:a17:906:c82c:: with SMTP id dd12mr22131632ejb.132.1618841723101; Mon, 19 Apr 2021 07:15:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841723; cv=none; d=google.com; s=arc-20160816; b=ZSBBIQniiv+34A3LoYUoB2SyQUIYz5QIF41FsOgwc0b3ouUuGcjC5oCmWZUg1LVVRw 5AsVyiAS5/JTzurTImycx5Ezw88vWE/02kltpFS+AbcFGJF1nfMgmFyp62HB9PUeAqPe ssnax1NCX21z7pYTMw38a0cP8TaGlkGgJE9pC3QBqnMpNmfQLYtua+NZR2wIXPmWoRhp tOco9y0+J15UcgRVb6K0dVa5zS8SFvTjPleuJo41Oi3Fc+lQ4auhItmEdMTMqxh00vPo CuN53C/LGs5kuOJwUSkEQ1vG1q0tKMQyJZcMu7C507VDdBpuonPDbAAh71l7/1+EyLHz 9t/w== 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=6i7lWOXyG+CjKIsvDANMg3UbJxfYFlWYT+4IlhMMm3A=; b=MfdzToDHDMAdIlb3vzepAbuYShcw99B4LE5nrAxnpkfYxY86XLaJePzyjZTJxL6ilD wmoaEeqMAgtphnD8huHwyqTdJsI1/r/bmkOVckj5fjUVjuoRDH6rXazlh8IgAePox0H8 0oBNkRWRWGRsTdFqAIzct07lJ5CrBVEWGK6bvkE+t7wLcx1QGTGU3l+QRlWnhQ6DJ9h1 sCaYePnaQqmxk5qqdCxK2hS9cyotoYnt7Rw/Q/MapbUotge2Bvac35YhFlEfpucpm9NL LaMi/n2EwT+rm4QT48ub4/chxps2SwQ3KqArIOv44xwcq0F0d09I5OyBd2ASJXIp8QVP qpVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=JlpoFqSJ; 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 wr14si12143711ejb.11.2021.04.19.07.15.22; Mon, 19 Apr 2021 07:15:23 -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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=JlpoFqSJ; 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 CC88D688178; Mon, 19 Apr 2021 17:11:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9249B688068 for ; Mon, 19 Apr 2021 17:11:46 +0300 (EEST) Received: by mail-qt1-f173.google.com with SMTP id d6so7851143qtx.13 for ; Mon, 19 Apr 2021 07:11:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=O/U4sFlZKBCNdIqrB0s4/dBUcS38a//AJptspK05+qA=; b=JlpoFqSJTIFJjeThge6G0tYiXYdMBNcXAiLu5P0erKBR2lKLg0e8BUsB5fNGfggkn/ z3z0He9wwhycL0zrvvdscqh9f9BTTm0bw7motJOmfLqwL82sqwre82HmgtOVRCCr68Lo V+86D/ijltCUwl0M+jabHF7Ld3PeP1EJ4jwWe8ioO5BEHjoUsjkPSaBMefUr6amcRYt8 Z9UJa5g9URDuhE1ih7XF1EDaANfQdDHnSyXUt2iPD5Y527ZtHlhyz7CerHLR66i4c6SJ 4PeMnIJkXlfipct78nuv0XtXYsQSiDmXODSO3fMUHvSI1rpBbxpo0DG2YhrxOIHlwYCf x0Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=O/U4sFlZKBCNdIqrB0s4/dBUcS38a//AJptspK05+qA=; b=fg6YoFgps9a1TsdAf1I9t/3CFa3ODvf+9wpFj8JZlZNDuXChFZr2bK8oFJHC32N9Gv aQGMq8X419M4uCJCc4z7aNlHtM1JClKxwabTCSlmUpXcudaUEnubJlJMl/iF/KYsuOjx ZWvC/OadkqprhcKtX/BqCVZRQEpzCpK/FKLpcuAbmVm6DExSKGFuQEORFTKDuhG1Kwx6 fpmcgNzeNJwZ79FsWXAr4sSrVH2wJRf6P8TDyuMIxcObX/h/CvGLoOAuhF+h64iLqWic PizKn4TIC3yvFVec+Yw523WOTtGNnBmhUrgE9cMU4b5njKSoPxsHrRNEXFXOr/HganvI 7GNw== X-Gm-Message-State: AOAM530NdQitSNy1AjwpCmfa59IeSdOx1hvDUuCfoBucWTOqtr86SRo2 Q/UrysCtV30cI1dQNkKnlvrgzGD/ZCE= X-Received: by 2002:ac8:58c2:: with SMTP id u2mr11834275qta.209.1618841504704; Mon, 19 Apr 2021 07:11:44 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:44 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:33 -0300 Message-Id: <20210419141024.8174-37-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 36/87] avformat: Remove getters and setters 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: ahPllZiR1+HX From: Andreas Rheinhardt Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.h | 48 ------------------------------------------ libavformat/utils.c | 18 ---------------- libavformat/version.h | 3 --- 3 files changed, 69 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 14063ac5e5..d629eaae5d 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1086,17 +1086,6 @@ typedef struct AVStream { AVStreamInternal *internal; } AVStream; -#if FF_API_FORMAT_GET_SET -/** - * Accessors for some AVStream fields. These used to be provided for ABI - * compatibility, and do not need to be used anymore. - */ -attribute_deprecated -AVRational av_stream_get_r_frame_rate(const AVStream *s); -attribute_deprecated -void av_stream_set_r_frame_rate(AVStream *s, AVRational r); -#endif - struct AVCodecParserContext *av_stream_get_parser(const AVStream *s); /** @@ -1807,43 +1796,6 @@ typedef struct AVFormatContext { int max_probe_packets; } AVFormatContext; -#if FF_API_FORMAT_GET_SET -/** - * Accessors for some AVFormatContext fields. These used to be provided for ABI - * compatibility, and do not need to be used anymore. - */ -attribute_deprecated -int av_format_get_probe_score(const AVFormatContext *s); -attribute_deprecated -AVCodec * av_format_get_video_codec(const AVFormatContext *s); -attribute_deprecated -void av_format_set_video_codec(AVFormatContext *s, AVCodec *c); -attribute_deprecated -AVCodec * av_format_get_audio_codec(const AVFormatContext *s); -attribute_deprecated -void av_format_set_audio_codec(AVFormatContext *s, AVCodec *c); -attribute_deprecated -AVCodec * av_format_get_subtitle_codec(const AVFormatContext *s); -attribute_deprecated -void av_format_set_subtitle_codec(AVFormatContext *s, AVCodec *c); -attribute_deprecated -AVCodec * av_format_get_data_codec(const AVFormatContext *s); -attribute_deprecated -void av_format_set_data_codec(AVFormatContext *s, AVCodec *c); -attribute_deprecated -int av_format_get_metadata_header_padding(const AVFormatContext *s); -attribute_deprecated -void av_format_set_metadata_header_padding(AVFormatContext *s, int c); -attribute_deprecated -void * av_format_get_opaque(const AVFormatContext *s); -attribute_deprecated -void av_format_set_opaque(AVFormatContext *s, void *opaque); -attribute_deprecated -av_format_control_message av_format_get_control_message_cb(const AVFormatContext *s); -attribute_deprecated -void av_format_set_control_message_cb(AVFormatContext *s, av_format_control_message callback); -#endif - /** * This function will cause global side data to be injected in the next packet * of each stream as well as after any subsequent seek. diff --git a/libavformat/utils.c b/libavformat/utils.c index bb0351d7f5..3643a83632 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -113,17 +113,6 @@ static int64_t wrap_timestamp(const AVStream *st, int64_t timestamp) return timestamp; } -#if FF_API_FORMAT_GET_SET -MAKE_ACCESSORS(AVStream, stream, AVRational, r_frame_rate) -MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, video_codec) -MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, audio_codec) -MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, subtitle_codec) -MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, data_codec) -MAKE_ACCESSORS(AVFormatContext, format, int, metadata_header_padding) -MAKE_ACCESSORS(AVFormatContext, format, void *, opaque) -MAKE_ACCESSORS(AVFormatContext, format, av_format_control_message, control_message_cb) -#endif - int64_t av_stream_get_end_pts(const AVStream *st) { if (st->internal->priv_pts) { @@ -221,13 +210,6 @@ static const AVCodec *find_probe_decoder(AVFormatContext *s, const AVStream *st, return codec; } -#if FF_API_FORMAT_GET_SET -int av_format_get_probe_score(const AVFormatContext *s) -{ - return s->probe_score; -} -#endif - /* an arbitrarily chosen "sane" max packet size -- 50M */ #define SANE_CHUNK_SIZE (50000000) diff --git a/libavformat/version.h b/libavformat/version.h index e264abd77b..67dbff5c56 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -73,9 +73,6 @@ #ifndef FF_API_OLD_ROTATE_API #define FF_API_OLD_ROTATE_API (LIBAVFORMAT_VERSION_MAJOR < 59) #endif -#ifndef FF_API_FORMAT_GET_SET -#define FF_API_FORMAT_GET_SET (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_OLD_AVIO_EOF_0 #define FF_API_OLD_AVIO_EOF_0 (LIBAVFORMAT_VERSION_MAJOR < 59) #endif