[FFmpeg-devel] [PATCH v5 04/21] avdevice: add control message requesting to show config dialog

Diederick Niehorster dcnieho at gmail.com
Wed Mar 30 15:17:49 EEST 2022


This control message can be used to programmatically ask a device to
show one of its configuration dialogs.

Adding documentation of this message's int argument.

Bumping avdevice version.

Signed-off-by: Diederick Niehorster <dcnieho at gmail.com>
---
 doc/indevs.texi        | 34 ++++++++++++++++++++++++++++++++++
 libavdevice/avdevice.h | 10 ++++++++++
 libavdevice/version.h  |  4 ++--
 3 files changed, 46 insertions(+), 2 deletions(-)

diff --git a/doc/indevs.texi b/doc/indevs.texi
index 9d8020311a..0302859552 100644
--- a/doc/indevs.texi
+++ b/doc/indevs.texi
@@ -682,6 +682,40 @@ $ ffmpeg -f dshow -show_video_device_dialog true -crossbar_video_input_pin_numbe
 
 @end itemize
 
+ at subsection Libavdevice user notes
+
+The dshow device supports the @code{avdevice_app_to_dev_control_message}
+interface.
+
+It understands the @code{AV_APP_TO_DEV_PAUSE}, @code{AV_APP_TO_DEV_PLAY}
+and @code{AV_APP_TO_DEV_TOGGLE_PAUSE} commands, which respective stop and
+start whether data is captured from the connected device, and toggle
+capture state.
+
+It furthermore understands the @code{AV_APP_TO_DEV_CONFIG} message, which
+requests the device to show a configuration dialog (if available). An
+ at code{int} should be passed along with this command to indicate which
+configuration dialog should be shown. The bits in this @code{int} have
+the following meaning:
+
+ at itemize @bullet
+ at item
+1st bit: If set, the dialog for the audio device will be shown. If not set
+the dialog for the video device will be shown.
+
+ at item
+2nd bit: If set, show property dialog for the audio or video capture device,
+allowing to change audio or video filter properties and configurations
+manually.
+
+ at item
+3rd bit: If set, show property dialog where crossbar pin routings of the
+audio/video device can be manually modified.
+
+ at item
+4th bit: If set, show property dialog where TV channels and frequencies can be manually modified (in case of video device), or TV audio (like mono vs. stereo, Language A, B or C) can be manually modified in case of audio device.
+ at end itemize
+
 @section fbdev
 
 Linux framebuffer input device.
diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h
index db16a2f27e..74e9518a8e 100644
--- a/libavdevice/avdevice.h
+++ b/libavdevice/avdevice.h
@@ -206,6 +206,16 @@ enum AVAppToDevMessageType {
      */
     AV_APP_TO_DEV_GET_VOLUME = MKBETAG('G', 'V', 'O', 'L'),
     AV_APP_TO_DEV_GET_MUTE   = MKBETAG('G', 'M', 'U', 'T'),
+
+    /**
+     * Request to show configuration dialog.
+     * 
+     * If device has a configuration dialog of type indicated by
+     * data, show it.
+     * 
+     * data: int (device-specific).
+     */
+    AV_APP_TO_DEV_CONFIG = MKBETAG('C', 'O', 'N', 'F'),
 };
 
 /**
diff --git a/libavdevice/version.h b/libavdevice/version.h
index fb1dccb6b3..f27f9ad9bf 100644
--- a/libavdevice/version.h
+++ b/libavdevice/version.h
@@ -30,8 +30,8 @@
 
 #include "version_major.h"
 
-#define LIBAVDEVICE_VERSION_MINOR   7
-#define LIBAVDEVICE_VERSION_MICRO 101
+#define LIBAVDEVICE_VERSION_MINOR   8
+#define LIBAVDEVICE_VERSION_MICRO 100
 
 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
                                                LIBAVDEVICE_VERSION_MINOR, \
-- 
2.28.0.windows.1



More information about the ffmpeg-devel mailing list