From patchwork Wed Nov 18 16:52:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 23714 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 A4D0D44BB34 for ; Wed, 18 Nov 2020 19:00:47 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 90A5B68B5D6; Wed, 18 Nov 2020 19:00:47 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AF88468A276 for ; Wed, 18 Nov 2020 19:00:40 +0200 (EET) Received: by mail-qt1-f171.google.com with SMTP id j31so2100675qtb.8 for ; Wed, 18 Nov 2020 09:00:40 -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=ZGs6pqVKMLjzFJ7hzWu7DfExMkfJSLfJLAsnxpiezK0=; b=ePDaIy0iPfqtHIYrcyM4x/NVGkUD6WoNhUZSrKPpnXQ8CixYbVcOQyrn9IiQYlSH0w XV1MwstqJkaQMtIdSYQUj6wR2Lzb22X1HLtWsPkioh3luaYosHiyVM10uVLnM2Tw+Tjn 5EAECMVp9DyFkXS+7Lna8jnO8ZRRX2E8+0yRPoP5sHJo/6ySzt+S1iKPenzJHNQfjXs6 /KjgRf01BHvEiDekrsQWA2XCG5qMVnMdwzzKrFzQWK7H8H6MrjQovl1SOa3xhnQpMSEB Sq5eXgNbDGeEdqgrJ/biXSZEjQQhYn7pFssYOYa2gbxfzsIVCHl2mVK6s8nw8K2zjqSK OAhQ== 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=ZGs6pqVKMLjzFJ7hzWu7DfExMkfJSLfJLAsnxpiezK0=; b=thd6/VpgRSg43rtDm9xJZ3BmRKJQ6fIwmnecHpzRJ0Lj1iF9W+PY7juFHkqVM60Qvk LDXQ+ChAeDC7usXZZqily9WjeZb6SBHfzGK/44O3q2o7YKsMFwSSzXbKo8toekY2avUi OAvKbdO7JqW5TEgUUmsOFgaKNTWxKr4zPNup3psR4GbunMBQHeBx7Bto9NlVqKUPNCOc A02bqj93qh3KHd59egheqzxXFMJjim2UTezT+DvfSODvMvdPnPhQv5yxlVLTEGgHGHrr cL+CL3u3Xu23xHE2NFHamIN7NmNrYy/l69p3jJCkYbs1c7OuAxmgq9iBvdiEoK7slilI HBAg== X-Gm-Message-State: AOAM531k7KEFfiOutpmFz8wS0ABdISPZAl3jJF7xPgvD25eh9303YZJx QHRaUe7DeXyLnBWfKxzxo7mnKYKDAOCpGg== X-Google-Smtp-Source: ABdhPJxrSdVmS3tlY30QxhnS8VdmSqELVjvQ0Agc+y46L3QxS+1coegeo3/R5ts7jjn6pZNY1f9vjA== X-Received: by 2002:ac8:5559:: with SMTP id o25mr5032607qtr.138.1605718387032; Wed, 18 Nov 2020 08:53:07 -0800 (PST) Received: from localhost.localdomain ([181.23.91.217]) by smtp.gmail.com with ESMTPSA id f14sm4863788qkk.89.2020.11.18.08.53.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Nov 2020 08:53:05 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 18 Nov 2020 13:52:29 -0300 Message-Id: <20201118165247.4130-1-jamrial@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 00/18] AVPacketList public API 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" This is an attempt at introducing a public packet list API, after the need for it outside of libavformat became evident. It reuses the existing AVPacketList struct by making it opaque, so we can have a head and tail pointers internally instead of having to expose them in a very awkward way in the functions, like it's currently the case with the private packet list functions. Since AVPacketList is already a public struct, the only way to reuse it was by deprecating all of its fields and scheduling making it opaque in a soname bump >= 2 years from now. James Almer (18): avcodec/packet_internal: add a PacketListEntry struct avformat/internal: make last_in_packet_buffer of type PacketListEntry avcodec/avpacket: make avpriv_packet_* use PacketListEntry avcodec/avpacket: add a new public AVPacketList API avcodec/decode: port to the new packet list API avformat: port AVFormatInternal->packet_buffer to the new packet list API avformat: port AVFormatInternal->raw_packet_buffer to the new packet list API avformat: port AVFormatInternal->parse_queue to the new packet list API avdevice/dshow: port to the new packet list API avdevice/decklink_dec: port to the new packet list API avdevice/vfwcap: port to the new packet list API avformat/ttaenc: port to the new packet list API avformat/mp3enc: port to the new packet list API avformat/flacenc: port to the new packet list API avformat/aiffenc: port to the new packet list API avformat/matroskadec: port to the new packet list API avcodec/avpacket: schedule the removal of avpriv_packet_list_* avcodec/avpacket: make the AVPacketList API thread safe libavcodec/avpacket.c | 189 ++++++++++++++++++++++++++++++++-- libavcodec/decode.c | 20 ++-- libavcodec/internal.h | 1 - libavcodec/packet.h | 88 +++++++++++++++- libavcodec/packet_internal.h | 24 ++++- libavcodec/utils.c | 11 +- libavcodec/version.h | 3 + libavdevice/decklink_common.h | 2 +- libavdevice/decklink_dec.cpp | 53 ++++------ libavdevice/dshow.c | 52 +++++----- libavdevice/vfwcap.c | 49 ++++----- libavformat/aiffenc.c | 22 ++-- libavformat/flacenc.c | 13 ++- libavformat/internal.h | 6 +- libavformat/matroskadec.c | 29 +++--- libavformat/mp3enc.c | 13 ++- libavformat/mux.c | 64 +++++++----- libavformat/mxfenc.c | 23 +++-- libavformat/options.c | 13 +++ libavformat/ttaenc.c | 14 +-- libavformat/utils.c | 128 ++++++++++++++++------- 21 files changed, 583 insertions(+), 234 deletions(-)