diff mbox series

[FFmpeg-devel,1/4] avdevice/decklink: use boolean for list_devices option

Message ID 1605924448-26279-1-git-send-email-lance.lmwang@gmail.com
State Accepted
Commit ae23a9684db7f85c77c05b7bfa9499a80b877e11
Headers show
Series [FFmpeg-devel,1/4] avdevice/decklink: use boolean for list_devices option
Related show

Checks

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

Commit Message

Limin Wang Nov. 21, 2020, 2:07 a.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

For the document(indevs.texi and outdevs.texi) used it as boolean.

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavdevice/decklink_dec_c.c | 2 +-
 libavdevice/decklink_enc_c.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Marton Balint Nov. 21, 2020, 11:19 a.m. UTC | #1
On Sat, 21 Nov 2020, lance.lmwang@gmail.com wrote:

> From: Limin Wang <lance.lmwang@gmail.com>
>
> For the document(indevs.texi and outdevs.texi) used it as boolean.
>
> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> ---
> libavdevice/decklink_dec_c.c | 2 +-
> libavdevice/decklink_enc_c.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavdevice/decklink_dec_c.c b/libavdevice/decklink_dec_c.c
> index 5997440..53a4774 100644
> --- a/libavdevice/decklink_dec_c.c
> +++ b/libavdevice/decklink_dec_c.c
> @@ -30,7 +30,7 @@
> #define DEC AV_OPT_FLAG_DECODING_PARAM
> 
> static const AVOption options[] = {
> -    { "list_devices", "list available devices"  , OFFSET(list_devices), AV_OPT_TYPE_INT   , { .i64 = 0   }, 0, 1, DEC },
> +    { "list_devices", "list available devices"  , OFFSET(list_devices), AV_OPT_TYPE_BOOL  , { .i64 = 0   }, 0, 1, DEC },
>     { "list_formats", "list supported formats"  , OFFSET(list_formats), AV_OPT_TYPE_INT   , { .i64 = 0   }, 0, 1, DEC },
>     { "format_code",  "set format by fourcc"    , OFFSET(format_code),  AV_OPT_TYPE_STRING, { .str = NULL}, 0, 0, DEC },
>     { "raw_format",   "pixel format to be returned by the card when capturing" , OFFSET(raw_format),  AV_OPT_TYPE_INT, { .i64 = 0}, 0, 5, DEC, "raw_format" },
> diff --git a/libavdevice/decklink_enc_c.c b/libavdevice/decklink_enc_c.c
> index 682c714..e7b0117 100644
> --- a/libavdevice/decklink_enc_c.c
> +++ b/libavdevice/decklink_enc_c.c
> @@ -28,7 +28,7 @@
> #define OFFSET(x) offsetof(struct decklink_cctx, x)
> #define ENC AV_OPT_FLAG_ENCODING_PARAM
> static const AVOption options[] = {
> -    { "list_devices", "list available devices"  , OFFSET(list_devices), AV_OPT_TYPE_INT   , { .i64 = 0   }, 0, 1, ENC },
> +    { "list_devices", "list available devices"  , OFFSET(list_devices), AV_OPT_TYPE_BOOL  , { .i64 = 0   }, 0, 1, ENC },
>     { "list_formats", "list supported formats"  , OFFSET(list_formats), AV_OPT_TYPE_INT   , { .i64 = 0   }, 0, 1, ENC },
>     { "preroll"     , "video preroll in seconds", OFFSET(preroll     ), AV_OPT_TYPE_DOUBLE, { .dbl = 0.5 }, 0, 5, ENC },
>     { "duplex_mode" , "duplex mode"             , OFFSET(duplex_mode ), AV_OPT_TYPE_INT   , { .i64 = 0   }, 0, 2, ENC, "duplex_mode"},

LGTM, thanks.

Marton
diff mbox series

Patch

diff --git a/libavdevice/decklink_dec_c.c b/libavdevice/decklink_dec_c.c
index 5997440..53a4774 100644
--- a/libavdevice/decklink_dec_c.c
+++ b/libavdevice/decklink_dec_c.c
@@ -30,7 +30,7 @@ 
 #define DEC AV_OPT_FLAG_DECODING_PARAM
 
 static const AVOption options[] = {
-    { "list_devices", "list available devices"  , OFFSET(list_devices), AV_OPT_TYPE_INT   , { .i64 = 0   }, 0, 1, DEC },
+    { "list_devices", "list available devices"  , OFFSET(list_devices), AV_OPT_TYPE_BOOL  , { .i64 = 0   }, 0, 1, DEC },
     { "list_formats", "list supported formats"  , OFFSET(list_formats), AV_OPT_TYPE_INT   , { .i64 = 0   }, 0, 1, DEC },
     { "format_code",  "set format by fourcc"    , OFFSET(format_code),  AV_OPT_TYPE_STRING, { .str = NULL}, 0, 0, DEC },
     { "raw_format",   "pixel format to be returned by the card when capturing" , OFFSET(raw_format),  AV_OPT_TYPE_INT, { .i64 = 0}, 0, 5, DEC, "raw_format" },
diff --git a/libavdevice/decklink_enc_c.c b/libavdevice/decklink_enc_c.c
index 682c714..e7b0117 100644
--- a/libavdevice/decklink_enc_c.c
+++ b/libavdevice/decklink_enc_c.c
@@ -28,7 +28,7 @@ 
 #define OFFSET(x) offsetof(struct decklink_cctx, x)
 #define ENC AV_OPT_FLAG_ENCODING_PARAM
 static const AVOption options[] = {
-    { "list_devices", "list available devices"  , OFFSET(list_devices), AV_OPT_TYPE_INT   , { .i64 = 0   }, 0, 1, ENC },
+    { "list_devices", "list available devices"  , OFFSET(list_devices), AV_OPT_TYPE_BOOL  , { .i64 = 0   }, 0, 1, ENC },
     { "list_formats", "list supported formats"  , OFFSET(list_formats), AV_OPT_TYPE_INT   , { .i64 = 0   }, 0, 1, ENC },
     { "preroll"     , "video preroll in seconds", OFFSET(preroll     ), AV_OPT_TYPE_DOUBLE, { .dbl = 0.5 }, 0, 5, ENC },
     { "duplex_mode" , "duplex mode"             , OFFSET(duplex_mode ), AV_OPT_TYPE_INT   , { .i64 = 0   }, 0, 2, ENC, "duplex_mode"},