Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Anton Khirnov <anton@khirnov.net>
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH v2 24/33] avdevice: remove FF_API_DEVICE_CAPABILITIES
Date: Sat,  4 Feb 2023 11:41:55 +0100
Message-ID: <20230204104204.20721-25-anton@khirnov.net> (raw)
In-Reply-To: <20230204104204.20721-1-anton@khirnov.net>

From: James Almer <jamrial@gmail.com>

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavdevice/avdevice.c      |  19 ------
 libavdevice/avdevice.h      | 130 ------------------------------------
 libavdevice/version_major.h |   1 -
 3 files changed, 150 deletions(-)

diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c
index b47f89c4bf2..38110ddfdb2 100644
--- a/libavdevice/avdevice.c
+++ b/libavdevice/avdevice.c
@@ -21,12 +21,6 @@
 #include "internal.h"
 #include "libavformat/mux.h"
 
-#if FF_API_DEVICE_CAPABILITIES
-const AVOption av_device_capabilities[] = {
-    { NULL }
-};
-#endif
-
 int avdevice_app_to_dev_control_message(struct AVFormatContext *s, enum AVAppToDevMessageType type,
                                         void *data, size_t data_size)
 {
@@ -43,19 +37,6 @@ int avdevice_dev_to_app_control_message(struct AVFormatContext *s, enum AVDevToA
     return s->control_message_cb(s, type, data, data_size);
 }
 
-#if FF_API_DEVICE_CAPABILITIES
-int avdevice_capabilities_create(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s,
-                                 AVDictionary **device_options)
-{
-    return AVERROR(ENOSYS);
-}
-
-void avdevice_capabilities_free(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s)
-{
-    return;
-}
-#endif
-
 int avdevice_list_devices(AVFormatContext *s, AVDeviceInfoList **device_list)
 {
     int ret;
diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h
index 185593053f7..887fd5e3c80 100644
--- a/libavdevice/avdevice.h
+++ b/libavdevice/avdevice.h
@@ -327,136 +327,6 @@ int avdevice_dev_to_app_control_message(struct AVFormatContext *s,
                                         enum AVDevToAppMessageType type,
                                         void *data, size_t data_size);
 
-#if FF_API_DEVICE_CAPABILITIES
-/**
- * Following API allows user to probe device capabilities (supported codecs,
- * pixel formats, sample formats, resolutions, channel counts, etc).
- * It is build on top op AVOption API.
- * Queried capabilities make it possible to set up converters of video or audio
- * parameters that fit to the device.
- *
- * List of capabilities that can be queried:
- *  - Capabilities valid for both audio and video devices:
- *    - codec:          supported audio/video codecs.
- *                      type: AV_OPT_TYPE_INT (AVCodecID value)
- *  - Capabilities valid for audio devices:
- *    - sample_format:  supported sample formats.
- *                      type: AV_OPT_TYPE_INT (AVSampleFormat value)
- *    - sample_rate:    supported sample rates.
- *                      type: AV_OPT_TYPE_INT
- *    - channels:       supported number of channels.
- *                      type: AV_OPT_TYPE_INT
- *    - channel_layout: supported channel layouts.
- *                      type: AV_OPT_TYPE_INT64
- *  - Capabilities valid for video devices:
- *    - pixel_format:   supported pixel formats.
- *                      type: AV_OPT_TYPE_INT (AVPixelFormat value)
- *    - window_size:    supported window sizes (describes size of the window size presented to the user).
- *                      type: AV_OPT_TYPE_IMAGE_SIZE
- *    - frame_size:     supported frame sizes (describes size of provided video frames).
- *                      type: AV_OPT_TYPE_IMAGE_SIZE
- *    - fps:            supported fps values
- *                      type: AV_OPT_TYPE_RATIONAL
- *
- * Value of the capability may be set by user using av_opt_set() function
- * and AVDeviceCapabilitiesQuery object. Following queries will
- * limit results to the values matching already set capabilities.
- * For example, setting a codec may impact number of formats or fps values
- * returned during next query. Setting invalid value may limit results to zero.
- *
- * Example of the usage basing on opengl output device:
- *
- * @code
- *  AVFormatContext *oc = NULL;
- *  AVDeviceCapabilitiesQuery *caps = NULL;
- *  AVOptionRanges *ranges;
- *  int ret;
- *
- *  if ((ret = avformat_alloc_output_context2(&oc, NULL, "opengl", NULL)) < 0)
- *      goto fail;
- *  if (avdevice_capabilities_create(&caps, oc, NULL) < 0)
- *      goto fail;
- *
- *  //query codecs
- *  if (av_opt_query_ranges(&ranges, caps, "codec", AV_OPT_MULTI_COMPONENT_RANGE)) < 0)
- *      goto fail;
- *  //pick codec here and set it
- *  av_opt_set(caps, "codec", AV_CODEC_ID_RAWVIDEO, 0);
- *
- *  //query format
- *  if (av_opt_query_ranges(&ranges, caps, "pixel_format", AV_OPT_MULTI_COMPONENT_RANGE)) < 0)
- *      goto fail;
- *  //pick format here and set it
- *  av_opt_set(caps, "pixel_format", AV_PIX_FMT_YUV420P, 0);
- *
- *  //query and set more capabilities
- *
- * fail:
- *  //clean up code
- *  avdevice_capabilities_free(&query, oc);
- *  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.
- */
-attribute_deprecated
-extern const AVOption av_device_capabilities[];
-
-/**
- * Initialize capabilities probing API based on AVOption API.
- *
- * avdevice_capabilities_free() must be called when query capabilities API is
- * not used anymore.
- *
- * @param[out] caps      Device capabilities data. Pointer to a NULL pointer must be passed.
- * @param s              Context of the device.
- * @param device_options An AVDictionary filled with device-private options.
- *                       On return this parameter will be destroyed and replaced with a dict
- *                       containing options that were not found. May be NULL.
- *                       The same options must be passed later to avformat_write_header() for output
- *                       devices or avformat_open_input() for input devices, or at any other place
- *                       that affects device-private options.
- *
- * @return >= 0 on success, negative otherwise.
- */
-attribute_deprecated
-int avdevice_capabilities_create(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s,
-                                 AVDictionary **device_options);
-
-/**
- * Free resources created by avdevice_capabilities_create()
- *
- * @param caps Device capabilities data to be freed.
- * @param s    Context of the device.
- */
-attribute_deprecated
-void avdevice_capabilities_free(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s);
-#endif
-
 /**
  * Structure describes basic parameters of the device.
  */
diff --git a/libavdevice/version_major.h b/libavdevice/version_major.h
index d255ff6992d..571257f31d7 100644
--- a/libavdevice/version_major.h
+++ b/libavdevice/version_major.h
@@ -32,6 +32,5 @@
  * dropped at a future version bump. The defines themselves are not part of
  * the public API and may change, break or disappear at any time.
  */
-#define FF_API_DEVICE_CAPABILITIES (LIBAVDEVICE_VERSION_MAJOR < 60)
 
 #endif /* AVDEVICE_VERSION_MAJOR_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".

  parent reply	other threads:[~2023-02-04 10:47 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-04 10:41 [FFmpeg-devel] [PATCH v2] Major library version bump Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 01/33] avformat/avformat: Remove AVOutputFormat.data_codec Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 02/33] avformat/avformat: Move codecpar up in AVStream Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 03/33] avcodec: Make avcodec_decode_subtitle2 accept a const AVPacket* Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 04/33] avformat/demux: Avoid stack packet when decoding frame Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 05/33] avformat/avformat: Move AVOutputFormat internals out of public header Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 06/33] avcodec/avcodec: Remove AV_CODEC_FLAG2_DROP_FRAME_TIMECODE Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 07/33] avcodec: remove FF_API_OPENH264_SLICE_MODE Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 08/33] avcodec: remove FF_API_OPENH264_CABAC Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 09/33] avcodec: remove FF_API_UNUSED_CODEC_CAPS Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 10/33] avcodec: remove FF_API_THREAD_SAFE_CALLBACKS Anton Khirnov
