diff mbox series

[FFmpeg-devel] lavd: deprecate the bktr device

Message ID 20240128090042.2878-1-anton@khirnov.net
State Accepted
Commit 70ecb8238cffd896db3e6e817f913c7a4546c791
Headers show
Series [FFmpeg-devel] lavd: deprecate the bktr device | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov Jan. 28, 2024, 9 a.m. UTC
It implements BSD-specific support for very old analog capture cards,
which are highly unlikely to be useful today. After being added in 2005,
there were never any commits to it beyond compilation fixes and generic
maintenance. There have also been zero trac tickets for this device, and
the only related web search result I found concludes that it does not
work.

The code also does some unacceptable things, like messing with signal
handlers and storing its state in global variables.
---
 doc/indevs.texi             | 3 ++-
 libavdevice/bktr.c          | 3 +++
 libavdevice/version_major.h | 3 +++
 3 files changed, 8 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/doc/indevs.texi b/doc/indevs.texi
index a0c684f545..d1b2bacf8b 100644
--- a/doc/indevs.texi
+++ b/doc/indevs.texi
@@ -222,7 +222,8 @@  $ ffmpeg -f avfoundation -capture_raw_data true -i "zr100:none" out.dv
 
 @section bktr
 
-BSD video input device.
+BSD video input device. Deprecated and will be removed - please contact
+the developers if you are interested in maintaining it.
 
 @subsection Options
 
diff --git a/libavdevice/bktr.c b/libavdevice/bktr.c
index 196637852f..864726468f 100644
--- a/libavdevice/bktr.c
+++ b/libavdevice/bktr.c
@@ -264,6 +264,9 @@  static int grab_read_header(AVFormatContext *s1)
     AVRational framerate;
     int ret = 0;
 
+    av_log(s1, AV_LOG_WARNING, "bktr input is deprecated and will be removed. "
+           "Please contact the developers if you are interested in maintaining it.\n");
+
     if (!s->framerate)
         switch (s->standard) {
         case PAL:   s->framerate = av_strdup("pal");  break;
diff --git a/libavdevice/version_major.h b/libavdevice/version_major.h
index b884fd4224..9f7b79b2ee 100644
--- a/libavdevice/version_major.h
+++ b/libavdevice/version_major.h
@@ -33,4 +33,7 @@ 
  * the public API and may change, break or disappear at any time.
  */
 
+// reminder to remove the bktr device on next major bump
+#define FF_API_BKTR_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
+
 #endif /* AVDEVICE_VERSION_MAJOR_H */