diff mbox series

[FFmpeg-devel,13/35] avdevice: adding control message requesting to show config dialog

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

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Diederick C. Niehorster June 7, 2021, 11:03 p.m. UTC
This control message can be used to programmatically ask a device to show its configuration dialog.
Bumping avdevice version.

Signed-off-by: Diederick Niehorster <dcnieho@gmail.com>
---
 libavdevice/avdevice.h | 10 ++++++++++
 libavdevice/version.h  |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

Comments

Nicolas George June 8, 2021, 12:02 p.m. UTC | #1
Diederick Niehorster (12021-06-08):
> This control message can be used to programmatically ask a device to show its configuration dialog.
> Bumping avdevice version.
> 
> Signed-off-by: Diederick Niehorster <dcnieho@gmail.com>
> ---
>  libavdevice/avdevice.h | 10 ++++++++++
>  libavdevice/version.h  |  2 +-
>  2 files changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h
> index 6f24976dcc..4fbdf6aabc 100644
> --- a/libavdevice/avdevice.h
> +++ b/libavdevice/avdevice.h
> @@ -190,6 +190,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.

?

> +     */
> +    AV_APP_TO_DEV_CONFIG = MKBETAG('C', 'O', 'N', 'F'),
>  };
>  
>  /**
> diff --git a/libavdevice/version.h b/libavdevice/version.h
> index 6e593ba00e..0381d6cd0d 100644
> --- a/libavdevice/version.h
> +++ b/libavdevice/version.h
> @@ -28,7 +28,7 @@
>  #include "libavutil/version.h"
>  
>  #define LIBAVDEVICE_VERSION_MAJOR  59
> -#define LIBAVDEVICE_VERSION_MINOR   1
> +#define LIBAVDEVICE_VERSION_MINOR   2
>  #define LIBAVDEVICE_VERSION_MICRO 100
>  
>  #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \

Regards,
Diederick C. Niehorster June 8, 2021, 8:30 p.m. UTC | #2
On Tue, Jun 8, 2021 at 2:02 PM Nicolas George <george@nsup.org> wrote:
>
> Diederick Niehorster (12021-06-08):

> > +    /**
> > +     * Request to show configuration dialog.
> > +     *
> > +     * If device has a configuration dialog of type indicated by
> > +     * data, show it.
> > +     *
> > +     * data: int.
>
> ?

Do i understand correctly that you would like it documented what this
int means? It would be avdevice-specific. If a device has multiple
dialogs, the int allows indicating which is to be shown. Would adding
"data: int: indicates which dialog to show. Meaning is device
specific." work?

Thanks,
Dee
Nicolas George June 9, 2021, 11:20 a.m. UTC | #3
Diederick C. Niehorster (12021-06-08):
> Do i understand correctly that you would like it documented what this
> int means? It would be avdevice-specific. If a device has multiple
> dialogs, the int allows indicating which is to be shown. Would adding
> "data: int: indicates which dialog to show. Meaning is device
> specific." work?

Thanks for explaining. Then "data: int (device-specific)" should be
enough, if you also document the device-specific value in the user
documentation of each device.

That means in patch 14, "Documentation of dialog variable:" should be in
doc/devices.text, I think.

Regards,
Diederick C. Niehorster June 9, 2021, 7:40 p.m. UTC | #4
On Wed, Jun 9, 2021 at 1:20 PM Nicolas George <george@nsup.org> wrote:
> Thanks for explaining. Then "data: int (device-specific)" should be
> enough, if you also document the device-specific value in the user
> documentation of each device.
>
> That means in patch 14, "Documentation of dialog variable:" should be in
> doc/devices.text, I think.

That documentation seems to be (to me) for users of the command line
tools, who wouldn't be able to use this command message interface.
That said, its the best/only place in the documentation where the int
could be documented. Would something like an extra section after
https://ffmpeg.org/ffmpeg-devices.html#Examples-2, titled for example
"Libavdevice user notes" be what you have in mind?

Thanks,
Dee
diff mbox series

Patch

diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h
index 6f24976dcc..4fbdf6aabc 100644
--- a/libavdevice/avdevice.h
+++ b/libavdevice/avdevice.h
@@ -190,6 +190,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.
+     */
+    AV_APP_TO_DEV_CONFIG = MKBETAG('C', 'O', 'N', 'F'),
 };
 
 /**
diff --git a/libavdevice/version.h b/libavdevice/version.h
index 6e593ba00e..0381d6cd0d 100644
--- a/libavdevice/version.h
+++ b/libavdevice/version.h
@@ -28,7 +28,7 @@ 
 #include "libavutil/version.h"
 
 #define LIBAVDEVICE_VERSION_MAJOR  59
-#define LIBAVDEVICE_VERSION_MINOR   1
+#define LIBAVDEVICE_VERSION_MINOR   2
 #define LIBAVDEVICE_VERSION_MICRO 100
 
 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \