From patchwork Mon Apr 19 14:09:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27030 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp560775iob; Mon, 19 Apr 2021 07:17:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIUbV/hqhzu8tdaf35c5weeRA1wRHSLD1ylIDfLe6YX+UKEDQUrHZgqYHG7QJjWmc/Ozfq X-Received: by 2002:a05:6402:646:: with SMTP id u6mr25732352edx.74.1618841858295; Mon, 19 Apr 2021 07:17:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841858; cv=none; d=google.com; s=arc-20160816; b=iaYvBBCjmpkUcpr11+lF+3q2vRpZzJ4Wj7u9ExNaMxiZeRBvMtUxxdy6N+4MV3MdXS tEvH1saVtQSZJT4HD6ZaEjoAr1RuzMLyDKB/pze6/8DgSCU8Db6ZRYDpZTz95KZS1wrN hbc6XLQB9rR2FsH5UUOwSKMnfR25tUThZXN+GhjydWBhj8uMuiQ9FLlkPfQGXreWvjyT SPMEm+s7kwBU6jrS/K73jVJ6u3NOFJRoWRU3mGovq3cHSL9BgEYmG0jEr+oOTNoOoktA KCOcgNeujrLfcdHnRQ9yopVF1ubhSVsftFYWvOyIJr7DnX+RdHbuZIDRlSlL7+L81Kmd /StA== 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=FgEE7zAFJpxMjTRKbfoe8JxwWBpdba/KV5rA8DjwzsM=; b=WtOoMUbv8pS58Yroz9AaGTU2Sgyylkth0j/nAUuZ6oDYwHyhHNiu0tRA0L6tlOKnHw 1vfpj3z5APhaikYN/KfG0OjtJxiz1xeRSaAFPbDYd7vMHzu3MrEKt3IujKTUnq6DLlPF KqCkSJmsIldlCII8wxRvEP7HoJvKk2vSdPFZH7QpcJ2BuFeU7cGv29Y4ehDPoGnkMndW vWctQevYLhF82VRqTRYGsVNMhL9cLAXHH95frWEtia2WS3r9xrSY1LnBGVCMrm6ULPN5 ZDYsQgO6c7vmUgKSuIyWaLGT8En9rqnp34gm2gTBwsxm17Dn0PTQtl6LoajuCodNyS7F WxEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="OOB/JWUE"; 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 z22si14858582edm.203.2021.04.19.07.17.37; Mon, 19 Apr 2021 07:17:38 -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="OOB/JWUE"; 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 1199068991B; Mon, 19 Apr 2021 17:12:05 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 497526898DF for ; Mon, 19 Apr 2021 17:12:00 +0300 (EEST) Received: by mail-qt1-f174.google.com with SMTP id u8so26075027qtq.12 for ; Mon, 19 Apr 2021 07:12:00 -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=wya30g0x9woxyxxCejN4hh+DIdxBU2uwVFCwlAZkVIE=; b=OOB/JWUEwmTZaKfU78QkqZcjHkLpwPWSKC/9UFsMb6q1jbSJOlQDqIn/vKn4MJjs8W e+kqWknpE1Ou4rgeTiaHivPjknkpSIhICntC03f29RpKejY9LgBnJEB9ncMp4p2cfhXj +Cy47a/vh5hZtoWnC1d0N2VVUOFXyU2lEROXI3AaJWZ+gSsjAjz0rFr/q1ragVKiFFKG yCTgiY2TJKnPs1t37E+IjyNAby1+Is9+8D2slhfdWyuOCtYgh2jMXpox3yhNk4Ux6E48 mwRMzwby06thgGwrsga4B9Q8JxbxBrtS8H9cbO6iBkavEHe4g764pJQlx3B+J24fLEZR 7qZg== 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=wya30g0x9woxyxxCejN4hh+DIdxBU2uwVFCwlAZkVIE=; b=j8mrZXJ78lpAJo5upiB7XirAMn8dyfQOB2u1f1exZQdTOpuf96mP2o0ZZWX2vTZyOS fVVsDxl2bN3IcV7ZQQRQchwClzaNu4ESx+8qc4iB/jYUERLsl7qCUqbeAX1iPj0Yd4+l X3Zaj5wJYz7yB6CHHNkwuT/aej9rB58TqSkcmnt1hPWM3nUWArCevO0ArJ5tm2vcynwF WSYIsoFwjV6MwOD/czFzVSiTCUOxfjo16wHCtFsC/9P6IjvCUdjuzjFdm5HW6zLge5dH TopFpk2t5krq/HqCw+7r/BvAwta98usP8Kvjr51NiFpOdtycxg2TRqGYkOVsmm3KGtKV /QCg== X-Gm-Message-State: AOAM5319wtwpk39fw4P2lcoRxlP5JXIUPWc7MDylWOQ6cAEVHleRMjyH Qn5JSpFvkeX+vgOLRGWxoaitmWyYNHw= X-Received: by 2002:a05:622a:11cd:: with SMTP id n13mr12110357qtk.37.1618841519618; Mon, 19 Apr 2021 07:11:59 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:58 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:45 -0300 Message-Id: <20210419141024.8174-49-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 48/87] avformat: Remove deprecated av_demuxer_open() 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: eLtFc7qZvzbt From: Andreas Rheinhardt Deprecate in e37f161e66e042d6c2c7470c4d9881df9427fc4a. Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.h | 10 +--------- libavformat/utils.c | 29 ----------------------------- libavformat/version.h | 3 --- 3 files changed, 1 insertion(+), 41 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 6658a0f315..272370db2a 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1276,7 +1276,7 @@ typedef struct AVFormatContext { #define AVFMT_FLAG_BITEXACT 0x0400 #define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down) #if FF_API_LAVF_PRIV_OPT -#define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (deprecated, will do nothing once av_demuxer_open() is removed) +#define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (deprecated, does nothing) #endif #define AVFMT_FLAG_FAST_SEEK 0x80000 ///< Enable fast, but inaccurate seeks for some formats #define AVFMT_FLAG_SHORTEST 0x100000 ///< Stop muxing when the shortest stream stops. @@ -2017,14 +2017,6 @@ int av_probe_input_buffer(AVIOContext *pb, const AVInputFormat **fmt, int avformat_open_input(AVFormatContext **ps, const char *url, const AVInputFormat *fmt, AVDictionary **options); -#if FF_API_DEMUXER_OPEN -/** - * @deprecated Use an AVDictionary to pass options to a demuxer. - */ -attribute_deprecated -int av_demuxer_open(AVFormatContext *ic); -#endif - /** * Read packets of a media file to get stream information. This * is useful for file formats with no headers such as MPEG. This diff --git a/libavformat/utils.c b/libavformat/utils.c index d8b44ce896..ba664f6214 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -370,27 +370,6 @@ FF_ENABLE_DEPRECATION_WARNINGS /************************************************************/ /* input media file */ -#if FF_API_DEMUXER_OPEN -int av_demuxer_open(AVFormatContext *ic) { - int err; - - if (ic->format_whitelist && av_match_list(ic->iformat->name, ic->format_whitelist, ',') <= 0) { - av_log(ic, AV_LOG_ERROR, "Format not on whitelist \'%s\'\n", ic->format_whitelist); - return AVERROR(EINVAL); - } - - if (ic->iformat->read_header) { - err = ic->iformat->read_header(ic); - if (err < 0) - return err; - } - - if (ic->pb && !ic->internal->data_offset) - ic->internal->data_offset = avio_tell(ic->pb); - - return 0; -} -#endif /* Open input file and probe the format if necessary. */ static int init_input(AVFormatContext *s, const char *filename, AVDictionary **options) @@ -603,11 +582,7 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, if (s->pb) ff_id3v2_read_dict(s->pb, &s->internal->id3v2_meta, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta); -#if FF_API_DEMUXER_OPEN - if (!(s->flags&AVFMT_FLAG_PRIV_OPT) && s->iformat->read_header) -#else if (s->iformat->read_header) -#endif if ((ret = s->iformat->read_header(s)) < 0) goto fail; @@ -636,11 +611,7 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, if ((ret = avformat_queue_attached_pictures(s)) < 0) goto close; -#if FF_API_DEMUXER_OPEN - if (!(s->flags&AVFMT_FLAG_PRIV_OPT) && s->pb && !s->internal->data_offset) -#else if (s->pb && !s->internal->data_offset) -#endif s->internal->data_offset = avio_tell(s->pb); s->internal->raw_packet_buffer_remaining_size = RAW_PACKET_BUFFER_SIZE; diff --git a/libavformat/version.h b/libavformat/version.h index 7ce6660f43..70ac403a53 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -58,9 +58,6 @@ #ifndef FF_API_LAVF_AVCTX #define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59) #endif -#ifndef FF_API_DEMUXER_OPEN -#define FF_API_DEMUXER_OPEN (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_CHAPTER_ID_INT #define FF_API_CHAPTER_ID_INT (LIBAVFORMAT_VERSION_MAJOR < 59) #endif