Re: [FFmpeg-devel] [PATCH 2/4] avdevice/decklink: add AV_OPT_FLAG_DEPRECATED flag for list_devices

2020-11-28 Thread lance . lmwang
On Sat, Nov 21, 2020 at 12:21:10PM +0100, Marton Balint wrote:
> 
> 
> On Sat, 21 Nov 2020, lance.lmw...@gmail.com wrote:
> 
> > From: Limin Wang 
> > 
> > and claim the option deprecated in the description.
> 
> No, the description should stay as is. Adding the flag is enough, the
> deprecation will be printed if the user asks for the list of options based
> on the flag.
Sorry, after add the flag, it'll print "The "list_devices" option is 
deprecated:", 
I still prefer to change the description like below to avoid the duplicated 
warning message,
how do you think? I'll send a updated patch for review.

./ffmpeg -list_devices true -f decklink -i dummy
[Blackmagic DeckLink indev @ 0x2f96d00] The "list_devices" option is 
deprecated: list available devices
[decklink @ 0x2f96400] The -list_devices option is deprecated and will be 
removed. Please use ffmpeg -sources decklink instead.

->

[Blackmagic DeckLink indev @ 0x306ed00] The "list_devices" option is 
deprecated: use -sources decklink instead

> 
> Regards,
> Marton
> 
> > 
> > Signed-off-by: Limin Wang 
> > ---
> > libavdevice/decklink_dec_c.c | 3 ++-
> > libavdevice/decklink_enc_c.c | 3 ++-
> > 2 files changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/libavdevice/decklink_dec_c.c b/libavdevice/decklink_dec_c.c
> > index 53a4774..c6b38d2 100644
> > --- a/libavdevice/decklink_dec_c.c
> > +++ b/libavdevice/decklink_dec_c.c
> > @@ -30,7 +30,8 @@
> > #define DEC AV_OPT_FLAG_DECODING_PARAM
> > 
> > static const AVOption options[] = {
> > -{ "list_devices", "list available devices"  , OFFSET(list_devices), 
> > AV_OPT_TYPE_BOOL  , { .i64 = 0   }, 0, 1, DEC },
> > +{ "list_devices", "list available devices(deprecated, use -sources 
> > decklink instead)", OFFSET(list_devices),
> > +
> > AV_OPT_TYPE_BOOL  , { .i64 = 0   }, 0, 1, DEC | AV_OPT_FLAG_DEPRECATED},
> > { "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 e7b0117..ce99220 100644
> > --- a/libavdevice/decklink_enc_c.c
> > +++ b/libavdevice/decklink_enc_c.c
> > @@ -28,7 +28,8 @@
> > #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_BOOL  , { .i64 = 0   }, 0, 1, ENC },
> > +{ "list_devices", "list available devices(deprecated, use -sinks 
> > decklink instead)"
> > +, OFFSET(list_devices), 
> > AV_OPT_TYPE_BOOL  , { .i64 = 0   }, 0, 1, ENC | AV_OPT_FLAG_DEPRECATED},
> > { "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"},
> > -- 
> > 1.8.3.1
> > 
> > ___
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > 
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

-- 
Thanks,
Limin Wang
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 2/4] avdevice/decklink: add AV_OPT_FLAG_DEPRECATED flag for list_devices

2020-11-22 Thread lance . lmwang
On Sat, Nov 21, 2020 at 12:21:10PM +0100, Marton Balint wrote:
> 
> 
> On Sat, 21 Nov 2020, lance.lmw...@gmail.com wrote:
> 
> > From: Limin Wang 
> > 
> > and claim the option deprecated in the description.
> 
> No, the description should stay as is. Adding the flag is enough, the
> deprecation will be printed if the user asks for the list of options based
> on the flag.

thanks, will update the patch and add the flag only.

