From patchwork Mon Dec 7 10:08:40 2020 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: 24386 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 0E24D44B12E for ; Mon, 7 Dec 2020 12:35:08 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D001A689B32; Mon, 7 Dec 2020 12:35:07 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 299B868831D for ; Mon, 7 Dec 2020 12:35:01 +0200 (EET) Received: by mail-ed1-f46.google.com with SMTP id b73so13117211edf.13 for ; Mon, 07 Dec 2020 02:35:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=UAgb1OMzED2lBXa9W4/qz5Uept4rFX8oO4pQr0xzVEg=; b=dzh5oqUTAIOcRqSeO5sCAUzo8IV6OrV5F3pHte4uMBe7p3diBo9/dQ2zcNAooS8YkA 4nlCEJzH2z0T5aPi3uyQgIYC0N+ZkjjkCdXgZGiKKomuraBg8GSJ9AuoTICrS/a6gUQC D0N8ZoIULrGZ8/ltgikh2TrKiY6WkvXSh0aaft+T/99HTnu7hk7sbtdY3x/llLM21SVq GkW70loRy4rllaFrR0XkC0beNss2PRhoVNAEhneEne5smSV+51XFFF6KyPhoeembW4Sn Y8z05EdvbSYZrKXx9xjGsD+IixlPQbICKyBfuzzR/i2LrgejdkFcQrTeS+s0F4D70i1b hXIw== 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:mime-version :content-transfer-encoding; bh=UAgb1OMzED2lBXa9W4/qz5Uept4rFX8oO4pQr0xzVEg=; b=hCUKzr8kunMstkn7ApxTvQ31D6P6BUlnQ4en8MepxPYD50g7g/sL4TLUGkAF9Y3ob1 iIyciGyf+dNOl/0ECTh9R6byfcODzFhOBgUCXry7oVVoAw8yScb4ffPMGHAOVwlhHtCx fjEPm/3QW9DmcbE56J83PZ80fNDKGBOKMqsn3cX6H0aMT+l3fWg9oEcVNnp5TnEenm4o 2Oa4qEwmBRWhmgYQz7bYEgcYYWcFxbT3dZP2G3aXSkoCelOZKnSD4TWiBixJ2n4oYWDh dTq6vdca/xnnBkji1uiusNF72Fc9k4nffDHluYPR5/MdsFooNkR+6h8QaCkN+vrN/dtk s8tQ== X-Gm-Message-State: AOAM5324ERDSD+8HLE8Gev6QJ2ubCZDmSM2oBNOxPlETyuk73MMEUpj1 rRZDd4dfx46pqDtcpPklY1B0640/fHLkYg== X-Google-Smtp-Source: ABdhPJxIr0ASYBkiSHsSetCsUjAeRSepef/5XZoQFvKKCRSj5DeKBPoiWolLOGuBy4ZPsFfPqbv3Ng== X-Received: by 2002:a2e:9bd2:: with SMTP id w18mr8362274ljj.312.1607335729246; Mon, 07 Dec 2020 02:08:49 -0800 (PST) Received: from localhost.localdomain (91-159-194-103.elisa-laajakaista.fi. [91.159.194.103]) by smtp.gmail.com with ESMTPSA id v5sm45061ljj.135.2020.12.07.02.08.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 02:08:48 -0800 (PST) From: =?utf-8?q?Jan_Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 7 Dec 2020 12:08:40 +0200 Message-Id: <20201207100845.17520-1-jeebjp@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 0/5] FIFO meta muxer related improvements X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" The primary parts of this are patches 1,4,5. 2 and 3 were just noticed when poking at the recovery timestamp logic, where the stream-time comparison logic seemed somewhat weird (such as comparing the pts to last_recovery_ts only if last_recovery_ts == AV_NOPTS_VALUE). If they seem incorrectly understood, they can be left out. As for the rest of the patches, they address the following issues: 1. Even if the header and the first packet get written out, the muxer might still fail at writing to a server when it actually decides to do I/O. Currently (for example with the MP4 muxer) this leads to a constant retry loop as each recovery is actually "successful". This patch makes sure that even if a recovery is "successful", the following recovery will only happen after the configured time, easing the load on any receiving server. 4. In case of avformat_write_header failing, the fifo muxer until now would not close the avformat context and its underlying I/O. This is now added, so that file sockets do not keep creeping up. 5. Unset a configured codec_tag if it is not supported by the underlying muxer, as the API client has no visibility regarding whether a codec tag is acceptable in cases of meta-muxers such as fifo. Jan Bernard Boulay (1): avformat/fifo: always wait recovery_wait_time between recoveries Jan Ekström (4): avformat/fifo: fix handling of stream-time non-NOPTS recovery avformat/fifo: cause immediate stream-time recovery if time went backwards avformat/fifo: close IO in case header writing fails avformat/fifo: unset codec tag if unsupported by underlying muxer libavformat/fifo.c | 77 ++++++++++++++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 26 deletions(-)