2023-02-05 21:04   ` Michael Niedermayer
2023-02-07  7:58     ` [FFmpeg-devel] [PATCH v2.5 " Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 11/33] avcodec: remove FF_API_DEBUG_MV Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 12/33] avcodec: remove FF_API_GET_FRAME_CLASS Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 13/33] avcodec: remove FF_API_AUTO_THREADS Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 14/33] avcodec: remove FF_API_AVCTX_TIMEBASE Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 15/33] avcodec: remove FF_API_FLAG_TRUNCATED Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 16/33] avcodec: remove FF_API_SUB_TEXT_FORMAT Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 17/33] avformat: remove FF_API_LAVF_PRIV_OPT Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 18/33] avformat: remove FF_API_AVIOCONTEXT_WRITTEN Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 19/33] avformat: remove FF_HLS_TS_OPTIONS Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 20/33] avformat: remove FF_API_AVSTREAM_CLASS Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 21/33] avfilter: remove FF_API_SWS_PARAM_OPTION Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 22/33] avfilter: remove FF_API_BUFFERSINK_ALLOC Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 23/33] avfilter: remove FF_API_PAD_COUNT Anton Khirnov
2023-02-04 10:41 ` Anton Khirnov [this message]
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 25/33] avutil: remove FF_API_D2STR Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 26/33] avutil: remove FF_API_DECLARE_ALIGNED Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 27/33] avutil: remove FF_API_COLORSPACE_NAME Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 28/33] avutil: remove FF_API_AV_MALLOCZ_ARRAY Anton Khirnov
2023-02-04 10:42 ` [FFmpeg-devel] [PATCH v2 29/33] avutil/{color_utils, csp}: merge color_utils into csp and expose API Anton Khirnov
2023-02-04 16:27   ` Ronald S. Bultje
2023-02-04 10:42 ` [FFmpeg-devel] [PATCH v2 30/33] avutil/version: postpone the remaining API deprecations Anton Khirnov
2023-02-04 10:42 ` [FFmpeg-devel] [PATCH v2 31/33] avcodec/version: " Anton Khirnov
2023-02-04 10:42 ` [FFmpeg-devel] [PATCH v2 32/33] avformat/version: " Anton Khirnov
2023-02-04 10:42 ` [FFmpeg-devel] [PATCH v2 33/33] Bump major versions of all libraries Anton Khirnov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230204104204.20721-25-anton@khirnov.net \
    --to=anton@khirnov.net \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git