From patchwork Wed Oct 13 21:10:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jan_Ekstr=C3=B6m?= X-Patchwork-Id: 31106 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2084:0:0:0:0 with SMTP id a4csp6437502ioa; Wed, 13 Oct 2021 14:10:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0LC9yFO+kHwPCghkPtVUgdCSZOnDyZeUSoh71ioT+NxRoFD9B94ASNpLjWydkifg+/84a X-Received: by 2002:a05:6402:35d6:: with SMTP id z22mr2507186edc.227.1634159455059; Wed, 13 Oct 2021 14:10:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634159455; cv=none; d=google.com; s=arc-20160816; b=Hyja2jZdsEDsJtHc05A/sYWQEEViGTxjyiAIz01HLMIZ2EEPfmNgSTFYvVzuJNopAf yrUMKzlQ5S+GIWqAMi6GenK/GyEvipGHkz0EZ2/O787XkXS1zG1zAU3G3vfzKPw5zPUA se/kNDH9O1oFhM1fEeoxXncYOIbvarQy26DBkUcVSZ5Sw/DfOQy1PQl2BT3srdWpU6tB 7ZQgp/yGEW/cukq0HAhs5MfICSkN0MXmfmhDn9SYBqtz8twIkvW+A5d6xG/KYxq6Ayob MGqnNMQ1R5H3e+NycFlk5atbsauqqCYnJAAuh8zcwYatmYmFdH8Nx9ip8//l3rVn+vzy o8WA== 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:message-id:date:to:from :dkim-signature:delivered-to; bh=rdOs7D1q7NCuU3+MGUlJVwF58gN6bzWSvgVNELTqAqE=; b=pPAbnQEwhXgO2l/foBsbChimY9r7AdJ0eI3iURvDWDDLYY6AI+fR3Rp9RcY0BIiDtm ghqPL1QaxZnmw7a6F9Wcfdn4tnTIMhziNMCeCnEHcMr8BTsQjN0zObGf4r4O1c/WPe4R 6rNPPy9oHqu8ZpvwQQW9bk6F8wkuwfv4Ai+ZYbrmDFYB3Ja9TiLvoGMO9vpmifH7KPWL Ye7SmziON0LF/XpPculHflSFVN1cZe5o4ll4Yik/9DzYUE3473SSlPLqFKtic1p68W+1 VGDlrJ3e+Bj9hEYF/gpTdAnkRzHFtlVkjWMxBu8Ti1m11AtEIX0XuzSI0InbeqsxCu7o TRUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=meeSyDkW; 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 r14si975723ejc.394.2021.10.13.14.10.54; Wed, 13 Oct 2021 14:10:55 -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=20210112 header.b=meeSyDkW; 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 C740168A98D; Thu, 14 Oct 2021 00:10:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8271B68A94E for ; Thu, 14 Oct 2021 00:10:44 +0300 (EEST) Received: by mail-lf1-f49.google.com with SMTP id t9so17415052lfd.1 for ; Wed, 13 Oct 2021 14:10:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=3aBB81rEGd8Iyj4Dublrlakdff8fzC2D/20470whyi8=; b=meeSyDkWow+gfPrRZseKwyjbvGvPH3LU2gO6XgX8s6MjGO/tD/t/4s+xNhakLZY4kW FF5YllHQRBPqxQvKWlue/ry2OLhlTHFD3BuxOpO01hAwZXWVQ/dXDRyQbJn35VJ8WT11 FHYvt6vCg8TGbSAgChJukjBGdFTCX/a86mawd9NdR1Szi7gDo2MT65suTVwurdpwcHup /RorYsIVy/JiruXHIMpHMP9CvB2H00Nl7rfxDbuaq0Bm2Gqf4dbO5sdIfcYU6D06uRBG fJLF0h7JaWq9PB2ignsmFB8YI94NrZ6Ldyou87gZh68/HNnX7v65wJuhKnBQbypnz/+a AXzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=3aBB81rEGd8Iyj4Dublrlakdff8fzC2D/20470whyi8=; b=YiyanRmctNMHZlHm7HmrYSCPkTBzIiWGFMPfOmNK5dfB8/n5cysjqAZ90FCUtpL5CK zSh5ptDHe6h747OPdOFMENY4wVCEba22SmGXic59HIgtrmh46LpSCy642mIUDBG7XCOl Nz4j+ThGaXlDJvY4LRDzhRT6rjO/YttwL1TdKw65OaddnrxDpj051Q98oI6q5mo8VUoP c4o7joT0CMDZIA4/NYNsF9ohIeeisq4o1Sgti4MzvRNlLQ+rSdyj/jCE2si3KNxi2CGU fMx4IOE3hlZzezMqvBM+j92nnZWR3Bm2eWo+kT3vxnp4hKBIdf9TFsWbAzgN69I7QFvX 02qQ== X-Gm-Message-State: AOAM530uesaEOfbXsnEQzoN8NKhKDjJPTcA+Qzn3nC9sjtIU7br2EbDQ Iy//AHxbpXZkzIEwRjn8m1zS97E0WnE= X-Received: by 2002:a19:fc09:: with SMTP id a9mr1240835lfi.302.1634159443688; Wed, 13 Oct 2021 14:10:43 -0700 (PDT) Received: from localhost.localdomain (91-159-194-103.elisa-laajakaista.fi. [91.159.194.103]) by smtp.gmail.com with ESMTPSA id s4sm49176lfd.103.2021.10.13.14.10.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 14:10:43 -0700 (PDT) From: =?utf-8?q?Jan_Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Thu, 14 Oct 2021 00:10:35 +0300 Message-Id: <20211013211038.13391-1-jeebjp@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 0/3] introduce public AVIOContext::bytes_{read, written} 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: V5yUz76Mo/62 After a brief discussion with Michael on IRC, this seems to be the idea of a path forward that was agreed upon. 1. AVIOContext::written was supposed to be a private field [1], so move the value utilized internally to FFIOContext, and set the AVIOContext value from there. 2. Introduce public AVIOContext::bytes_{read,written} statistics fields. 3. Deprecate AVIOContext::written. I was not sure whether deprecation or straight-out removal was the right thing to do - since while the field was meant to be internal it was not marked as such in FFmpeg's merged state of the struct (which is why it did not get cleaned up into FFIOContext earlier) - but in order to not get stuck on that, I am now posting this with the full deprecation changes. This way (hopefully) this change will get more eyeballs and if someone thinks this could just be removed the patches can be changed to do that instead. [1] http://git.videolan.org/?p=ffmpeg.git;a=commit;h=3f75e5116b900f1428aa13041fc7d6301bf1988a Best regards, Jan Jan Ekström (3): avformat/avio: privatize point of truth for AVIOContext::written avformat/avio{,buf}: introduce public AVIOContext::bytes_{read,written} avformat/avio{,buf}: deprecate AVIOContext::written doc/APIchanges | 12 ++++++++++++ libavformat/avio.h | 16 ++++++++++++++++ libavformat/avio_internal.h | 5 +++++ libavformat/aviobuf.c | 22 ++++++++++++++++++---- libavformat/version.h | 5 ++++- 5 files changed, 55 insertions(+), 5 deletions(-)