> 
> Regards,
> Marton
> 
> > 
> > Signed-off-by: Limin Wang 
> > ---
> > libavdevice/decklink_dec_c.c | 3 ++-
> > libavdevice/decklink_enc_c.c | 3 ++-
> > 2 files changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/libavdevice/decklink_dec_c.c b/libavdevice/decklink_dec_c.c
> > index 53a4774..c6b38d2 100644
> > --- a/libavdevice/decklink_dec_c.c
> > +++ b/libavdevice/decklink_dec_c.c
> > @@ -30,7 +30,8 @@
> > #define DEC AV_OPT_FLAG_DECODING_PARAM
> > 
> > static const AVOption options[] = {
> > -{ "list_devices", "list available devices"  , OFFSET(list_devices), 
> > AV_OPT_TYPE_BOOL  , { .i64 = 0   }, 0, 1, DEC },
> > +{ "list_devices", "list available devices(deprecated, use -sources 
> > decklink instead)", OFFSET(list_devices),
> > +
> > AV_OPT_TYPE_BOOL  , { .i64 = 0   }, 0, 1, DEC | AV_OPT_FLAG_DEPRECATED},
> > { "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 e7b0117..ce99220 100644
> > --- a/libavdevice/decklink_enc_c.c
> > +++ b/libavdevice/decklink_enc_c.c
> > @@ -28,7 +28,8 @@
> > #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_BOOL  , { .i64 = 0   }, 0, 1, ENC },
> > +{ "list_devices", "list available devices(deprecated, use -sinks 
> > decklink instead)"
> > +, OFFSET(list_devices), 
> > AV_OPT_TYPE_BOOL  , { .i64 = 0   }, 0, 1, ENC | AV_OPT_FLAG_DEPRECATED},
> > { "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"},
> > -- 
> > 1.8.3.1
> > 
> > ___
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > 
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

-- 
Thanks,
Limin Wang
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 2/4] avdevice/decklink: add AV_OPT_FLAG_DEPRECATED flag for list_devices

2020-11-21 Thread Engi Gang
im stupid sorry

On Sat, Nov 21, 2020 at 2:57 PM Reto Kromer  wrote:

> Engi Gang wrote:
>
> >unsubscribe
>
> Please follow the instruction given at the end of each single
> message:
>
> >> To unsubscribe, visit link above, or email
> >> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
>
> >To unsubscribe, visit link above, or email
> >ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 2/4] avdevice/decklink: add AV_OPT_FLAG_DEPRECATED flag for list_devices

2020-11-21 Thread Reto Kromer
Engi Gang wrote:

>unsubscribe

Please follow the instruction given at the end of each single
message:

>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

>To unsubscribe, visit link above, or email
>ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 2/4] avdevice/decklink: add AV_OPT_FLAG_DEPRECATED flag for list_devices

2020-11-21 Thread Marton Balint



On Sat, 21 Nov 2020, lance.lmw...@gmail.com wrote:


From: Limin Wang 

and claim the option deprecated in the description.


No, the description should stay as is. Adding the flag is enough, the 
deprecation will be printed if the user asks for the list of options based 
on the flag.


Regards,
Marton



Signed-off-by: Limin Wang 
---
libavdevice/decklink_dec_c.c | 3 ++-
libavdevice/decklink_enc_c.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavdevice/decklink_dec_c.c b/libavdevice/decklink_dec_c.c
index 53a4774..c6b38d2 100644
--- a/libavdevice/decklink_dec_c.c
+++ b/libavdevice/decklink_dec_c.c
@@ -30,7 +30,8 @@
#define DEC AV_OPT_FLAG_DECODING_PARAM

static const AVOption options[] = {
-{ "list_devices", "list available devices"  , OFFSET(list_devices), 
AV_OPT_TYPE_BOOL  , { .i64 = 0   }, 0, 1, DEC },
+{ "list_devices", "list available devices(deprecated, use -sources decklink 
instead)", OFFSET(list_devices),
+
AV_OPT_TYPE_BOOL  , { .i64 = 0   }, 0, 1, DEC | AV_OPT_FLAG_DEPRECATED},
{ "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 e7b0117..ce99220 100644
--- a/libavdevice/decklink_enc_c.c
+++ b/libavdevice/decklink_enc_c.c
@@ -28,7 +28,8 @@
#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_BOOL  , { .i64 = 0   }, 0, 1, ENC },
+{ "list_devices", "list available devices(deprecated, use -sinks decklink 
instead)"
+, OFFSET(list_devices), 
AV_OPT_TYPE_BOOL  , { .i64 = 0   }, 0, 1, ENC | AV_OPT_FLAG_DEPRECATED},
{ "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"},
--
1.8.3.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 2/4] avdevice/decklink: add AV_OPT_FLAG_DEPRECATED flag for list_devices

