diff mbox series

[FFmpeg-devel,v4,05/22] avdevice: add control message requesting to show config dialog

Message ID 20220325141041.1748-6-dcnieho@gmail.com
State Superseded, archived
Headers show
Series avdevice (mostly dshow) enhancements | expand


Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Diederick C. Niehorster March 25, 2022, 2:10 p.m. UTC
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@gmail.com>
 doc/indevs.texi        | 34 ++++++++++++++++++++++++++++++++++
 libavdevice/avdevice.h | 10 ++++++++++
 libavdevice/version.h  |  4 ++--
 3 files changed, 46 insertions(+), 2 deletions(-)
diff mbox series


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
+@subsection Libavdevice user notes
+The dshow device supports the @code{avdevice_app_to_dev_control_message}
+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
+@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:
+@itemize @bullet
+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.
+2nd bit: If set, show property dialog for the audio or video capture device,
+allowing to change audio or video filter properties and configurations
+3rd bit: If set, show property dialog where crossbar pin routings of the
+audio/video device can be manually modified.
+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.
+@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 69317c9280..96347a3893 100644
--- a/libavdevice/version.h
+++ b/libavdevice/version.h
@@ -30,8 +30,8 @@ 
 #include "version_major.h"
                                                LIBAVDEVICE_VERSION_MINOR, \