From patchwork Wed Mar 30 12:17:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Diederick C. Niehorster" X-Patchwork-Id: 35064 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c05:b0:7a:e998:b410 with SMTP id bw5csp774210pzb; Wed, 30 Mar 2022 05:19:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkTB66a07sYs1/3iUQb0bN+gCH1owFdALMlcVowE1wEbQawNVzxmDxTB5iBETJVC5IDU8l X-Received: by 2002:a17:907:3d8e:b0:6e4:93c8:161c with SMTP id he14-20020a1709073d8e00b006e493c8161cmr1477700ejc.330.1648642797868; Wed, 30 Mar 2022 05:19:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648642797; cv=none; d=google.com; s=arc-20160816; b=Uwx43XFltaP313hjNAFmfWp/TPl8gnRlAe/33aq1/iDHQaCXtVH6xGtOTFxLM8A1t3 mGvRNhxAAVU4w9h6jKR1hD/OZ4kWk2PSFQMQ/duAvppOT/XOEU5edeOyAoQJFzCwn85o ZwRjvW7Umw3eIZKz8vIERG8ZH4Wwo0QPNLLlki4s9JeAOAws1VC6nB1o7k04Kf95t71p MgclEsNvPpFUm7tJ4LFOHgPIsE4zbUKKBQVTqzjMkKoTzaASlBmj7/qfTvjU2JbfQoBZ iuoyUzZSWAb6dymWES1R+9y8GBjeKwaIuu1g1Iez5i8m+y7bmGxY8jeE5YEnJt2dFzzf MJ/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc: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=Wf9I93vSS87YGOwE8vL+DkgiYzrNjcq9WncUNDYq9B8=; b=AvKOCNMFcG/z1KtaFsPplr7tYtdEl7WLu8IJOjQA4ITvgPBkLxtVncFMBrfzXlnm49 wiXss9jzyf2wUrO8qWKbxuC6zB1F5WsrJr5UKTsvDzqtZFKhjd8YIGkXHT3lsq1DUDRP F/yfRJHuRFXh+SF9YG6wDlF0k/nbLnpItRaE5lx6LoLSYdptK/ebbXZTGJmhhyKE/sZM VAmHQkbx8G/0ewY1lYgab3cb8kr3ya4KbFgA5KOeQIAvdtQYL9PdW45eDr6QbhDx4zrC 3RYP7SH0Ec2zDvZlyaVRCnBQtteb5mFew+2+TnB18NJLKoBm71ep/lw0YaOLkVCWeXuF AynQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=H4uE6r+X; 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 ky9-20020a170907778900b006df76385f3esi20973514ejc.990.2022.03.30.05.19.57; Wed, 30 Mar 2022 05:19:57 -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=H4uE6r+X; 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 A879E68B24E; Wed, 30 Mar 2022 15:19:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3F90668B24E for ; Wed, 30 Mar 2022 15:19:19 +0300 (EEST) Received: by mail-lj1-f174.google.com with SMTP id q14so27379062ljc.12 for ; Wed, 30 Mar 2022 05:19:19 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=j25lCNGQZtwKoo4/1go0XJp0AHqDV+7EpB4yyI170f8=; b=H4uE6r+XJLLSiiNwVeGyTGXYxWoUn2XSjZYPgd/tJ7e+JYJCbc7iTqv0zove6015Ho XezkoFE9sjSb6YFeo7rnnbhRaLSKsSdujCuz53Q0azfbHdvyNY6aHCs/UHBNIBWp8Xev Mzs3aQHitrd9EkIB9rRWiJG8jTf8Ao5Cup66Khg4Mm7DXEt51sT6Leysvfmyw3LcIypk UvZFt42WwiB9uPcKAzBpYxBkMZ9bCgW+aj8XGrQnd3Nhnx8p62TdJRRB4Ja4cL/EBwtN XwEPa7Rqaou8axO0WT+QeR15tkcFbPwXzQD38i70MQsRtb8dwZP9TEPhQsRzv/NY+1Q8 +XFQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=j25lCNGQZtwKoo4/1go0XJp0AHqDV+7EpB4yyI170f8=; b=Hhy66vl0BTWsGiOs8F1NYG56Gm7ajXz+t+eHiTvfSwIh9zUkwK+Jm1MPX49j6xIaai NupFKapgY628GNeNtwTyzKmBE1j90Gyru8KOcSdld3AuRJVaJpHeAiEt57B6cPA5hHPo RxpaZ13OzBDPk4zEaFg+SCVq2G+3A9rf3Nab5+iUU9xoY4cGaj1Qoli1EPx/DZlzSQIC cL2M5Tv7HFgiR6/9ukIxBzwiMNR/P9VjylJMlRQ3l4NZxmOIXXI2aLu9M7ZByf01h7ay /0YsXTvTFGCpEkbp39Nz63PSgiuc7nFQCvxvmhKmdaRlzvEnyIeLyybDCUkcCCuSObbu pa0A== X-Gm-Message-State: AOAM533himqAY+2zdyYbPWfAZaiEW4pAB+fIpDnxWR5REtUoToHggAyp 4rPpcP7/WQZpc5iLIY0/hcAY9D06/wk= X-Received: by 2002:a2e:551:0:b0:249:7ce6:4577 with SMTP id 78-20020a2e0551000000b002497ce64577mr6483477ljf.184.1648642758977; Wed, 30 Mar 2022 05:19:18 -0700 (PDT) Received: from localhost.localdomain (deedock.humlab.lu.se. [130.235.135.183]) by smtp.gmail.com with ESMTPSA id i15-20020ac25d2f000000b004484a530b07sm2319551lfb.143.2022.03.30.05.19.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 05:19:18 -0700 (PDT) From: Diederick Niehorster To: ffmpeg-devel@ffmpeg.org Date: Wed, 30 Mar 2022 14:17:54 +0200 Message-Id: <20220330121806.822-10-dcnieho@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20220330121806.822-1-dcnieho@gmail.com> References: <20220330121806.822-1-dcnieho@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v5 09/21] avdevice: capabilities API details no longer public 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: Diederick Niehorster Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: W63udL6vwJXM Bumping avdevice major version (API removed, even if it cannot have been used by anyone) Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.c | 2 +- libavdevice/avdevice.h | 28 +--------------------------- libavdevice/internal.h | 33 +++++++++++++++++++++++++++++++++ libavdevice/version.h | 2 +- libavdevice/version_major.h | 2 +- 5 files changed, 37 insertions(+), 30 deletions(-) diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c index 2e8261e0d2..1cc9cd3923 100644 --- a/libavdevice/avdevice.c +++ b/libavdevice/avdevice.c @@ -34,7 +34,7 @@ const char av_device_ffversion[] = "FFmpeg version " FFMPEG_VERSION; #define V AV_OPT_FLAG_VIDEO_PARAM #define OFFSET(x) offsetof(AVDeviceCapabilitiesQuery, x) -const AVOption av_device_capabilities[] = { +const AVOption ff_device_capabilities[] = { { "codec", "codec", OFFSET(codec), AV_OPT_TYPE_INT, {.i64 = AV_CODEC_ID_NONE}, AV_CODEC_ID_NONE, INT_MAX, E|D|A|V }, { "sample_format", "sample format", OFFSET(sample_format), AV_OPT_TYPE_SAMPLE_FMT, diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h index 9724e7edf5..6d45c74616 100644 --- a/libavdevice/avdevice.h +++ b/libavdevice/avdevice.h @@ -416,33 +416,7 @@ int avdevice_dev_to_app_control_message(struct AVFormatContext *s, * avformat_free_context(oc); * @endcode */ - -/** - * Structure describes device capabilities. - * - * It is used by devices in conjunction with av_device_capabilities AVOption table - * to implement capabilities probing API based on AVOption API. Should not be used directly. - */ -typedef struct AVDeviceCapabilitiesQuery { - const AVClass *av_class; - AVFormatContext *device_context; - enum AVCodecID codec; - enum AVSampleFormat sample_format; - enum AVPixelFormat pixel_format; - int sample_rate; - int channels; - int64_t channel_layout; - int window_width; - int window_height; - int frame_width; - int frame_height; - AVRational fps; -} AVDeviceCapabilitiesQuery; - -/** - * AVOption table used by devices to implement device capabilities API. Should not be used by a user. - */ -extern const AVOption av_device_capabilities[]; +typedef struct AVDeviceCapabilitiesQuery AVDeviceCapabilitiesQuery; /** * Initialize capabilities probing API based on AVOption API. diff --git a/libavdevice/internal.h b/libavdevice/internal.h index 67c90e1f87..bef3a4bd2d 100644 --- a/libavdevice/internal.h +++ b/libavdevice/internal.h @@ -19,10 +19,43 @@ #ifndef AVDEVICE_INTERNAL_H #define AVDEVICE_INTERNAL_H +#include "libavutil/log.h" +#include "libavutil/opt.h" +#include "libavutil/pixfmt.h" +#include "libavutil/rational.h" +#include "libavutil/samplefmt.h" +#include "libavcodec/codec_id.h" #include "libavformat/avformat.h" av_warn_unused_result int ff_alloc_input_device_context(struct AVFormatContext **avctx, const AVInputFormat *iformat, const char *format); +/** + * Structure describes device capabilities. + * + * It is used by devices in conjunction with ff_device_capabilities AVOption table + * to implement capabilities probing API based on AVOption API. + */ +struct AVDeviceCapabilitiesQuery { + const AVClass *av_class; + AVFormatContext *device_context; + enum AVCodecID codec; + enum AVSampleFormat sample_format; + enum AVPixelFormat pixel_format; + int sample_rate; + int channels; + int64_t channel_layout; + int window_width; + int window_height; + int frame_width; + int frame_height; + AVRational fps; +}; + +/** + * AVOption table used by devices to implement device capabilities API. + */ +extern const AVOption ff_device_capabilities[]; + #endif diff --git a/libavdevice/version.h b/libavdevice/version.h index 7c132f2174..09156778db 100644 --- a/libavdevice/version.h +++ b/libavdevice/version.h @@ -30,7 +30,7 @@ #include "version_major.h" -#define LIBAVDEVICE_VERSION_MINOR 9 +#define LIBAVDEVICE_VERSION_MINOR 1 #define LIBAVDEVICE_VERSION_MICRO 100 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ diff --git a/libavdevice/version_major.h b/libavdevice/version_major.h index d255ff6992..b32de7325d 100644 --- a/libavdevice/version_major.h +++ b/libavdevice/version_major.h @@ -25,7 +25,7 @@ * Libavdevice version macros */ -#define LIBAVDEVICE_VERSION_MAJOR 59 +#define LIBAVDEVICE_VERSION_MAJOR 60 /** * FF_API_* defines may be placed below to indicate public API that will be