From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 3A18142AA5 for ; Tue, 12 Apr 2022 15:53:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4D84F68B28D; Tue, 12 Apr 2022 18:53:33 +0300 (EEST) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CBEDA68ABA7 for ; Tue, 12 Apr 2022 18:53:27 +0300 (EEST) Received: by mail-wm1-f43.google.com with SMTP id u17-20020a05600c211100b0038eaf4cdaaeso2097111wml.1 for ; Tue, 12 Apr 2022 08:53:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=q8iLm603flV2qlOThxwlHVWcGQ1YPx1ZF2OKR2cpKek=; b=qxst31XX5jF73prHzvvPP6aE0hgqb1quY1kNbQx5XQB7VYB7apDfJu/UgL+25e0eJM TOmCwWbVJZq2UBou/vjynsN/lAQ0F9bimgLB5VrEnkdzryBY+PZb6mxMuBNKwFY3PBx8 pT7gUll8Twsses5dKr3ykviWCv669dJd3Bspu7IaZQbxdiZ/TuvWbRwlxrMozv7fRZ+8 68kGaSmwd8LIhzaa7KJ9BwaobS7QTxp2nt4Lrp6t1vdM7y5ncRZz/o8r4+5jCTiyLSrG 3K3HpMlBskxgc4Uiyzp7QPogEw0SfWZE0BnymYmciMTt1xolTlypZYgE52XeRR6soTnd Q9wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=q8iLm603flV2qlOThxwlHVWcGQ1YPx1ZF2OKR2cpKek=; b=n7jZ5ravXDX1cuGsWsmARpse+gbUkmqL01r1w1FzWsFj1ygu+blORKMc1QfoGKQVyD 2eHJWxFEh27lWitFEMyUHAaCP1A73/sRCaU93tgstKMuktF5qoW2/6DHUh/lkEBBL/DC yGiDAauX7erSwsruHud5mGwd/JI1Fj2VSvTbn7OJ244NLGGHGzfY+Kqo9Jrp8AFecubh W7Fh+ZZDaduXwS3+Y/nzKUEXW//nOkezpbQTn5xGiA6ElJCKcvt+/5vuKYc7sFPPnfve LJ3/qvlqIc95aLX0i8L3TFtTPKcIbybhc5a9fHo/zlq0mXAopPjyfFfSGUje+Iq39zbO zctQ== X-Gm-Message-State: AOAM531bXDaQkMete1yPhJpJrblV2KOkNRhUwplFJ3TXM1+WDh/02/1z TfOlxmY6wdyBCrv1+9m+mR/UTYpE3YI= X-Google-Smtp-Source: ABdhPJxCpo13E4YADoGrqRu4wtw9ov/mGV/feeRLcmdAyFuVcQ7wQe3BpOFuT9q63yckVwmc3lM1Ig== X-Received: by 2002:a1c:35c1:0:b0:38e:c4f6:1931 with SMTP id c184-20020a1c35c1000000b0038ec4f61931mr4573626wma.161.1649778806687; Tue, 12 Apr 2022 08:53:26 -0700 (PDT) Received: from localhost.localdomain (2a01cb04051815002a7fcffffe8ae6ac.ipv6.abo.wanadoo.fr. [2a01:cb04:518:1500:2a7f:cfff:fe8a:e6ac]) by smtp.gmail.com with ESMTPSA id n2-20020adfb742000000b00205eda3b3c1sm31264590wre.34.2022.04.12.08.53.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 08:53:26 -0700 (PDT) From: xademax@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Tue, 12 Apr 2022 17:53:14 +0200 Message-Id: <20220412155316.22417-1-xademax@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 0/2] Add common V4L2 request API code 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 Cc: Elie ROUDNINSKI Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Elie ROUDNINSKI This is the second iteration of https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=2898 but only covering the common V4L2 request API code without the support for h264 codec. Changes in v2: * Addressed some styling comments * Removed libudev dependency * Device probing has been refactored This code (in one version or another) has been widely used by various projects like LibreELEC[1] for several years already. The uAPI has been stable for several kernel versions too and as of linux5.17, the following codecs are available: * mpeg2 * h264 * vp9 HEVC is in the process of being stabilized too[2]. I have tried to contact the original author of the code but I haven't got an answer so far so I have kept them as commit author but added myself as co-author since I have made substantial modifications to it. Happy to change this either way. It's my first contribution to FFmpeg, so I hope to have done everything right. Additionally, I must confess that I am not an expert of the V4L2 request APIs but since I was frustrated of not being able to use standard FFmpeg on my ARM boards to get hardware decoding working, I figured I might just try to give it a go. There are several comments in the original patch series that I won't have an answer for but I hope that won't be a blocker. That's also why the v4l2-request configure option has been marked as experimental. [1] https://github.com/LibreELEC/LibreELEC.tv/tree/master/packages/multimedia/ffmpeg/patches/v4l2-request [2] https://patchwork.kernel.org/project/linux-media/list/?series=630077 Jonas Karlman (2): avutil/buffer: add av_buffer_pool_flush() avcodec: add common V4L2 request API code configure | 7 + doc/APIchanges | 3 + libavcodec/Makefile | 3 +- libavcodec/hwconfig.h | 2 + libavcodec/v4l2_buffers.c | 8 +- libavcodec/v4l2_context.c | 80 ++-- libavcodec/v4l2_context.h | 5 +- libavcodec/v4l2_device.c | 229 ++++++++++ libavcodec/v4l2_device.h | 60 +++ libavcodec/v4l2_m2m.c | 119 ++--- libavcodec/v4l2_m2m.h | 4 +- libavcodec/v4l2_m2m_dec.c | 10 +- libavcodec/v4l2_m2m_enc.c | 8 +- libavcodec/v4l2_request.c | 892 ++++++++++++++++++++++++++++++++++++++ libavcodec/v4l2_request.h | 87 ++++ libavutil/buffer.c | 7 + libavutil/buffer.h | 5 + libavutil/version.h | 4 +- 18 files changed, 1399 insertions(+), 134 deletions(-) create mode 100644 libavcodec/v4l2_device.c create mode 100644 libavcodec/v4l2_device.h create mode 100644 libavcodec/v4l2_request.c create mode 100644 libavcodec/v4l2_request.h -- 2.35.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".