2020-11-21 Thread Engi Gang
unsubscribe

On Sat, Nov 21, 2020 at 4:08 AM  wrote:

> From: Limin Wang 
>
> and claim the option deprecated in the description.
>
> Signed-off-by: Limin Wang 
> ---
>  libavdevice/decklink_dec_c.c | 3 ++-
>  libavdevice/decklink_enc_c.c | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/libavdevice/decklink_dec_c.c b/libavdevice/decklink_dec_c.c
> index 53a4774..c6b38d2 100644
> --- a/libavdevice/decklink_dec_c.c
> +++ b/libavdevice/decklink_dec_c.c
> @@ -30,7 +30,8 @@
>  #define DEC AV_OPT_FLAG_DECODING_PARAM
>
>  static const AVOption options[] = {
> -{ "list_devices", "list available devices"  , OFFSET(list_devices),
> AV_OPT_TYPE_BOOL  , { .i64 = 0   }, 0, 1, DEC },
> +{ "list_devices", "list available devices(deprecated, use -sources
> decklink instead)", OFFSET(list_devices),
> +
> AV_OPT_TYPE_BOOL  , { .i64 = 0   }, 0, 1, DEC | AV_OPT_FLAG_DEPRECATED},
>  { "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 e7b0117..ce99220 100644
> --- a/libavdevice/decklink_enc_c.c
> +++ b/libavdevice/decklink_enc_c.c
> @@ -28,7 +28,8 @@
>  #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_BOOL  , { .i64 = 0   }, 0, 1, ENC },
> +{ "list_devices", "list available devices(deprecated, use -sinks
> decklink instead)"
> +, OFFSET(list_devices),
> AV_OPT_TYPE_BOOL  , { .i64 = 0   }, 0, 1, ENC | AV_OPT_FLAG_DEPRECATED},
>  { "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"},
> --
> 1.8.3.1
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH 2/4] avdevice/decklink: add AV_OPT_FLAG_DEPRECATED flag for list_devices

2020-11-20 Thread lance . lmwang
From: Limin Wang 

and claim the option deprecated in the description.

Signed-off-by: Limin Wang 
---
 libavdevice/decklink_dec_c.c | 3 ++-
 libavdevice/decklink_enc_c.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavdevice/decklink_dec_c.c b/libavdevice/decklink_dec_c.c
index 53a4774..c6b38d2 100644
--- a/libavdevice/decklink_dec_c.c
+++ b/libavdevice/decklink_dec_c.c
@@ -30,7 +30,8 @@
 #define DEC AV_OPT_FLAG_DECODING_PARAM
 
 static const AVOption options[] = {
-{ "list_devices", "list available devices"  , OFFSET(list_devices), 
AV_OPT_TYPE_BOOL  , { .i64 = 0   }, 0, 1, DEC },
+{ "list_devices", "list available devices(deprecated, use -sources 
decklink instead)", OFFSET(list_devices),
+
AV_OPT_TYPE_BOOL  , { .i64 = 0   }, 0, 1, DEC | AV_OPT_FLAG_DEPRECATED},
 { "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 e7b0117..ce99220 100644
--- a/libavdevice/decklink_enc_c.c
+++ b/libavdevice/decklink_enc_c.c
@@ -28,7 +28,8 @@
 #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_BOOL  , { .i64 = 0   }, 0, 1, ENC },
+{ "list_devices", "list available devices(deprecated, use -sinks decklink 
instead)"
+, OFFSET(list_devices), 
AV_OPT_TYPE_BOOL  , { .i64 = 0   }, 0, 1, ENC | AV_OPT_FLAG_DEPRECATED},
 { "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"},
-- 
1.8.3.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".